Pages: [1]   Go Down
Author Topic: how to use Cellular Shield with SM5100B  (Read 8610 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have this shield(http://www.sparkfun.com/commerce/product_info.php?products_id=9607).I new to this...all I want to do is send a simple text message...any help?Also if possible, turn the module on when I text it the number "1" or anything.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
Making positive ground
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This sequence sends a text message;

Serial.println("at+cmgf=1");
Serial.println("at+cmgs=\"214244****\"");
Serial.print("This is my message");
Serial.write(26); // this is ctrl-z
Logged

Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I get an error for this with NewSoftserial "Serial.write(26); // this is ctrl-z"
how do i send it instead

really noob here
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 654
Posts: 50936
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I get an error for this
My crystal ball is covered with fingerprints, and I'm out of Windex.

What error are you getting?
Logged

Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sorry dude
When i compile i get following error

C:\Program Files (x86)\arduino-0018\libraries\NewSoftSerial/NewSoftSerial.h:71: error: 'virtual void NewSoftSerial::write(uint8_t)' is private

error: within this context


and it indicates on this row
cell.write(26); // this is ctrl-z
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 654
Posts: 50936
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your code snippet indicates that you are using the hardware serial instance Serial, but the error message says you are using a NewSoftSerial instance.

If you have a NewSoftSerial instance named mySerial, you can send ctrl-z this way:
Code:
byte ctrlz = 26;
mySerial.print(ctrlz);
Logged

Sweden
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thx worked great

found this just
cell.print(0x1A, BYTE);
also worked to send the ctrlz
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi I've got a problem, Im using a Mega2560 and it s not working.
Does anyone knows how to solve this problem.
I'm testing the code below , but the problem is the pin, cause I've read somewhere that i can not use the pin D0 to d9 as  serial. And I don t know how to solve it.
/*
SparkFun Cellular Shield - Pass-Through Sample Sketch
SparkFun Electronics
Written by Ryan Owens
3/8/10


#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(19,18);  //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);
  
  //Let's get started!
  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.
  }
}
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 654
Posts: 50936
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You've got 4 hardware serial ports on the Mega. Why do you need a software serial port, too?

Are you using the version of NewSoftSerial that was recently modified for the Mega? The "official" version does not work on the Mega.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you PaulS. Now its working. Now i can sand sms and make calls.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But now I have another problem.
I'm trying to send email using this shield but i don t know how.
Thanks
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

please pals one urgent request, is this module alone is enough ( anything else to be bought along with it? ) and can it be interfaced to arduino uno!

please reply guys.


thanks
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

what code to use if we want to use this shield to send email?? thanks. :o
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mine simply repeats SIND 1 and SIND 10 about every 10 seconds with about 5 characters of jibberish in between.  Does anyone know what could cause this?  If I'm lucky I may get a SIND 3 after 10 minutes and once got a SIND 4 and SIND 7.  I'm using the development board connected directly to a computer and have change BR to 9600 and band to 7.

Help would be hugely appreciated.

Thanks
Logged

Pages: [1]   Go Up
Jump to: