Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?


Closed Thread
Results 1 to 18 of 18
  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    921

    Default Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    Hi All,

    I'm currently testing a SIM800L GSM module and have no probelm at all to make it work via my 18f2431 PIC.

    So, what's the problem?

    In fact, I want to make this module work also via the Serial Comunicator from Mecanique but this seems just not possible.

    Here is an example of a SMS message I want to send:

    working with PIC: SEROUT PORTB.4,2,["AT+CMGS=",34,"+4179xxxxxx",34,10,"Hello Roger",26,10,13]

    not working with serial com: "AT+CMGS="+4179xxxxxxx",10,"Hello Roger",26

    Going back to basics, when I send a simple AT command and set the Serial Communicator to add a CR terminator, it will work.

    If I select "no terminator" and try it like this AT,13 , nothing will happen.

    How is the CR generated in the Serial Communicator? Does anyone know?
    Roger

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,993

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    When you type AT 13 (without the comma), the terminal will send 4 sequence of the ASCII equivalent (in decimal): 65 84 49 51. This is not what you want, right?

    You want the number 13 be sent, not the 49 ('1') and 51 ('3').

    Hope this helps,
    Ioannis

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,515

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    "AT+CMGS="+4179xxxxxxx",#10,"Hello Roger",#26


    or

    "AT+CMGS="+4179xxxxxxx",$A,"Hello Roger",$1A

    Name:  sertoo.jpg
Views: 4291
Size:  90.8 KB
    Warning I'm not a teacher

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,993

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    To add on Richard's post, if you insist on using the Serial Communicator, Help says this:

    Parse Control Characters

    When enabled, the parse control characters option enables you to send control characters in your message, using either a decimal or hexadecimal notation. For example, if you want to send hello world followed by a carriage return and line feed character, you would use hello world#13#10 for decimal, or hello world$D$A for hex. Only numbers in the range 0 to 255 will be converted. For example, sending the message letter #9712345 will be interpreted as letter a12345.

    If the sequence of characters does not form a legal number, the sequence is interpreted as normal characters. For example, hello world#here I am. If you don't want characters to be interpreted as a control sequence, but rather send it as normal characters, then all you need to do is use the tilda symbol (~). For example, letter ~#9712345 would be sent as letter #9712345.


    Ioannis

  5. #5
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    921

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    Thanks guys,

    I knew it, I knew it!!!

    I should have read the communicator's help again - did it a few years ago but forgot the "hash" story... my bad :-\

    Thanks again...
    Roger

  6. #6
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    921

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    Quote Originally Posted by Ioannis View Post
    When you type AT 13 (without the comma), the terminal will send 4 sequence of the ASCII equivalent (in decimal): 65 84 49 51. This is not what you want, right?

    You want the number 13 be sent, not the 49 ('1') and 51 ('3')....
    Thanks Ioannis for this good lesson. I effectively didn't realize that I was sending those "four individual" characters one-by-one.

    Have a nice day
    Roger

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,993

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    You are welcome!

    Ioannis

  8. #8
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    921

    Default Testing a SIM800L GSM module via Mecanique's Serial Communicator

    Quote Originally Posted by richard View Post
    "AT+CMGS="+4179xxxxxxx",#10,"Hello Roger",#26
    Actually, the working syntax in the Serial Communicator is: AT+CMGS="+4179xxxxxxx"#10"Hello Roger"#26

    Thanks Richard for your help

    BTW, one of the AT commands manual I could find in the WEB says:

    Name:  CmdAT.png
Views: 4157
Size:  96.5 KB

    Using the SIM800L GSM module, according to the "AT data sheet" () I should have used a CR after the phone number. But by chance, I discovered that only a LF would work. Is it a typo or something wrong with my module, I don't know; fact is CR = NO, LF = YES!!!!
    Roger

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,993

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    I never faced such a problem with SIMcom modules.

    CR is the necessary for line or command termination. LF does not that...

    Are absolutely sure you send out LF instead of CR?

    Ioannis

  10. #10
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    921

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    Ioannis,

    This is really strange, yes. It took me hours to find out that there was something strange.

    But actually, to make it work, I use:

    working with PIC: SEROUT PORTB.4,2,["AT+CMGS=",34,"+4179xxxxxx",34,10,"Hello Roger",26,10,13]

    working with serial com: AT+CMGS="+4179xxxxxxx"#10"Hello Roger"#26

    If I replace the 10 or #10 by a 13 or #13, it will not work anymore.

    Nope, no idea what's wrong but "yes", I'm sure I use LF instead of CR.
    Roger

  11. #11
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    921

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    Sure is sure so I just checked again.

    See whats happens with CR instead of LF:

    Name:  GSM CR.png
Views: 4768
Size:  7.0 KB
    Roger

  12. #12
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,993

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    Do you have other terminal program to test? My suspicions fall on MCSP serial communicator.

    Ioannis

  13. #13
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    921

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    I'll give it a try with PUTTY and HYPERTERMINAL although I don't know how to send control characters with those programs too

    But why would it be the problem of my serial program since I need to do the same when I use the PIC?

    working with PIC: SEROUT PORTB.4,2,["AT+CMGS=",34,"+4179xxxxxx",34,10,"Hello Roger",26,10,13]

    As you can see, here too I need to use a Line Feed instead of a Carriage Return !?
    Roger

  14. #14
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,993

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    You are right.I missed that.

    Well, I don't know what is wrong. I remember once, was testing on a SIM900 module with no problems on this. Sure a CR was needed to terminate the command.

    For a couple of days I'll be out of town. On my return I will find it and give it a test again.

    Ioannis

  15. #15
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    921

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    My module's firmware is Revision:1418B02SIM800L24
    Roger

  16. #16
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    921

    Default Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    ...and this the exact module I'm using.

    Name:  SIM800L Module Replace SIM900A GSM GPRS 5V Serial-1-550x550.jpg
Views: 4122
Size:  48.9 KB
    Roger

  17. #17
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,993

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    Finally I found the module and time to test the SIM900 board.

    Unfortunatelly, while on Power up the module sends what is expected to send, it does not respond to the commands I send.

    Tried any combination but failed to reply back...

    Sorry but could not help.

    Ioannis

  18. #18
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    921

    Default Re: Testing a GSM module via Mecanique's Serial Communicator - "terminator" issue?

    Thank you Ioannis.

    I'm awaiting a SIM5360EVB and I will try again if the LF or CR makes the difference.
    Roger

Similar Threads

  1. Replies: 0
    Last Post: - 14th November 2013, 04:32
  2. Replies: 3
    Last Post: - 15th October 2012, 09:06
  3. "symbol not previously defined" on 16F1933 - fuse issue i think
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd January 2011, 04:24
  4. sending string to module GSM with character ""
    By volcane in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd May 2010, 03:26
  5. 16F88 - AD converter module always "ON"
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th September 2006, 13:11

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts