Is there a limit to the serial port number?

I have my windows serial terminal app coming right along. I tested it on a different computer where the modem was on COM16 and it didn’t work. I have been developing on a machine that has only 2 ports, COM 4 and 5. The other machine has 14 ports. So, on COM16 the program ran but didn’t talk to the port. I moved some port around and got my app on COM2 and it works fine. Is here a limit on the port number? The System.SerialPort(SerialPortsPopupMenu.ListIndex) sees the port, the Serial.Open doesn’t error, but it just doesn’t communicate.

In my experience, Windows USB ports don’t act like the good old RS232 Serial Comports of old.

For example, Windows will automagically assign a free port number only when you plug in a valid (FTDI) device in. Therefore what was the “physical” USB/COM1 could change depending on how many devices are plugged in and when they were plugged in.

If you swap over the devices in the ports, Windows won’t always remember: mouse in com1, scanner in com2, etc. I think there is a way to “hard-code” which device is in which port, but I don’t think it’s very easy.

Yeah, I know this doesn’t answer your question if there is a limit on usb/com ports with Xojo but I doubt there is - it would be more of a limitation of the OS . Windows 7 has a limit of 127 usb ports (I think)

From memory, WinXP dealt with serial ports differently. What version of Windows are you running?

I am using Windows 7. This particular port was COM16. The System.SerialPort sees the the port and I assigned it to the Serial.SerialPort and that doesn’t error. Actually, there are no errors anywhere, just doesn’t send and receive data. Going into the properties of the COM16 with Device Manager in Windows and changing it to COM2, all works fine. I do have a lot of serial ports on this computer, most are virtual ports associated with a Flex Radio Flex-6300 SDR Transceiver. There are four USB Serial Ports on the machine and one of those is what I am trying to use. The USB Serial adapter uses a FTDI chip and I have never had any issues with other applications using these high port numbers. PUTTY, my favorite terminal program works just fine. I guess I should try Cool Term, it is written in Xojo as I recall and see if it works on port 16.

I have had issues with USB Serial adapters that use Prolific and counter fit FTDI chips. Those can be very difficult with Windows and particularly Window Dot Net apps. (Have I mentioned that I hate Dot Net?)

Bob - N4RFC

You may as well give CoolTerm a go then - you have nothing to lose.

CoolTerm is written in Xojo by Roger Meier who is a member of this forum. I was fiddling around with serial port access in .NET and C# then came across CoolTerm. I saw that it was written using Xojo, and that’s the reason I’m using Xojo for my app.