Hi Lukas, Marrku,

Thank you for the information. I understand this could be the affect but
currently do not know what I am doing wrong.

In minicom I have the serial port configured as:
Port: /dev/ttyS1
Baud: 57600
Data Bits: 8
Parity: None
Stop Bits: 1
Hardware flow Control: none
Software flow control: none

This works, so, using Synapse I have the following:
SerialObj.Connect('/dev/ttyS1');
SerialObj.Config(57600,8,'N',0,false,false);

But the Application applying the above configuration does not work. What I
am doing wrong when configuring the port using Synaser vs that applied by
Minicom?

Ps. The 'lasterror' property seems to be working fine under Linux.


Thanks,

W

The above

On Mon, Feb 16, 2009 at 5:19 PM, Lukas Gebauer <[email protected]> wrote:

> > 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: [email protected]
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/synalist-public
>
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to