Re: [Mono-list] Serial Ports

2009-08-31 Thread Petit Eric
MonoWinforms is not so happy with crossthreading, try to handle the
event through an invokerequiere :-)

2009/8/31 Victor Rocha :
> Hello
>
> I suggest first try a very simple example (like writing simple ascii
> text on a serial port with mono, then reading it with putty or
> hyperterminal, on another comport which can be on the same computer).
>
> This should be very straight forward i learned from the same link
> some time ago (http://www.mono-project.com/HowToSystemIOPorts)
>
> After making sure that a simple example works fine, there comes some tricks.
> for example, sometimes i need do set DtrEnabled = true; it depends on
> the device being communicated to;
> there are also issues with "events" on received data, if i record
> correctly, but a simple byte read should work nicely, or see below.
>
> Older posts here in mono lists report that:
> - "Unity" project maybe had a complete version, but noone replied??
> (buhochileno in july12th)
> - this blog has example on threaded polling, to replace the necessity of
> events: http://shaneo.blogsite.org/ (shawn in aug21st)
>
> greetings :-)
>
>
> Glenn R. Martin escreveu:
>> Is this old documentation correct on the received data notification
>> event not being implemented? and that polling has to be done still?
>>
>> http://www.mono-project.com/HowToSystemIOPorts
>>
>> Thanks
>> Glenn R. Martin
>>
>> On 31 Aug 2009, at 03:33 , Petit Eric wrote:
>>
>>> 2009/8/31 Danny Haak >> >:
 Hi Glenn,

 My experience is that serial ports work using the same code in Windows
 and Linux - with the only change being the port name. Does your serial
 device need RTS/CTS lines? Are they set right? Is the timeout set
 correctly?
>>> It is true i forget this , setting not always same, i suggest you to
>>> write them, with same as the one under Windows(parity, speed, bit stop
>>> , rts, end line )

 Best regards,
 Danny Haak

>>
>> 
>>
>> ___
>> Mono-list maillist  -  mono-l...@lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>
> ___
> Mono-list maillist  -  mono-l...@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>



-- 
Cordially.

Small Eric Quotations of the days:
---
I have no special talents. I am only passionately curious
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Serial Ports

2009-08-31 Thread Victor Rocha
Hello

I suggest first try a very simple example (like writing simple ascii 
text on a serial port with mono, then reading it with putty or 
hyperterminal, on another comport which can be on the same computer).

This should be very straight forward i learned from the same link 
some time ago (http://www.mono-project.com/HowToSystemIOPorts)

After making sure that a simple example works fine, there comes some tricks.
for example, sometimes i need do set DtrEnabled = true; it depends on 
the device being communicated to;
there are also issues with "events" on received data, if i record 
correctly, but a simple byte read should work nicely, or see below.

Older posts here in mono lists report that:
- "Unity" project maybe had a complete version, but noone replied?? 
(buhochileno in july12th)
- this blog has example on threaded polling, to replace the necessity of 
events: http://shaneo.blogsite.org/ (shawn in aug21st)

greetings :-)


Glenn R. Martin escreveu:
> Is this old documentation correct on the received data notification 
> event not being implemented? and that polling has to be done still?
>
> http://www.mono-project.com/HowToSystemIOPorts
>
> Thanks
> Glenn R. Martin
>
> On 31 Aug 2009, at 03:33 , Petit Eric wrote:
>
>> 2009/8/31 Danny Haak > >:
>>> Hi Glenn,
>>>
>>> My experience is that serial ports work using the same code in Windows
>>> and Linux - with the only change being the port name. Does your serial
>>> device need RTS/CTS lines? Are they set right? Is the timeout set
>>> correctly?
>> It is true i forget this , setting not always same, i suggest you to
>> write them, with same as the one under Windows(parity, speed, bit stop
>> , rts, end line )
>>>
>>> Best regards,
>>> Danny Haak
>>>
>
> 
>
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>   

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Serial Ports

2009-08-31 Thread Glenn R. Martin
Is this old documentation correct on the received data notification  
event not being implemented? and that polling has to be done still?


http://www.mono-project.com/HowToSystemIOPorts

Thanks
Glenn R. Martin

On 31 Aug 2009, at 03:33 , Petit Eric wrote:


2009/8/31 Danny Haak :

Hi Glenn,

My experience is that serial ports work using the same code in  
Windows
and Linux - with the only change being the port name. Does your  
serial

