SerialPort on a Thread

G

George Nentidis

Hi there all.
I have a problem with SerialPort that can't seem to find a solution for
a couple of days now.

I use the SerialPort to send AT commands to a modem.
Simple AT commands like ATE1, ATQ0 etc. and simple call.
Open the port, Send the AT command, read the response, close the port.
When I use SerialPort in an OnClick event of a button in a form
everything works fine.
When I use SerialPort from inside a thread in single processor system
everything still works fine.

When I use SerialPort from a thread in a 4 cpu server, sending to the
port seems to work fine, but no data ever come from it. The BytesInRead
property is always zero, and the DataReceived event never fires.
The same thing on the same server, works fine if called from a OnClick
event of a button in a form. That is when called from the application's
main thread.

Does anyone has any ideas?
Thank you all in advance
George
 
D

Dick Grier

Hi,

I think you need to report this as a possible bug on:
http://msdn.microsoft.com/vstudio/support/.

I do not have a multiple processor system, so I cannot confirm it. Sorry.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
D

Dick Grier

OK, thanks for reporting back.

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top