You are reading a single comment by @Hardware_Hacks and its replies. Click here to read the full conversation.
  • I've managed to get a couple of messages to come through based on the following code:

    Serial4.print('AT+CMGS=\"078177XXXXX\"\r')
    Serial4.print(msg + "\x1a")
    

    Where msg is just a string of text to test with.

    However it is hit or miss it seems whether a message sends. I get a SMS probably once every 4 or 5 restarts of the device and re-flashing with the code.

    I seem to be getting loads of garbled text coming back from the GSM module as I had in my first post. This seems to mess up the commands being sent also as sometimes if I send a command using Serial4.print("AT+blahcommand"); I then see in my terminal a mash e.g.:

    ÿ¬þ¾ÿÿ·ýÛÅ'ÿ翼†ïõ
    OK
    °ªþÿ€ÃÀþYg:K
    blèó@¨èÿ!’£æþ;AAT+CMGS="078177XXXXX"
    >
    

    I never sent "AAT+CMGS" I actually sent "AT+CMGS".

    Also the spurious data coming back is everywhere.. I've tried messing with the baud rates to no avail. Further example:

    |   __|___ ___ ___ _ _|_|___ ___ 
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v51 Copyright 2014 G.Williams
    >echo(0);
    GSM Starting..
    =undefined
    AT+CMGF=1
    >
    >
    OK
    >
    AT+IPR=2400
    >
    >
    OK
    >
    ü_ö’ÿþþ×÷ýŸÿŸºþéÞ¹}uæÏ×ÿÿožŸç»ãÔîwgò]¥wæ³×‰7½×:Åž¬^\mu£ê½Oð¯dX×ÿ¿°íÛþ®µ».ënýûWï÷ïíÿÿ÷ú?ÿöýæó¦øÿf*‘ëû¾¿ÿOÛ§ÿ½ÕýÞöçs«=öú÷»9¾¿GýËçüí•“ºÏ½ßÜËËÿöÿûWo?¾ÝŸýú>
    ýëÿÿ?Í¿}ÿßÿýÿ>
    Ïf;sÞ÷ÛßêôwAT+CMGS="07817XXXXXX"
    >
    >
    +CMS ERROR: 3765
    >
    ÿ®ÿŸ?÷¿ÿÿïþv_«¿ÏÛûvžùß}öûþ¿×­ßu÷ýø¹}¿ÿ»þ_ÿ¿YþýßýÎ}½ø›Ïï|úõÞÿ§¿¿Þº/_»ßçü¶ÿú_¿Ûiñ®”Þ]ßgÝõ~Û?ÿýo?}½ôþ~ûßgõÿûùß1á¿à§uù\û”íîö«ÉœþžUßë»ÿ·¼G˜7=ÝýþéöÕó^ñ“ã£mÆó=¾ø³å¸ŸÎ»Ö]móoÓj·æv3}ÿÃß$ùü}Æ_ó´÷ÎüS~tøÙíïÿ¢ŸeÛëØýfyóë´ùïûRßÃÿzb¿ÉÝów|}±=a_1ÛÊrðýùö3oço6ôPgÿY¶;?¸=3Ýÿÿ—ÖÿÛÙ²~óí/ûä¾Bo/Ÿî¸îÛûw{^÷/ÿåݟ„Vúïß¹AJçÞ)^½ùÍû~ï›öèùÖ³ÓÆAwÿ”¿Ï~˜øÿçåÝ?çÞèiZï_«®¿×Vüò_àøÏÛïë»:þ.íã?“½üÿÿ<ì=)ý‰Ëîÿëø~ßßÿ¿ùõËûsç÷ßÙ¡¿ößëéÿ›ž½ÿÛþÿ÷¿¿³÷ÿüÿ[ѯc¿âåíïúZï›ã]÷ÿ›íǘí¡õy=õŸø.«{ìŽçog©k:µï¶_õÈôÖ÷Ófªï¿Uµÿ¯×?ù3_þü/ïßÿ®ó»Ë¿ûÿï;??÷ÿ·ÿGëWz×ïiãú1·Htû“½ÝÿñÏßïß¼=œý?÷þõ?s¿êÿóíÓî‹ýúÅî9WWžæ6«ïʶð§ôüÏOºjæ|YTw-ÏßÛë¼Õ<ÇÔׅìùºY.—ü:Çß
    ERROR
    >
    

    That is using a low baud of 2400. I get similar issues with high baud. The lower baud however always results in the "ERROR" message, the higher bauds atleast register something but I still get the garbled outputs which means nothing.

    The parsing script I use for Serial4.ondata is:

    function handler(c){
      ms=ms+c;
      if (c=='\r' || c=="\n" || c==">"){
        console.log(ms);
        ms="";
      }
    }
    Serial4.onData(function (d) {handler(d.data);});
    

    Im attempting to pick up /n /r and > (which is returned when the GSM wants you to enter the SMS text).

    Sorry for the long and incoherent post but theres lots of small issues. I know the module is functioning at least as I have received text messages, saying that though the messages are also garbled e.g.

    "i@@@f@@?@y@@@@@test"

    It seems to be sending the messed up text and then appending my actual "test" message on the end.

About