[Mono-dev] [Mono-list] serial port problem

Victor Rocha rocha.pusch at gmail.com
Thu Jan 18 14:37:35 EST 2007


On 1/16/07, Mario Munda <mario.munda at globtel.si> wrote:
> Hi.
>
> I have a problem receiving data on the serial port.
>
> My gmcs version is:
>
> bash2-2.05b# mono -V
> Mono JIT compiler version 1.2.20061229, (C) 2002-2006 Novell, Inc and
> Contributors. www.mono-project.com
>         TLS:           normal
>         GC:            Included Boehm (with typed GC)
>         SIGSEGV:       altstack
>         Disabled:      none
>
> It was installed as a package on the FreeBSD system.
>
> I can send data over the serial port normaly, but i can't receive any!
>
> Any ideas?
>


Hello Mario

I'm with some problems in serial port too.

First, I can succesfully read a text string, when I "loopback" a
serial cable, connecting pins 2 and 3.... I send the string and can
read it immediatly, it worked fine for me in Linux (running mono as
root, my mono version is 1.2.2). The code I used is the same found in
http://www.mono-project.com/HowToSystemIOPorts

But I cannot succeed in another mono application, where I try to
communicate to an external device using modbus (binary protocol). The
device correctly understands my query, and I know it responds (because
a "TX" led blinks in the device), but mono can't get any data from the
port. Depending on mono version, and whether I'm root or not, I can
get two types of error... sometimes a "timeout" exception is raised,
and sometimes i get a byte with a "255" value.

I tryed other (non-mono) applications to communicate to the same
external device, and they work ok in Linux, and also in Windows.

I'm still debugging, but maybe there is something with DTR signals,
etc., or maybe a bug with binary communications.

i'll keep trying and will post if I find a solution....

if anyone got binary communications working OK, please inform what was
the os distributon/ monon version used...eventually i could change my
system set-up, if that fixed the problem....

thanks, Victor



More information about the Mono-devel-list mailing list