Programming Quectel M95 by Arduino- Connection and Command issue
hello everybody,
i trying connect arduino uno board gsm2click board has quectel m95 module embedded on.
vcc=5v set switch correctly.
i've made following connection:
arduino pin | gsm pin:
10 rx
11 tx
8 sta
7 pwk (always high)
the gsm2click board seems active because both switch power , network on (net led blinking).
after put pwk=1 , wrote following sketch:
when check answer serial monitor "0" after @ , not ok.
what i'm missing ? help?
thanks lot.
marco
i trying connect arduino uno board gsm2click board has quectel m95 module embedded on.
vcc=5v set switch correctly.
i've made following connection:
arduino pin | gsm pin:
10 rx
11 tx
8 sta
7 pwk (always high)
the gsm2click board seems active because both switch power , network on (net led blinking).
after put pwk=1 , wrote following sketch:
code: [select]
#include <softwareserial.h>
const int pwk= 7; // analog output pin led attached to
const int sta= 8;
const int rx= 10;
const int tx= 11;
int sta_value;
//at+ipr=9600 , poi dopo aver ricevuto ok mando anche at&w, per il check mando at+ipr?
softwareserial myserial(rx,tx); // rx, tx
void gsmon() {
// takes 30 seconds complete
digitalwrite(pwk, high); // turn phone on
}
void setup() {
// initialize digital pin output.
pinmode(pwk, output); // questo pin serve per accendere il dispositivo gsm
pinmode(sta, input);
pinmode(rx,input);
pinmode(tx,output);
gsmon();
serial.begin(9600); //init seriale sw
delay(10);
myserial.begin(9600); //init seriale hw
delay(100);
}
void loop()
{
sendcommand("at");
readserial();
delay(1000);
}
void sendcommand(char* msg)
{
myserial.println(msg);
serial.println(msg);
delay(1000);
}
void readserial()
{
if (myserial.available()>0)
{
//serial.println("reading..");
serial.println(myserial.read());
delay(10);
}else
{
serial.println("serial not available");
}
}
when check answer serial monitor "0" after @ , not ok.
what i'm missing ? help?
thanks lot.
marco
Arduino Forum > Using Arduino > Programming Questions > Programming Quectel M95 by Arduino- Connection and Command issue
arduino
Comments
Post a Comment