Bær Bjorn Nornheim
Newbie level 1
- Joined
- Sep 1, 2014
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 26
Hello
i cannot send email by AT-commands sim900 with my Gboard pro from iteadstudio.com
Quote
"Sorry, we don't know anything else to solve this."
i thought maybe here i could get some help.
this is my code and output:
Code:
ouput:
thanks :thumbsup:
i cannot send email by AT-commands sim900 with my Gboard pro from iteadstudio.com
Quote
"Sorry, we don't know anything else to solve this."
i thought maybe here i could get some help.
this is my code and output:
Code:
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 #include "SIM900.h" #include <SoftwareSerial.h> //#include "inetGSM.h" //#include "sms.h" //#include "call.h" //To change pins for Software Serial, use the two lines in GSM.cpp. //GSM Shield for Arduino //www.open-electronics.org //this code is based on the example of Arduino Labs. //Simple sketch to communicate with SIM900 through AT commands. //InetGSM inet; //CallGSM call; //SMSGSM sms; #include "inetGSM.h" int numdata; InetGSM inet; char inSerial[40]; int i=0; boolean started = false; void setup() { //Serial connection. Serial.begin(9600); Serial.println("GSM Shield testing."); //Start configuration of shield with baudrate. //For http uses is raccomanded to use 4800 or slower. if (gsm.begin(9600)) { Serial.println("\nstatus=READY"); started=true; } else Serial.println("\nstatus=IDLE"); if(started) { //GPRS attach, put in order APN, username and password. //If no needed auth let them blank. if (inet.attachGPRS("uinternet", "", "")) Serial.println("status=ATTACHED"); else Serial.println("status=ERROR"); delay(1000); Serial.println(" line 0001"); gsm.SimpleWriteln("AT+EMAILCID=1"); // Serial.println("AT+EMAILCID=1"); delay(50000); gsm.SimpleWriteln("AT+EMAILTO=30"); // Serial.println("AT+EMAILTO=30"); delay(500000); gsm.SimpleWriteln("AT+SMTPSRV='smtp.gmail.com','465' "); // stmp&port // Serial.println("AT+SMTPSRV='smtp.gmail.com','465' "); delay(50000); gsm.SimpleWriteln("AT+SMTPUTH=1,'user','password'"); // Serial.println("AT+SMTPUTH=1,'user','password'"); delay(50000); gsm.SimpleWriteln("AT+SMTPRCPT=0,0,'#######@gmail.com','NAME'"); // Serial.println("AT+SMTPRCPT=0,0,'#######@gmail.com','NAME'"); delay(50000); Serial.println("line 5"); gsm.SimpleWriteln("AT+SMTPRCPT=1,0,'######@gmail.com','NAME'"); // Serial.println("AT+SMTPRCPT=1,0,'#######@gmail.com','NAME'"); delay(50000); gsm.SimpleWriteln("AT+SMTPRCPT=2,0,'#####@gmail.com','NAME'"); // Serial.println("AT+SMTPRCPT=2,0,'#####@gmail.com','NAME'"); delay(50000); gsm.SimpleWriteln("AT+SMTPSUB='TEST'"); // Serial.println("AT+SMTPSUB='TEST'"); delay(50000); Serial.println("line 8"); gsm.SimpleWriteln("AT+SMTPBODY> HELLO WORLD !! GPRS ARDUINO "); // Serial.println("AT+SMTPBODY> HELLO WORLD !! GPRS ARDUINO "); delay(50000); gsm.SimpleWriteln("AT+SMTPSEND"); // Serial.println("AT+SMTPSEND"); delay(10000); Serial.println("finished"); } }; void loop() { delay(10000); Serial.println("0003"); }
ouput:
GSM Shield testing.
ATT: OK
RIC: AT
OK
DB:ELSE
ATT: OK
RIC: AT
OK
DB:ELSE
ATT: OK
RIC: AT
OK
DB:ELSE
ATT: OK
RIC: AT
OK
DB:CORRECT BR
ATT: OK
RIC: AT
OK
ATT: OK
RIC: AT&F
OK
ATT: OK
RIC: ATE0
OK
ATT: OK
RIC:
OK
ATT: OK
RIC:
OK
ATT: OK
RIC:
OK
ATT: OK
RIC:
OK
ATT: +CPMS:
RIC:
+CPMS: 20,20,20,20,20,20
OK
ATT: OK
RIC:
OK
ATT: SHUT OK
RIC:
SHUT OK
status=READY
ATT: ERROR
RIC:
ERROR
DB:STARTING NEW CONNECTION
ATT: SHUT OK
RIC:
SHUT OK
DB:SHUTTED OK
ATT: OK
RIC:
OK
DB:APN OK
ATT: OK
RIC:
OK
DB:CONNECTION OK
ATT: ERROR
RIC:
10.195.98.34
DB:ASSIGNED AN IP
status=ATTACHED
line 0001
line 5
line 8
finished
0003
thanks :thumbsup:
Last edited by a moderator: