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ßë­»ÿ·¼G7=ÝýþéöÕó^ñã£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