device need RTS/CTS lines? Are they set right? Is the timeout set
correctly?

It is true i forget this , setting not always same, i suggest you to
write them, with same as the one under Windows(parity, speed, bit stop
, rts, end line )


Best regards,
Danny Haak



___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Serial Ports

2009-08-31 Thread Petit Eric
2009/8/31 Danny Haak :
> Hi Glenn,
>
> My experience is that serial ports work using the same code in Windows
> and Linux - with the only change being the port name. Does your serial
> device need RTS/CTS lines? Are they set right? Is the timeout set
> correctly?
It is true i forget this , setting not always same, i suggest you to
write them, with same as the one under Windows(parity, speed, bit stop
, rts, end line )
>
> Best regards,
> Danny Haak
>
> -Original Message-
> From: mono-list-boun...@lists.ximian.com
> [mailto:mono-list-boun...@lists.ximian.com] On Behalf Of Glenn Martin
> Sent: maandag 31 augustus 2009 3:27
> To: mono-list@lists.ximian.com
> Subject: [Mono-list] Serial Ports
>
> We have a peice of code that is working without a hitch on windows.
> However on Mono (Ubuntu Jaunty; runtime 2.4) We get nothing. No
> exceptions, no errors but also its not connecting. Are there any
> settings or configuration options, any gotchas that i need to know when
> handling Serial ports on Mono on Linux? We have switched our code to use
> the ubuntu device name (/dev/ttyS1) and have verified the device exixts
> and works on that port, weve tested with PUTTY.
>
> Thanks
>
> Glenn R. Martin
> ___
> Mono-list maillist  -  mono-l...@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> ___
> Mono-list maillist  -  mono-l...@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>



-- 
Cordially.

Small Eric Quotations of the days:
---
I have no special talents. I am only passionately curious
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Serial Ports

2009-08-31 Thread Danny Haak
Hi Glenn,

My experience is that serial ports work using the same code in Windows
and Linux - with the only change being the port name. Does your serial
device need RTS/CTS lines? Are they set right? Is the timeout set
correctly? 

Best regards,
Danny Haak 

-Original Message-
From: mono-list-boun...@lists.ximian.com
[mailto:mono-list-boun...@lists.ximian.com] On Behalf Of Glenn Martin
Sent: maandag 31 augustus 2009 3:27
To: mono-list@lists.ximian.com
Subject: [Mono-list] Serial Ports

We have a peice of code that is working without a hitch on windows.
However on Mono (Ubuntu Jaunty; runtime 2.4) We get nothing. No
exceptions, no errors but also its not connecting. Are there any
settings or configuration options, any gotchas that i need to know when
handling Serial ports on Mono on Linux? We have switched our code to use
the ubuntu device name (/dev/ttyS1) and have verified the device exixts
and works on that port, weve tested with PUTTY.

Thanks

Glenn R. Martin
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Serial Ports

2009-08-31 Thread Petit Eric
You can use MonoDevelop with some useful breakpoint.
Alternatively, you can use the mono --trace option .
Here, i have Serial port working , connected to an industrial PLC

2009/8/31 Glenn Martin :
> We have a peice of code that is working without a hitch on windows. However 
> on Mono (Ubuntu Jaunty; runtime 2.4) We get nothing. No exceptions, no errors 
> but also its not connecting. Are there any settings or configuration options, 
> any gotchas that i need to know when handling Serial ports on Mono on Linux? 
> We have switched our code to use the ubuntu device name (/dev/ttyS1) and have 
> verified the device exixts and works on that port, weve tested with PUTTY.
>
> Thanks
>
> Glenn R. Martin
> ___
> Mono-list maillist  -  mono-l...@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>



-- 
Cordially.

Small Eric Quotations of the days:
---
I have no special talents. I am only passionately curious
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Serial Ports

2009-08-30 Thread Glenn Martin
We have a peice of code that is working without a hitch on windows. However on 
Mono (Ubuntu Jaunty; runtime 2.4) We get nothing. No exceptions, no errors but 
also its not connecting. Are there any settings or configuration options, any 
gotchas that i need to know when handling Serial ports on Mono on Linux? We 
have switched our code to use the ubuntu device name (/dev/ttyS1) and have 
verified the device exixts and works on that port, weve tested with PUTTY.

Thanks

Glenn R. Martin
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list