Hi,
I have a small issue with my 8090 relay board being allocated a different com port nearly every time I reboot - it’s been com3 / 4 / 5 and 6 at different times. Does anyone know a way of determining this in software so I don’t have to manually change the setting every time?
Thanks.
Windows decides what the port will be, usually the port remains the same if the device is plugged into the same physical port. If this isn’t the case for you, then I would start looking into other devices or software that are interfering with this default behavior.
Bluetooth software especially has been known to harass serial ports, I’ve seen them occupy whole ranges of serial port numbers, and even occupy any serial port that becomes available.
Does anyone else have issues/ solutions regarding com port allocation? I now have a project requiring 2 (and possibly later 3) 8090 boards connected to 1 pc and ensuring I’m communicating with the same board after a re-boot / shut-down etc. is a concern.
Currently, I loop through all the com ports until a valid one is found which I then set to be board1 (no other com port devices present). Continuing from this, I can then find board 2, 3 etc. but what if board2 suddenly becomes the lowest com port? I’ve seen this happen after unplugging / re-plugging the boards for example.
Any thoughts welcome.
In my experience, the ports are remembered by their physical port.
You have a device that has been assigned COM4, and is plugged into port A. If you unplug it and plug it into port B, the port number will change to COM5 (and you may need to reinstall the driver, if you’ve never done that for port B).
If you plug the device back into port A, the port number will return to COM4.
The port number seems to be remembered; port A will always be COM4, port B will always be COM5, unless the port is already taken of course.
(All port numbers are just examples to illustrate)
I don’t have experience with two devices though, but I think the ports will remain the same for each device since they’re on a different physical port.
This is not my experience… I may have initially have com3 and com4 used, then after a restart it may be com4+com5 or com5+com6. This happens on several pcs that I’ve tried. The pc I’m currently using has currently allocated com7 and com8 for the 2 boards attached even though there’s no other com devices attached.
In addition, when I unplugged and re-plugged as a trial, I plugged them in exactly the same ports that they were in previously but this still resulted in them ‘switching’ com ports.
It all seems pretty random from where I’m sitting and I’d love someone to tell me how to fix the port numbers please
I can do whatever I want and the port number never changes, I’ve always remembered it to remain the same for weeks on end. But you have two devices, maybe that’s the cause, maybe not, I would guess not, but it’s still guesswork.
You’re not on a laptop with bluetooth?
This is also important: don’t unplug the device if the port is still connected to by software. This will definitely cause the port number to change. Always connect, disconnect, unplug.