Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get long sms #105

Open
GoogleCodeExporter opened this issue Mar 20, 2015 · 0 comments
Open

get long sms #105

GoogleCodeExporter opened this issue Mar 20, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Hello. I have some problems with getting sms. I get messages in DOS encoding, 
like:

0065004800680034004A0054004E0043004E005400410075004E005400410033004E006A0067006C
004D00300049007

A004D004300340031004F00540051007A004D0

it's not a problem to decode it using table:
http://www.tachyonsoft.com/cp00866.htm

BUT i can't read all sms, it's println only first 133 bytes. but i know that it 
must be more. I use code from example:

    #include "SIM900.h"
    #include <SoftwareSerial.h>
    //If not used, is better to exclude the HTTP library,
    //for RAM saving.
    //If your sketch reboots itself proprably you have finished,
    //your memory available.
    //#include "inetGSM.h"

    //If you want to use the Arduino functions to manage SMS, uncomment the lines below.
    #include "sms.h"
    SMSGSM sms;

    //To change pins for Software Serial, use the two lines in GSM.cpp.

    //GSM Shield for Arduino
    //www.open-electronics.org
    //this code is based on the example of Arduino Labs.

    //Simple sketch to send and receive SMS.

    int numdata;
    boolean started=false;
    char smsbuffer[500];
    char n[20];

    void setup()
    {
      //Serial connection.
      Serial.begin(9600);
      Serial.println("GSM Shield testing.");
      //Start configuration of shield with baudrate.
      //For http uses is raccomanded to use 4800 or slower.
      if (gsm.begin(2400)){
        Serial.println("\nstatus=READY");
        started=true; 
      }
      else Serial.println("\nstatus=IDLE");

      if(started){
        //Enable this two lines if you want to send an SMS.
        //if (sms.SendSMS("3471234567", "Arduino SMS"))
          //Serial.println("\nSMS sent OK");
      }

    };

    void loop()
    {
      if(started){
        //Read if there are messages on SIM card and print them.
        if(gsm.readSMS(smsbuffer, 500, n, 20))
        {
          Serial.println(n);
          Serial.println(smsbuffer);
        }
        delay(1000);
      }
    };

Original issue reported on code.google.com by [email protected] on 7 May 2014 at 7:43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant