SerialPort
-
Hi, I want to do simple thing but I can't and I'm confused. I want to send a simple at command to my modem. like atdt8889653
SerialPort s = new SerialPort("com3", 2400, Parity.None, 8, StopBits.One); try{ s.Open(); s.Write("atdt8889653"); ... } catch { ... }
but it seems it doesn't work because my modem doesn't call; my apps is win form I see this code http://www.dreamincode.net/forums/showtopic35775.htm[^] but it doesn't work. (I can connect to my modem via hyper terminal and type at commands and get correct responces) -
Hi, I want to do simple thing but I can't and I'm confused. I want to send a simple at command to my modem. like atdt8889653
SerialPort s = new SerialPort("com3", 2400, Parity.None, 8, StopBits.One); try{ s.Open(); s.Write("atdt8889653"); ... } catch { ... }
but it seems it doesn't work because my modem doesn't call; my apps is win form I see this code http://www.dreamincode.net/forums/showtopic35775.htm[^] but it doesn't work. (I can connect to my modem via hyper terminal and type at commands and get correct responces) -
Hi, I want to do simple thing but I can't and I'm confused. I want to send a simple at command to my modem. like atdt8889653
SerialPort s = new SerialPort("com3", 2400, Parity.None, 8, StopBits.One); try{ s.Open(); s.Write("atdt8889653"); ... } catch { ... }
but it seems it doesn't work because my modem doesn't call; my apps is win form I see this code http://www.dreamincode.net/forums/showtopic35775.htm[^] but it doesn't work. (I can connect to my modem via hyper terminal and type at commands and get correct responces)Hi, a wild guess: your modem needs hardware handshake, and you did not enable it for COM3. :)
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips: - before you ask a question here, search CodeProject, then Google; - the quality and detail of your question reflects on the effectiveness of the help you are likely to get; - use PRE tags to preserve formatting when showing multi-line code snippets.
-
Hi, Do you need to append a carriage return to your command strings? HyperTerminal would do this when you press the enter key. Alan.
Thanks a lot. Yes I must add carriage return to the end of the string (+"\r").