You are reading a single comment by @Hardware_Hacks and its replies. Click here to read the full conversation.
  • Hi All,

    I'm a bit stuck when trying to send a text message via my GSM2 Click device which uses the M95 chip.

    I have the module accepting AT commands through Serial4 however I really can't get the syntax working correctly to send a SMS message sucesfully.

    I can carry out the following commands:

    I firstly set the chip to Text Mode:

    >Serial4.println("AT+CMGF=1"); 
    =undefined 
    �AT+CMGF=1
    

    I then set the number to send the SMS to (I have added in the xxx's for anonymity)

    >Serial4.println("AT+CMGS=\"078177xxxxx\"");
    =undefined
    uAT+CMGS="078177xxxxx"
    
    > ���+���������r�:ֿ�{�m�I���}Δ�{�ϧ�uI�m�C��_o��������u�ݵ��Ͽ�+�����+ɷ�������{�x�>_E�w���������Y�+>����ጒ���v?�7�흶i��q~��&��|�{-����nzn�����{��Jo��]��}v�!>�+������Mx����w��u��sC+M��������NAWޘ+~��w�B������l
    
    U������M��{�D�������Uj���/ػa�k����}?�r���d�,5�#۝��C����y�$~nޯ���}�������������|k��ױw�+߿�n��moP�ַ��������3�w����=�4���U���/���������(w{�X�����^
    
    ����z�U��^�����\�O�־�����5������aוl����.Vݽ�E=�����ξa�b�'��{��?n���j�
                                                                            }��g�����ս�������3E�a��Re}��ݘޙj�zO�Ӧ��7��}��^����'��w^������e����q;��m�������l~��^��y����~����Î�������~�o���!{�������y��ͽoo�ck�yM��.�}���L���߳C�}���<w���K�w������|��gn��巹9��w���w��{��������u�v������k��{G��x?�����k����{��ݟ���|��K��������d������߿��������������߻9n�������Y{?����f����ge�E�g�Ƛ�������}Y���FV�}��_(��g�~�?��������(�������$������|���*y����?�>����o��
                      ����������{����{���k�[z��^m����گ���/��=ߞ�����݀[��k�u����{���o��C��/�7���&z����?����]�׃���~�������{��{��~?��z���~g�f��
    
    �����b������W�nag����l�JgO�O{ۼ�����^���v}n�r?Ϸ��7��˸�v������w�w���'���7�|L��}�o�}�no}��������������D���?�����k��L�����:O���퇻����].ߏ��������x��������-���]�>�9���g_oKӯ����q�
    
    ����������~>K�Kl���>�����~��k����+�m���������U뿶"�������W���?ۿ{�=_ˣ�w�ׯ����~'���mn��U��o��u峣���w��V����}���ߞ�_�������ݥ7��
                                                                                                                                    ����������e���]i��b���{ϟ_|��'�j|{no��o�}~��<����v~���޶��{����¯����M���~��6�����������ׯ�Ǯ����������u����B����?0���|����'�ݼ��߷�����s�����g?S�WЏ���5ڣ���
                                                                                                                                             �����:��v�w���������W�ᆵ�7�3��������ۺ���??�����ϳ���}��~���������������ۻW����5
    
    OK
    

    As you can see there is a lot of garbled characters but the output is an "OK" at the end.

    I then assume that the Serial4 is sat at the ">" prompt where I would then enter the text for the text message so I go ahead with the following command:

    >Serial4.println("testing a sms message");
    =undefined
    

    From here I know I need to send a CTRL+Z character at the prompt to send the message so I carry out the following:

    >Serial4.write(0x1A);
    =undefined
    

    However.. I receive nothing. I would expect to see an ID number pop up and the message to go through to my phone.

    Any ideas where I am going wrong here I've been messing around with all the variants I can think of - changing the Serial.write to print and print to println with no luck.

About