Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SIM800L Blank SMS issue

I am using a SIM800L module with a Texas Instrument Launchpad, with a MSP430G2553 microcontroller, not using an external library for SIM800L.

Problem Statement: A Simple text message (SMS with Text Mode) is sent, received as a blank message on cellphone.

SIM details:

1. SIM 1 : Location: India. Operator: AirTel, 4G compatible SIM Card.
2. SIM 2 : Location: India. Operator: Tata Docomo, 3G compatible SIM card.

What I know already:

  • UART Drivers in firmware are tested and working, non-polling, interrupt driven.
  • No blocking time delays added as a substitute to read responses of AT commands. I read the response and proceed only if positive acknowledgement is received, <CR><LF>OK<CR><LF> for most of the commands.
  • I have confirmed the data bits transmitted and received on Tx-Rx pins by means of an oscilloscope. Everything seems as expected, including voltage levels.

What I have read:

  • Some speculation through unofficial sources (Of course forums) that SIM800L is only 2G compatible.

  • (Shallow reading from wikipedia) I have read through GSM 3.38 and GSM 3.40, and the Data Coding Scheme section for understanding how the encoding of text is handled in suited/relevant AT command (AT+CSMP).

  • Various forums including the ones for arduino with which SIM800L modules are very popularly used.

Related posts on Stackoverflow:

  • Recieving Blank SMS SIM800 using AT Commands and Python on Raspberry Pi 2
  • How to send SMS with GSM module SIM800 and Arduino Uno?
  • Sending GSM Character Set in SMS with SIM800L Module

The answer in the first one seemed to have worked for him, it didn't work for me.

What have I tried:

  • I have used the same module with an instance of Docklight serial terminal. SMS sent from Docklight are received on my cellphone and appear as expected, not blank.

  • On day 0, before integrating module with Launchpad hardware, I have tested the overall firmware state machine with exact copy of expected responses from SIM800L.

  • The results for both the SIM cards are same, except for some of the initial configurations, but I load a typical set of configuration in both of them before I initiate any SMS related task.

Typical values that I use are:

  • Echo Off
  • CSMP: 17, 167, 0, 0 (I have tried 17, 167, 0, 0, but no luck). Default from SIM 1 is 17,11,0,246, and that from SIM 2 is 17, 255, 0, 0.
  • CSCS: "IRA"

Failed combinations on serial port: (SIM 1 and SIM 2)

  • CSMP: 17, 11, 0, 246 | CSCS: "IRA" - Sends a blank SMS
  • CSMP: 17, 11, 0, 246 | CSCS: "GSM" - Sends a blank SMS
  • CSMP: 17, 11, 0, 246 | CSCS: "HEX" - Sends a blank SMS

Successful combinations on serial port: (SIM 1 and SIM 2)

  • CSMP: 17, 167, 0, 0 | CSCS: "IRA"
  • CSMP: 17, 167, 0, 8 | CSCS: "IRA"
  • CSMP: 17, 11, 0, 0 | CSCS: "GSM"
  • CSMP: 17, 167, 0, 0 | CSCS: "GSM"
  • CSMP: 17, 167, 0, 8 | CSCS: "GSM"

To be honest, I played hunch with these combinations before I studied what field reflects what change these combinations (which are poorly documented in the SIM800L User guide).


Any idea what I might be missing here? I am open to thinking that it is more of a RTFM (Read The Fat Manual) issue.

like image 766
WedaPashi Avatar asked Nov 30 '17 15:11

WedaPashi


1 Answers

Ok, managed to resolve the issue.

It was not about the SIM800L at all. The whole payload was followed by a '\0' which is unexpected (I know, very poor on my side). The serial term has no issues with it whatsoever. Debugging was fun!

like image 180
3 revs Avatar answered Sep 17 '22 10:09

3 revs