Trying to read data from a COMn: port using FreeBasic. The device is a TouchScreen with an ARM controller that punch serial data at 9600,N,8,1 via a FTDI chip to connect USB to PCs. This motherboard I am using for test has native COM1 on BIOS, and for some reason Windows blocked COM2, 3, 4, 5, 6, 8, 9, 10... Upon connecting this device to the motherboard it enumerates USB and allocates COM7: for that on Device Manager. Putty program can read it as COM7 nicely when interrupting the infrared matrix on the touchscreen, and shows incoming data as AxxxyyyZ, where xxx and yyy are the coordinates 1~600 and 1~800, Z is "B" when interrupting, "N" when lifting and "C" when draging, and the initial "A" is just sync.
Pretty easy to write a code in FreeBasic to drawn circles where touch, and line when dragging, right? yes, except FreeBasic could not read COM7: for nothing in this world. It opens, there is no error on OPEN "COM7:N,8,1" as 1, but no data could be read from Windows.
I suspected FreeBasic has some issues with COMn: when "n" is higher than certain value. So I literally destroyed COM2 on Device Manager, and after few restarts I could see COM2 free on Device Manager and allocate 2 to this FTDI connection, and voilá, working.
It might be something else, I don't know, but as COM2 it works. I could not find on FreeBasic literature about some limitations for COMn values... Does anybody knows something?