Use SIM800L with Arduino Uno

what i'm trying to do is to send message to one whose no. is used in code about balance of sim_card plugged in sim900a.
but i get commands in message or blank message after using ATE0.

what i was thinking is, a kind of response to the commands would be generated in the gsm module which in turn be extracted by me by "String balance=readString();" command then will use it as message context to send to next person.

but this is something i'm having difficulty in accomplishing or there is something i'm probably unaware of.
any help would be greatly appreciated...thanks...

#include<SoftwareSerial.h>
SoftwareSerial gsm(2,3);

String n="+921234567899";

void setup()
{
gsm.begin(9600);
Serial.begin(9600);
//
gsm.println("AT"); resp();
gsm.println("AT+CMGF=1"); resp();
gsm.println("AT+CUSD=1"); resp();
gsm.println("AT+CUSD=1,"*111#"\r"); resp();
String balance=gsm.readString();
//
gsm.println("AT"); resp();
gsm.println("AT+CMGF=1"); resp();
gsm.println("AT+CMGS=""+n+""r"); resp();
gsm.println(balance); resp();
gsm.println((char)26);
}

void loop()
{
resp();
}

//////
void resp()
{
delay(500);
while(Serial.available())
gsm.write(Serial.read());
//
while(gsm.available())
Serial.write(gsm.read());

}

how to reset sim800l module while using it with arduino uno. can we do it by connecting it with digital pin of arduino and make it low for 100ms via code. or through AT command like AT&F or is there any other way to get around?

thanks...

Split from an only vaguely similar topic

DO NOT HIJACK TOPICS
If you have a new question then start a new topic of your own

paar:
how to reset sim800l module while using it with arduino uno. can we do it by connecting it with digital pin of arduino and make it low for 100ms via code. or through AT command like AT&F or is there any other way to get around?

thanks...

Hi !

for Reset the module, you can use a recommended reset circuit by simcom ...
its available on hardware design manual of sim800, download this manual:
SIM800L(MT6261)_Hardware Design_V1.01.pdf

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.