Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: Send information to M5100B-D on: April 06, 2013, 05:22:57 pm
I have managed to piece this sketch together
Code:
#include <SoftwareSerial.h>
char incoming_char=0; //Will hold the incoming character from the Serial Port.
SoftwareSerial cell(2,3);
void setup()
{
  Serial.begin(9600);
  cell.begin(9600);
 Serial.println("Starting SM5100B Communication...");
 delay(35000); // give the GSM module time to initialise, locate network etc.
 // this delay time varies. Use example 26.1 sketch to measure the amount
 // of time from board reset to SIND: 4, then add five seconds just in case
}
void loop()
{
  cell.println("AT+CCED=0,2");
   //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.
 }
 delay(20000); // wait 20 seconds.
}
I believe this should work (not really) when I upload this and run the serial port the text prints into the serial port letter by letter with 20sec delay. What I need is for this part of the code
Quote
   //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.
 }
 delay(20000); // wait 20 seconds.
}


to be constantly looping while the other part at a much slower rate.

A loop in a loop? is this possible?
2  Using Arduino / Networking, Protocols, and Devices / Re: Send information to M5100B-D on: April 06, 2013, 01:28:42 pm
Quote
retrieve the information
When the command AT+CCED=0,2 is sent, a string of information is returned that gives information about Cellid, signal strength etc.
 
Code:
#include <SerialGSM.h>
#include
SerialGSM cell(2,3);
void setup()
{
 delay(30000); // wait for GSM module
 cell.begin(9600);
}
void sendSMS()
{
 cell.Verbose(true); // used for debugging
 cell.Boot();
 cell.FwdSMS2Serial();
 cell.Rcpt("+xxxxxxxxx"); // replace xxxxxxxxx with the recipient's cellular number
 cell.Message("Contents of your text message");
 cell.SendSMS();
}
void loop()
{
 sendSMS();
 do // remove this loop at your peril
 {
 delay(1);
 }
 while (1>0);
}
The tutorial I am using for reference with this uses the above code to send an SMS.
The tutorial can be found here: http://tronixstuff.wordpress.com/2011/01/19/tutorial-arduino-and-gsm-cellular-part-one/
3  Using Arduino / Networking, Protocols, and Devices / Send information to M5100B-D on: April 05, 2013, 08:27:03 pm
Hi All,
I not very familiar with the language and am having difficulty setting up my sketch so that the arduino will automatically send commands to the GSM shield without my manual input into two way serial port. I have been able to get the two way communication working to test using the following sketch:
Code:
#include <SoftwareSerial.h>
char incoming_char=0; //Will hold the incoming character from the Serial Port.
SoftwareSerial 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.
 }
}
What I would like to do is automate the input of the command "AT=CCED=0,2" retrieve the information and text the retrieved information to another location.

Any help would be greatly appreciated.

Regards,
4  Products / Arduino GSM Shield / Re: Arduino Uno with M5100B-D GSM Shield network connection on: April 04, 2013, 08:21:00 pm
Solved:
See http://arduino.cc/forum/index.php/topic,158163.0.html
5  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Uno with M5100B-D GSM Shield network connection on: April 04, 2013, 08:19:24 pm
Yea I tripple checked the connection smiley-razz but its a good thought and on the right track from my error. After a few more hours and an attempt with a SIM card from a different provider, I found that Virgin Mobile uses CDMA instead of GSM and therefore the SIM card is not recognized by the shield. The Rogers SIM card that I tired worked like a charm.
6  Products / Arduino GSM Shield / Arduino Uno with M5100B-D GSM Shield network connection on: April 04, 2013, 02:38:31 pm
Hi All.
This is bumped from the networking forum and I have added the updates.

I am new to working with Arduinos and prototyping and I am having difficulty with a project I have committed myself to. A bit of background: The project is intended to use my Arduino Uno with an GSM shield to triangulate location at frequent and repeating intervals. So far I have the hardware set up and working to a stage of two way communication between my computer and the shield. Upon activation I receive:

Starting SM5100B Communication...
...
+SIND: 0

+SIND: 10,"SM",0,"FD",0,"LD",0,"MC",0,"RC",0,"ME",0

+SIND: 8

After doing some research I have established that this means I am not properly connected to the cell tower network (makes sense, since I cannot retrieve information about the network or connected cellids). My attempt at a resolution was to change the frequency on which the shield was recieving by commanding:

AT+SBAND=9

This was intended to change the frequency to the correct range, given by my service provider. This has not proven successful and I am reaching out for help to anyone who may be more versed with this stuff. (so far I have been following the guidance prescribed at this blog: http://tronixstuff.wordpress.com/2011/01/19/tutorial-arduino-and-gsm-cellular-part-one/)


The hardware I have installed are listed below:
1. Arduino Uno
2. Spreadtrum communications INC. model number M5100B-D
3. an attached antenna,
4. 9V direct AC power supply
6. Vergin Mobile Sim Card LTE

Thank you for your help!!

- Jff-M

Update:

The connection +Sband: 0 indicates the sim card is not inserted. There is a connection error between my Vergin Mobile Sim card and the shield. Could anyone confirm this issue or a workaround?

Thanks
7  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Uno with M5100B-D GSM Shield network connection on: April 04, 2013, 02:31:53 pm
Update:

The connection +Sband: 0 indicates the sim card is not inserted. There is a connection error between my Vergin Mobile Sim card and the shield. Could anyone confirm this issue or a workaround?

Thanks
8  Using Arduino / Networking, Protocols, and Devices / Arduino Uno with M5100B-D GSM Shield network connection on: April 03, 2013, 11:02:11 am
Hi All.
I am new to working with Arduinos and prototyping and I am having difficulty with a project I have committed myself to. A bit of background: The project is intended to use my Arduino Uno with an GSM shield to triangulate location at frequent and repeating intervals. So far I have the hardware set up and working to a stage of two way communication between my computer and the shield. Upon activation I receive:

Starting SM5100B Communication...
...
+SIND: 0

+SIND: 10,"SM",0,"FD",0,"LD",0,"MC",0,"RC",0,"ME",0

+SIND: 8

After doing some research I have established that this means I am not properly connected to the cell tower network (makes sense, since I cannot retrieve information about the network or connected cellids). My attempt at a resolution was to change the frequency on which the shield was recieving by commanding:

AT+SBAND=9

This was intended to change the frequency to the correct range, given by my service provider. This has not proven successful and I am reaching out for help to anyone who may be more versed with this stuff. (so far I have been following the guidance prescribed at this blog: http://tronixstuff.wordpress.com/2011/01/19/tutorial-arduino-and-gsm-cellular-part-one/)


The hardware I have installed are listed below:
1. Arduino Uno
2. Spreadtrum communications INC. model number M5100B-D
3. an attached antenna,
4. 9V direct AC power supply
6. Vergin Mobile Sim Card LTE

Thank you for your help!!

- Jff-M
 
Pages: [1]