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

Mario Munda mario.munda at globtel.si
Fri Jan 19 02:55:52 EST 2007


Hi

The example from the HowToSystemIOPorts 
(http://www.mono-project.com/HowToSystemIOPorts) doesn't work, for 
starters...

Transmiting part works ok, but not the receiving.

P.S.:
I use FreeBSD, and I'm sending data to /dev/cuad0.

Best Regards

Carlos Alberto Cortez pravi:
> Hey,
>
> Could you cook a test case? That way we can try to take a look at the
> issue.
>
> Carlos.
>
>   
>> 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
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>     
>
>
>   



More information about the Mono-devel-list mailing list