On 1/21/07, Victor Rocha <[EMAIL PROTECTED]> wrote:
Hello Carlos, Leszek

I got a "Serial Chat" example from the web, and modified it in order
to find what could be wrong with serial port. I noticed that
"ReadLine()" works ok, while "Read()" doesn't...

short explanation for the files attached:
- serialChat_ReadLine.cs: Just works fine!!! (uses the ReadLine() function)
- serialChat_Read.cs: Could not read anything from the port... (uses
the Read() function)

i also included files named as "xxx_nodetect.cs", which are same as
above, but port detection is commented-out (so it runs in windows).

I downloaded mono from SVN and patched it with this file from bugzilla:
http://bugzilla.ximian.com/showattachment.cgi?attach_id=18521

After patching and building, I still couldn't get Read() working....

Please could you test this at your computers? maybe I could be doing
something wrong, or maybe it's something with my system. If you can
succeed with byte reading, using these files, I'll just start again
from a "clean" linux installation...

thank you very much for your attention!!!

best regards
Victor Rocha
Florianopolis, Brazil




Hi all,

Well the problem is definitely not BSD-specific (as I have wrongly
suggested). On windows and linux, with your code (which is the example
from http://msdn2.microsoft.com/en-us/library/system.io.ports.serialport.aspx
, right?) I get the same problem as you did - ReadByte or
Read(byte[],..) throw Timeouts (after the timeout interval) instead of
reading available data. Strange thing is - I cannot replicate this bug
with smaller test case. There is something fishy with the code.

What's more - the same problem exists with MS.Net! So while it looks
like a bug, it is behaviour shared between mono and MS.Net.

Can someone else look into the attached examples?

--
MS-DOS user since 5.0
Windows user since 3.11
Linux user since kernel 2.4
Novell Netware user since 2.2
WARCRAFT user since 1.0

Attachment: serialChat_ReadLine.cs
Description: Binary data

Attachment: serialChat_Read.cs
Description: Binary data

Attachment: serialChat_ReadLine_nodetect.cs
Description: Binary data

Attachment: serialChat_Read_nodetect.cs
Description: Binary data

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to