|
|
0
Offline
Jr. Member
Karma: 0
Posts: 57
Making positive ground
|
 |
« Reply #1 on: May 11, 2010, 09:46:33 pm » |
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
Newbie
Karma: 0
Posts: 23
Arduino rocks
|
 |
« Reply #2 on: August 31, 2010, 12:38:42 pm » |
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
Brattain Member
Karma: 311
Posts: 35474
Seattle, WA USA
|
 |
« Reply #3 on: August 31, 2010, 12:54:44 pm » |
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
Newbie
Karma: 0
Posts: 23
Arduino rocks
|
 |
« Reply #4 on: August 31, 2010, 01:11:20 pm » |
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
Brattain Member
Karma: 311
Posts: 35474
Seattle, WA USA
|
 |
« Reply #5 on: August 31, 2010, 01:36:42 pm » |
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: byte ctrlz = 26; mySerial.print(ctrlz);
|
|
|
|
|
Logged
|
|
|
|
|
Sweden
Offline
Newbie
Karma: 0
Posts: 23
Arduino rocks
|
 |
« Reply #6 on: August 31, 2010, 02:02:46 pm » |
Thx worked great
found this just cell.print(0x1A, BYTE); also worked to send the ctrlz
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 3
Arduino rocks
|
 |
« Reply #7 on: November 01, 2010, 03:22:52 pm » |
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
Brattain Member
Karma: 311
Posts: 35474
Seattle, WA USA
|
 |
« Reply #8 on: November 01, 2010, 06:36:08 pm » |
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
Newbie
Karma: 0
Posts: 3
Arduino rocks
|
 |
« Reply #9 on: November 08, 2010, 03:00:39 am » |
Thank you PaulS. Now its working. Now i can sand sms and make calls.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 3
Arduino rocks
|
 |
« Reply #10 on: November 08, 2010, 03:02:37 am » |
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
Newbie
Karma: 0
Posts: 45
Arduino rocks
|
 |
« Reply #11 on: December 31, 2010, 08:29:16 am » |
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
Newbie
Karma: 0
Posts: 3
Arduino rocks
|
 |
« Reply #12 on: January 07, 2011, 10:05:34 am » |
what code to use if we want to use this shield to send email?? thanks. :o
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 16
Arduino rocks
|
 |
« Reply #13 on: January 24, 2011, 12:39:48 am » |
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
|
|
|
|
|
|