I have this arduino code. GSM shield get connected and the ussd is also being sent but I am not getting any reply (something like 'ok'). The ussd short code is a valid one. What am I missing here? Or is there an error in my code? (Equipement: Arduino Uno, GSM shiled)
Appreciate any insight on this matter. Thank you
#include <GSM.h>
#include <GSM3ShieldV1DirectModemProvider.h>
// initialize the library instance
GSM gsmAccess;
GSM3ShieldV1DirectModemProvider modemAccess;
// PIN Number
#define PINNUMBER ""
void setup() {
Serial.begin(9600);
// initialize the digital pin as an output.
Serial.println("GSM networks scanner");
connectGSM();
String At_COMMAND = "AT+CUSD=1,\"*#456#\"";
Serial.println("Sending At command");
String reply = modemAccess.writeModemCommand(At_COMMAND,15);
Serial.println("Sent");
Serial.println(reply);
Serial.println("Sent");
}
void connectGSM(){
boolean notConnected=true;
Serial.println("Connecting...");
while(notConnected){
if(gsmAccess.begin(PINNUMBER) == GSM_READY)
notConnected = false;
else delay(1000);
}
Serial.println("Connected to GSM");
}
Output
GSM networks scanner
Connecting...
Connected to GSM
Sending At command
Sent
Sent