Potential COM Port Module Bug

For general discussion related FlowStone
Post Reply
manton
Posts: 5
Joined: Wed Jan 04, 2012 1:11 am

Potential COM Port Module Bug

Post by manton »

I just noticed that the list of ports on the COM Port module includes COM0. Can anyone think of why this would be, since AFAIK COM0 is not allowed, and numbering usually starts at COM1? I know that my machine certainly does not have COM0 available.

I'm using V3.0.2.

Thanks.
User avatar
jjs
Posts: 142
Joined: Thu Jun 09, 2011 12:15 pm

Re: Potential COM Port Module Bug

Post by jjs »

since win XP every com nr is allowed, even if you not have them as a hardware port.
indeed virtual ports !
manton
Posts: 5
Joined: Wed Jan 04, 2012 1:11 am

Re: Potential COM Port Module Bug

Post by manton »

But, in my case, I don't have a real or virtual port on COM0, at least according to device manager.

Thanks.
User avatar
jjs
Posts: 142
Joined: Thu Jun 09, 2011 12:15 pm

Re: Potential COM Port Module Bug

Post by jjs »

Can be.
If your motherboard does not have one, or you turned it off in the BIOS
on the other hand virtual com ports are often installed by some kind of software and like usb to rs232 cables. Then you can set any com port you want in the device manager
manton
Posts: 5
Joined: Wed Jan 04, 2012 1:11 am

Re: Potential COM Port Module Bug

Post by manton »

Well, I don't know about your machine, but on mine I cannot set any ports to COM0. Every other number from 1-255 is available though. So, I still suspect that COM0 is not allowed.

So, I repeat, given that I do not have a COM0 on my machine (and couldn't map one to it even if I wanted to), why does the COM port object have COM0 in the list of available ports?
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: Potential COM Port Module Bug

Post by MyCo »

Serial Ports can have any name, not only "COM"... FS only supports serial ports that start with "COM", all other ports are wrongly mapped. I don't know the exact code in FS, but I think they do it like this:

Code: Select all

1. Get the names of the serial ports
2. Remove the first 3 characters from the names
3. interpret the remaining chars as integer


So, if you have a serial port that hasn't an integer after the third character, this will propably be read as "0".

You can test this with other terminal programs that support any names for serial ports, eg.:
http://www.der-hammer.info/terminal/

I've seen this com port issues before (and already notified the Devs about that), because I've virtual com ports on my PC that have names like "CNCA 1", "CNCB 1",...
Post Reply