brad wrote:You could then make an iphone or android app where you could have a nice touch interface which would generate a text message and send it for you.
Now your talking Brad, great idea!
Some
important thing's I thought I would share with these SM5100 GSM module's.
* The GSM shield only works with “2G” GSM mobile networks operating on the 850, 900 and PCS1800 MHz frequencies.
◦ Australians – can use any carrier’s SIM card, except for “Three”.
◦ Canadians – this doesn’t work with Sasktel.
◦ North Americans – check with your cellular carrier first if you can use third-party hardware (i.e. the shield).
◦ United Kingdom - (T-Mobile and Orange) use a standard known as GSM1800, (O2 and Vodafone) use a standard known as GSM900.
Some of the info above is just what I have found on the internet, you may need to double check with your network for your country.
As I am from the UK I have a working GSM sheild using the 02 network..
* You will also require a GSM antenna for the shield. One can be found here
Quad-band Cellular Duck Antenna SMA

- antenna.png (22.38 KiB) Viewed 37085 times
I also found out while using the Shield with Firewing that the GSM shield needed more power (current) when it was transmitting. Which I have purchased from
DF-Robot Power Shield
The GSM shield can draw upto 2amps while transmitting (ref datasheet), this CAN NOT be done using just the USB connection to the Firewing/Arduino board. You will also require a power supply which can supply 2amps, In my case I have used a 9v (2amp) mains power supply.
I have configured the power board jumpers so that Output control and Output detection jumpers are removed, while the Input power selection jumpers are set to PWRIN.. If using the Firewing board you will also need to connect the power supply Input 9v to the VIN pin on the board with a connector wire, this is where the GSM shield regulator gets it power from.
Very Important - Set the power board output voltage to 5v, ignore the led voltage indicators as I have found this to be incorrect!. Use a multimeter to set the output voltage.

- DF Robot Power Shield
- pin%20out%20diagram.jpg (166.73 KiB) Viewed 37085 times
I have put a small comms programme together for firewing which can be used to send GSM AT commands to the GSM shield. It uses both firewing Uarts, one for a serial comms and the other which communicates to the GSM shield.
You can find the commands in the following PDF file:
Code: Select all
' import Uart modules...
imports Uart
imports Uart2
' main program entry point...
Sub Main()
Uart.SetBaudrate(Uart.Baudrate.Is38400)
Uart2.SetBaudrate(Uart2.Baudrate.Is9600)
Uart.ReadTerminator = 13
dim command as string
while true
if Uart.DataAvailable then
Uart.Read(command)
Uart2.Write(command,13,10)
'Uart.Write(command,13,10)
end if
if Uart2.DataAvailable then
Uart.WriteByte(Uart2.ReadByte())
end if
end while
End Sub
With everything connected and running with the code above on a firewing board, and with a serial comms connected to the board (firewing/swordfish serial comms not supported) you can try this Terminal prog
com port development tool, Ensure the settings are 9600, 8, N, 1. you should be presented with the following:
+SIND: 1
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"ME",1
+SIND: 11
+SIND: 3
+SIND: 4
It will take around 15 to 30 secs for the text above to appear in full.
What you are being presented with is a log of the GSM module’s actions. But what do they all mean?
◦+SIND: 1 means the SIM card has been inserted.
◦+SIND: 10 - line shows the status of the in-module phone book.
◦+SIND: 11 means the module has registered with the cellular network.
◦+SIND: 3 means the module is partially ready to communicate.
◦+SIND: 4 means the module is fully ready to communicate.
If you have all of the above then we are ready to communicate with the GSM module..
So now we can check that the gsm shield is fully ready, lets try ringing the shield?
Pick up a phone and call it, ring the gsm shield twice and hang up, as the gsm shield rings check out the serial comms window, you shouled be presented with something like this:
RING
+CLIP: "XXXXXXXXXX",129
RING
+CLIP: "XXXXXXXXXX",129
NO CARRIER
+SIND: 6,1
The "XXXXXXXXXX" should be the callers ID number (mobile number). Now that we know the gsm module is fully working.
time to have some more fun!
Here's an example code using Arduino:
Code: Select all
#include <SoftwareSerial.h> // Virtual serial port
SoftwareSerial cell(2,3);
char incoming_char = 0;
void setup()
{
//Initialize serial ports for communication.
Serial.begin(9600);
delay(25000);
cell.begin(9600);
Serial.println("Starting SM5100B Communication...");
}
void loop(){
//If a character comes in from the cellular module...
if( cell.available() > 0 ){
//Get the character from the cellular serial port.
incoming_char = cell.read();
//Print the incoming character to the terminal.
Serial.print(incoming_char);
}
//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 hope someone finds this useful
