با سلام.
با قرار دادن SIM900A-Shield بروری Arduino Uno Rev3 و با توجه به کد زیر وضعیت همیشه CONNECTING است.
کد:
#include <GSM.h>
GSM gsmAccess(true);
GSM_SMS sms;
void setup()
{
Serial.begin(9600);
char code='X';
while(true)
{
Serial.println("try Access");
code=gsmAccess.begin("4428",true,false); // code=gsmAccess.begin("0000",true,false); // my pin is "0000"
Serial.println("\nAfter Access");
if(code==GSM_READY)
{
Serial.println("code is GSM_READY");
break;
}
if(code==CONNECTING)
{
Serial.println("code is CONNECTING");
}
if(code==ERROR) {Serial.println("code is ERROR");}
if(code==IDLE) {Serial.println("code is IDLE");}
if(code==GPRS_READY) {Serial.println("code is GPRS_READY");}
if(code==TRANSPARENT_CONNECTED) {Serial.println("code is TRANSPARENT_CONNECTED");}
delay(1000);
}
}
void loop()
{
}