Dinosaur wrote:Hi All
Problem is now identified as Baud rate.
When opening the port with FB program line:it opens the port at the default Baud rate set by the Linux system.Code: Select all
Open Com "/dev/ttyUSB0:38400,n,8,1,cs0,ds0,cd0,rs" For Binary As #CP
On my system, it happens to be 115200.
Well the stty command can set the baud rate as well as determine what it is. There're also some API calls you can make using the termios.h file, which is how you do it from C (http://stackoverflow.com/questions/6947 ... -port-in-c).In Dos, you could use a Mode statement to set the baud rate.
Is there such a statement in Linux ?
Looks to me like a bug in the runtime library. I reduced the test to just:
Code: Select all
Open Com "/dev/ttyUSB0:38400" For Binary As #1
Probably we should have the list moderators change the subject of this thread to "Serial support in Linux" since it's more about accessing serial ports, whether physical or USB. I started to look through the runtime library source files, but I haven't had time to figure out where the actual serial port code is.