[Mono-list] TimeoutException on SerialPort (mono 2.0)

Brandon Perry bperry.volatile at gmail.com
Thu Dec 18 17:34:36 EST 2008


Does the VM have access to the serial port?

On Thu, Dec 18, 2008 at 4:31 PM, eyanson <eyanson at gmail.com> wrote:

>
> I found the problem, but I dont understant the real problem.
>
> In the sample on "http://www.mono-project.com/HowToSystemIOPorts"
> exist it code:
>
> while (tmpByte != 255) {
>      rxString += ((char) tmpByte);
>      tmpByte = (byte) mySerial.ReadByte();
> }
>
> The problem is that spect a byte with 255 but the modem never send a 255.
> The sample is incorrect or I have antoher problem??????
>
> thanks !!!!
>
>
>
> eyanson wrote:
> >
> > I tested this sample: http://www.mono-project.com/HowToSystemIOPorts
> >
> > but I get this error:
> >
> > Unhandled Exception: System.TimeoutException: The operation has
> timed-out.
> >   at System.IO.Ports.SerialPortStream.Read (System.Byte[] buffer, Int32
> > offset, Int32 count) [0x00000]
> >   at System.IO.Ports.SerialPort.read_byte () [0x00000]
> >   at System.IO.Ports.SerialPort.ReadByte () [0x00000]
> >   at (wrapper remoting-invoke-with-check)
> > System.IO.Ports.SerialPort:ReadByte ()
> >   at SerialPortTest.ReadData () [0x00000]
> >   at SerialPortTest.Test () [0x00000]
> >   at SerialPortTest.Main (System.String[] args) [0x00000]
> >
> > I have: openSUSE 11.0 on VMWare WS ACE Edition 6.0.2 hosted on Windows
> > Vista
> >
> > Mono version is 2.0
> >
> > --> In Visual Studio on Windows work fine.
> >
> > What is the problem??
> > thanks
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/TimeoutException-on-SerialPort-%28mono-2.0%29-tp21026719p21082218.html
> Sent from the Mono - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>



-- 
http://www.volatileminds.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20081218/bd17d007/attachment-0001.html 


More information about the Mono-list mailing list