Archived

This topic is now archived and is closed to further replies.

dummybert

Serial communications with a modem

Recommended Posts

Hi! As a first test I''m doing a program that sends chars over the serial com to manage a modem that is plugged to it (I want to control it directly with Hayes AT commands). I have studied the reference in the Microsoft manuals about ''Serial Communications'' and I''ve decided to use non-overlapped writting/reading and have two threads (one for writting, one for reading). The problem I have is that the modem doesn''t answer any char I send. I know that I''m sending characters ''cause I''ve connected two PC''s through serial port and I''ve checked that the chars are really sent, besides the modem RD light blows when I send something. I think that the problem lies on the "dcb" configuration of the serial port, or even in the flow control with the modem. I have tried disabling the flow control and setting de DTR line to 1, but it still doesn''t work. Do you have any idea of what can be wrong? Thanx in advance.

Share this post


Link to post
Share on other sites
It could be a ton of things. You need to make sure you comm timeouts are setup the way you want, so look at SetCommTimeouts. I''d suggest getting a comm application you know works (WCOM comes to mind), running it, then after quitting call all the "Get" comm functions to see how it left the com port.

Share this post


Link to post
Share on other sites
I''m no modem guru, but I know you usually have to send it AT or ATA to wake it up before itlll recieve any other commands. Since you''ve gone through the manuals and so forth though, I''m guessing you''ve already tried that and thats what its not responding to.

Share this post


Link to post
Share on other sites