Access to the port 'COM4' is denied

Hello,

During my experiment this week-end I encounter the following message multiple time:
20200302_161128
The port COM4 is the one used for the Arduino.

First when I connected my Surface Go and begin to settup the steering setting, this message appear when I start to turn the wheel left or right with the test mode “Drive Mode”.
I was thinking it is a problem with the surface so I connect my laptop to the Arduino and the GPS antena : same result.
And the symptomatic was the same on the 2 divices : when this message appear, I have to shutdown AGO, disconnect arduino USB, reconnect it, relaunch AGO, go to setting and reconnect port COM4. Sometime, AGO totally freeze.
After disconnect/reconnect and relaunch AGO several times, I disconnect everything (arduino power ect.).

Reconnect everything on the Surface, all works perfectly : I used AGO during more than 1h to settup and try AGO on the tractor.

And suddently, it appeared again during my test. Again, disconnect USB, shut-off AGO, relaunch AGO, reconnect etc… several time and the message was still here. Disconnect everything again and reconnect and work again… :thinking:

Have you any idea what can happen ?

It seems happen specially when the motor have to make a lot of driving correction: by exemple, when I switch on the autosteer at 1 or 2m of the line.

Thank for your help.

Math

What system are you using? PCBv2 with the cytron driver?

Maybe voltage drop or powerline noise? Drop would have to be huge to affect the arduino with the standard pcb setup. Are you using a powered USB hub? I had noise issues when I powered mine from a noisy supply but nothing that serious.

on which chip are you using arduino?
CH or FTDI?

Sounds like some background process is occasionally grabbing the serial port. No idea what though!

is there bluetooth maybe stealing it? Try turning off bluetooth

Is there a way in Windows to specifically assign a com port to a particular USB device? In my experience, Windows is really non-deterministic in how it assigns ports.

Hmm, it looks like there might be: How to change the COM port for a USB Serial adapter on Windows 7, 8, 8.1, and 10 - Plugable Knowledge Base

I wish Windows supported accessing serial ports by a name associated with the device, rather than some com number. I am so glad Linux distros let you access serial devices by /dev/serial/by-id/xxxx, which is nice for making sure my ntrip server always grabs the correct device!

Not as far as I understand addressing.

I have had that same problem before and it was either down to the device being assigned a new COM port, or the Arduino IDE being open and connected to that port.

UDP / ethernet can be used to avoid the usb / com port situation all together…

1 Like

Once the device is plugged into windows it will always use the same com if available if unplugged and plugged back in again.

It’s good linux has at least 1 thing better then windoze :slight_smile: :smile:

Video on ports

If I recall I had issues with my bluetooth serial devices though. Sometimes the incoming port would be COMX and the outgoing port was COMY, and other times it was swapped. Probably if I had just used a master-only adapter it wouldn’t have that problem.

Hello,

Thank for all your answer !

I’am not using PCBv2. I’m using a home made PCB based on the old wiki schematic, with the following modifications:

For voltage drop hypothesis, the architecture of the power supply of the board is like this:
Power Supply
It mean that the voltage drop du to the motor throught the IBT2 Power Side + 12V to 24V Step-Up Converter have to be suffisant to generate a significant power drop on the tractor 12V bus. I haven’t noted a visible voltage drop on the tractor electrical system (like loose of indication on the dashboard or something like this). What do you think ?
Powerline noise, it could be: it seems it have to be propagated throught the LM2596. But not easy to check that: the only way I saw is to monitor the 5V output of the LM2596 with an oscilloscope (that I don’t have). Or any other idea ?

For the USB hub that I use with the Surface Go, it is an unpowered USB hub. But the problem also appear when I use my Acer Labtop and I don’t use USB hub with my labtop (enought USB port on it for connect GPS antenna and Arduino without USB hub). It’s why for me, the USB Hub is not the cause.

Don’t understant the question. For me, Arduino Nano use a FTDI FT232RL chip for UART/USB convertion.

I have to check this. But the Surface Go is brand new: Get It out of the box, just made the Windows 10 updates, unistall all not necessary software furnished with Windows, and only install AGO & Arduino IDE on it. So I could unistall Arduino IDE, but apart from that I have no other idea.
And It seems the problem appear only when the steering is engaged.

Ok I will try this. Bluethoot was on on the 2 devices during my tests.

Ok I will try this to.

Thank again for your help !

Math

Have you tried a multimeter on the output of the LM2596 when the steering is making large adjustments? Like when using the drive slider on steering settings? I know it’s possibly a long shot but an easy test.

The issue happens on more than one device and under heavy load so I would be looking at power issues rather than port issues personally, but definitely not exclusively. Have you any poor connections anywhere?

It may just be perspective or hidden connections I can’t see but the power connections look wrong here?

PCB

[EDIT…] Probably just photo perspective.

Hello,

Thanks for your answer.

As it’s happen on two different device, I also think it come from the board.
I will make mesurement on the output on LM2596 with a multimeter as first test (and also test the tips on bluetooth and ports).

But don’t when: for the moment I’m confined in Paris and I cannot go to my father farm.
I take advantage of this setback to build a PCBv2 as a replacement of my prototype board that should, I hope, solve this problem (luckily the deliveries aren’t suspended).

Math

Hello,

So I replace my prototype board by a PCBv2 in a home made 3D printed box, with SP21 connectors.
The PCBv2 is equiped with a new official Nano v3, a new ADS, a new MMA and a new BNO.
The power supply cable is:

  • 2.5mm2 from batterie to DIN9680
  • 1.5mm2 from DIN9680 to SP21 connector (lenght 40cm)
  • 4mm2 with 10A fuse from SP21 to board entry
  • 1.5mm2 for other wire until motor.

Bluethooth off on the tablet.

Make some test with AGO v4.1.12. I had the bug one time, again when I was far from ligne with a lot of steering correction to do. I try to reproduce it in test drive mode, by turning the weel at 40° and ask to go back to 0°. But the bug didn’t reproduce.

After I update to v4.3.10 : the bug never reproduce. So seems to be solve, but the root cause is not clearly identified.

Math

I’ve been having problems with my Arduino port with the same error. It’s either the new laptop or the new firmware update and all runs ok on my old surface pro with agopengps 5.5.0