Uncategorized

SIM900 chat notes

Q: SIM900 A6 GPRS GSM Module and Rpi4B UART Communication Problem

OrestoI use a module same as here with my RPI 4B and there were difficulties in communication between them two since the start. The module worked fine with my Arduino. It is connected via Rxd-Txd pins, 5V, ground and an additional external power to the module. I’m trying to make it make calls with the…

tlfong01

tlfong01
2299
Hi Oresto, Welcome and nice to meet you. Congratulation to your happily getting a mysterious reply to your blind AT command. Your interesting story with Arduino implies all SIM 900 hardware/firmware go well. I think it is only the Rpi4B UART SIM900 teething problem that is slightly disturbing. So let us start with this wield guy “␄␐␁␀ (EOT DLE SOH NUL)”
I agree that you are a blind guy, blindly typing the “hello there?” command “AT”, though smartly expecting the correct reply “OK”. I think you are over ambitious or jumping start too high to start with a python test program. Usually I warn and recommend newbies to start from the very beginning, using a terminal emulator, checking out Rpi RxD TxD wiring by using the “loopback” test. But for the impatient newbie anxiously wanting a short cut answer, perhaps we go directly attack the weild SIM900 reply “EOT DLE SOH NUL”.
I need a couple of minutes to read the friendly user guide of the A6 SIM900 thing. In the mean time, I would suggest the impatient newbie, while waiting anxiously, kill his time by reading the following tutorial, explaining what the hell is “loopboack” test, and how to use a “teriminal emulator” to do the job “: Serial Port Debugging 101 : Loopback Test – Amita Singh Chauhan 2016dec07 medium.com/@amitasinghchauhan/…. Happy reading and cheers!
Now let us wiki to get to know the control characters EOT, DLE, SOH, NUL: Control Character – Wikipedia en.wikipedia.org/wiki/Control_character EOT – End of transmission, EOT, ^D, Code 4, used to end text input or to exit a Unix shell. These uses usually have little to do with their use when they are in text being output, and on modern systems usually do not involve the transmission of the code number at all (instead the program gets the fact that the user is holding down the Ctrl key and pushing the key marked with a ‘C’). / to continue, …
DLE – Data link escape character was intended to be a signal to the other end of a data link that the following character is a control character such as STX or ETX. For example a packet may be structured in the following way (DLE) <STX> <PAYLOAD> (DLE) <ETX>. / to continue, …
SOH – Start of heading character was to mark a non-data section of a data stream—the part of a stream containing addresses and other housekeeping data. The start of text character (STX) marked the end of the header, and the start of the textual part of a stream. The end of text character (ETX) marked the end of the data of a message. / top continue, …
NUL – NUL, is a special case. In paper tape, it is the case when there are no holes. It is convenient to treat this as a fill character with no meaning otherwise. Since the position of a NUL character has no holes punched, it can be replaced with any other character at a later time, so it was typically used to reserve space, either for correcting errors or for inserting information that would be available at a later time or in another place. In computing it is often used for padding in fixed length records and more commonly, to mark the end of a string. / to continue, …
Now that we know the meaning of the control commands, it is time to read the friendly manual and see how to sent command “AT”, and why we get the weird raply: ” EOT DLE SOH NUL”: “SIM900 AT Command Mode V1.11 – SimCom” simcom.ee/documents/SIM900/….
I read the SIM900 manual to see how they send the AT commands, especially how they end the AT command with which control characters. The reply from SIMS900 seems to say something like End of Text, Null, Datalink control code, Start of Header etc. So I need to read closedly that part of the manual. Anyway, I am looking at the control char chart to refresh my memory: imgur.com/gallery/sRGiHJG.
9 hours later…
tlfong01

tlfong01
2299
16:13
I read the SIM900 User Guide that says the basic AT command is ended by <CR> So you need to check if your python script or minicom terminal command is ended by <CR>. I also remember that earlier SIM800 questions also have corrupted response problem. I need to read those posts to refresh my memory: SIM800 UART Serial Corrupted Response Problem
raspberrypi.stackexchange.com/…

SIM800 GSM Module To Raspberry Pi UART Serial Communication Problem
raspberrypi.stackexchange.com/…

.END

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s