Go Down

Topic: A6 GSM shield on Arduino missing SMS (Read 483 times) previous topic - next topic

Fuksen

With the below code for receiving SMS and the exact same connection to Arduino Nano, I am testing A6 and SIM900 modules. Both modules deliver full SMS message on the serial port to Nano.
Problem: With A6 connected to the Nano, the software serial port do not include the SMS message BUT include +CIEV?
(With SIM900 connected to the Nano, the software serial include the SMS message).

An AT+CMER=? test of both GSM modules shows a (maby important) differences:
A6 module. +CMER=0,0,0,0,0
SIM900. +CMER=3,0,0,2
The A6 module do not allow changing the values of +CMER!
This is the programme sketch:
Code: [Select]

#include <SoftwareSerial.h>

//Create software serial object to communicate with A6
SoftwareSerial mySerial(3,2); //A6 Tx & Rx is connected to Arduino #3 & #2

void setup()
{
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(19200);
 
  //Begin serial communication with Arduino and A6
  mySerial.begin(19200);

  Serial.println("Initializing...");
  delay(1000);

  mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
  updateSerial();
 
  mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
  updateSerial();
  mySerial.println("AT+CNMI=1,2,0,0,0\r"); // Decides how newly arrived SMS messages should be handled
  updateSerial();
}

void loop()
{
  updateSerial();
}

void updateSerial()
{
  delay(500);
  while (Serial.available())
  {
    mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
  }
   
  while(mySerial.available()>0)
  {
    Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
   
  }
 
   
}


The test setup is standard, but it appears that the lenght of the data stream to be handled by Arduino, have somme influence.
Can some boddy help ??????

Fuksen

SOLVED
By changing the SoftwareSerial.h file allocated buffer from 64 bytes to 256 bytes, the SMS message passes Arduino perfekt. Guess this problem must be delt with whenever the A6 module is used, because of a too long Header to the SMS, that cannot be egnored.

Go Up