# DB9 Serial communication

I am getting some strange character displays on hyper terminal, after establishing communication with my GSM modem using the appropriate baud rate. When I type "AT", it appears to get repeated or display strange characters (as though the baud rate were not correct) on the hyper terminal screen as "AATT". And all other AT commands get repeated as well, but what surprises me is that they all respond to the command. "AATT"(having typed "AT") give me "OK".

What could possibly be the problem? I am connecting the Modem to the DB9 using a MAX232. Below is the response

øatt
OK
aaütø
OK
aatt++ücnnmmiiþ?ø
+CNMI: 1,0,0,0,0

OK
aattþ+ccssccss??ø
+CSCS: "UCS2"

OK

RING

RING

RING

NO CARRIER

øat++ücnnmmii==11<,22<,00,,00,,00ø

OK

aattþ+ccssccss==""GGêSMM""ø

OK

Øaüt++ccmmögæf==11ø

OK

aatt

OK

aaüt++ccþnmii??

+CNMI: 1,2,0,0,0

OK


• A suggestion. I thing ZOC Terminal is the best to works with modems. – Daniel Grillo Apr 13 '11 at 12:33
• @Ricardo - [at-commands] is a pretty young tag and there was a bunch of former question related to it. Sorry for giving you a lot of review job. – Bence Kaulics Jun 18 '15 at 14:39
• @Ricardo -Thanks, I will keep your advice in mind. On the other hand we should not talk about it here, but here. – Bence Kaulics Jun 18 '15 at 15:09

You have local echo turned on in your terminal emulator. Turn it off.

Alternatively, turn off echo on your modem:

ATE0

• I would opt for the former! – Dave Apr 13 '11 at 12:49
• @Dave I'd turn it off on the modem if I were writing an AT command parser in software. That way it can send "AT\n" and expect "OK", not expect "AT\nOK" – Toby Jaffey Apr 13 '11 at 13:24
• Ah, excellent point, I wasn't thinking it through all of the way and putting myself in the position of the modem. Thanks! – Dave Apr 13 '11 at 13:38
• Yea...i turned of the echo using ATE0, and the repetition stops. But how can we explain for the strange characters been displayed. Also, I am using a baud rate of 9600, but when I changed the baud rate to 115200, i did not experience this strange situation. Unfortunately, my intended application (in communicating with a micro controller) is designed to work for 9600. Finally, how can i turn off the echo of my terminal emulator? – Paul A. Apr 13 '11 at 14:23
• Please note: you should only use \r to terminate an AT command line (e.g. "AT\r"), neither \n not \r\n. See 5.2.1 Command line general format in V.250. – hlovdal Jun 18 '15 at 21:35

I was able to rectify the problem and totally avoided the repetitions. Simply use a 1k pull-up both at the TXD and RXD pins of the UART, to VCC. So all work with any baud rate. The problem was simply an issue with voltage levels.

Thanks to all who contributed!