Hi robtillaart,
thanks for offering to help. Here is my Arduino code (cut and paste from the tutorial) I didn't make any changes:
The mobile is a siemen a60
/* SparkFun Cellular Shield - Pass-Through Sample Sketch
SparkFun Electronics Written by Ryan Owens CC by v3.0 3/8/10
Thanks to Ryan Owens and Sparkfun for sketch */
#include <NewSoftSerial.h> //Include the NewSoftSerial library to send serial commands to the cellular module.
#include <string.h> //Used for string manipulations
char incoming_char=0; //Will hold the incoming character from the Serial Port.
NewSoftSerial cell(2,3); //Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin.
void setup()
{
//Initialize serial ports for communication.
Serial.begin(9600);
cell.begin(9600);
Serial.println("Starting SM5100B Communication...");
}
void loop()
{
//If a character comes in from the cellular module...
if(cell.available() >0)
{
incoming_char=cell.read(); //Get the character from the cellular serial port.
Serial.print(incoming_char); //Print the incoming character to the terminal.
}
//If a character is coming from the terminal to the Arduino...
if(Serial.available() >0)
{
incoming_char=Serial.read(); //Get the character coming from the terminal
cell.print(incoming_char); //Send the character to the cellular module.
}
}
I am using Terminal v1.9b with same baud rate as the sketch to send AT commands. Communication basically works. I can send make a voice call using ATD;
I can interogate the phone by AT commands also eg it tells me only PDU sms is available.
I want to send sms messages so I used a tool to translate my English message into PDU "hello world!" sent from 07790961101 to 07510189479.
The tool comes up with this:
AT+CMGS=25 079270976069111011000B927015109874F90000AA0CC8329BFD065DDF72363904
So next I put in AT+CMGS to the terminal and press send with the box also ticked.
Reply is:
AT+CMGS=25
>
then I put in the PDU part with a ctrl-z at end (#026#)
ie:
AT+CMGS=25
>079270976069111011000B927015109874F90000AA0CC8329BFD065DDF72363904#026#
then send
the reply is:
> Ýå’º‚ʺ²‚²ÊŠŠ‚Šþ‚ʺ‚ŠŠ‚ʺ¢2Ê‚‚(§LQ¢˜65DDF72363904#013
ERROR
A mixture of strange characters. The funny thing is it returns different ones on almost every attempt.
I was expecting something like:
CMGS
079270976069111011000B927015109874F90000AA0CC8329BFD065DDF72363904
OK
and an SMS arriving later at the destination phone on my desk.
I have also tried writing the #026# as just and <ctrl+z>, none of those work either.
Using the appropriate AT command I can retrieve PDU sms from the phone to the terminal and when I convert the encoded message
back I get the right result in the PDU conversion tool.
Cheers