Arduino + SIM900 + read long sms

Hello. There is a code:

#include "SIM900.h"
 
#include <SoftwareSerial.h>
 
#include "sms.h"
 
SMSGSM sms;
 
char number[]="3921234567";
 
char message[500];
 
char pos;
 
char *p;
 
void setup()
 
{
 
 Serial.begin(9600);
 
 if (gsm.begin(2400))
 
   Serial.println("\nstatus=READY");
 
 else Serial.println("\nstatus=IDLE");
 
};
 
void loop()
 
{
 
 pos=sms.IsSMSPresent(SMS_UNREAD);
 
 Serial.println((int)pos);
 
 if((int)pos>0&&(int)pos<=20){
 
   Serial.print("NUOVO MESSAGGIO, POS=");
 
   Serial.println((int)pos);
 
   //message[0]='\0';
 
   sms.GetSMS((int)pos,number,message,1000);
 
 Serial.print("number: ");
 Serial.print(number);
 
 Serial.print("message: ");
 Serial.print(message);


char message [] = "";

   
   
 for (int i=0; i<=(int)pos; i++)
   sms.DeleteSMS(i);
 
 }
 
 delay(5000);
 
};

this code must println the sms of 500 bytes, but why is output circumcision part sms (132 bytes) and without

Serial.print("number: ");
Serial.print("message: ");

who faced a similar problem please tell me how to properly implement reading long sms?...
Thank you in advance for your help!

You could always try search for 'User Data Header'.

Wikipedia has quite a lot of information about SMS message structure.

char pos;

to index this array:

char message[500];

yeah, right!

Hi chiffacff

Have you tried the support forum at the website for the gsm library?

http://www.gsmlib.org/support.html

I 'm not sure if the type of variable "pos" is necessarily a problem, because I think it is used to index into a short table of SMS messages on the SIM card on the mobile phone, rather than indexing into the char array that gets the message.

Regards

Ray