> When I connect to view the data in Minicom, I can see the Binary data
> being received. I then close Minicom and run my application that can
> process this binary data and everything works fine to this point. When
> I stop my application and restart it, I get the error "Bad file
> number" when trying to connect and configure the serial port. I then
> have to run minicom again where it connects and receives the data, and
> once I close minicom am I able to run my application again after which
> I receive the binary data again and then there are no errors when
> connecting to the ports.

This is typical problem... you are trying toset bad communication 
parameters. If they are bad, then it not set it and previous 
communication parameter are used.

So, your minicom  application set correct parameters and then your 
application is usable. ;)

Check your Config call and rather use predefined constants for set 
stopbits.

> SerialObj.Connect('/dev/ttyS0');
> SerialObj.Config('9600',8,'N',1,false,false)
> 
> if SerialObj.LastError = 0 then

This is good for windows, because it set lasterror on bad parameters. 
However I am not sure if it working well on Linux too.



-- 
Lukas Gebauer.

E-mail: gebau...@mlp.cz
http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to