Skip to content

Commit

Permalink
added CNMI command to init function
Browse files Browse the repository at this point in the history
I had problems when using the `CMGL` command and it wouldn't reply with any message in the buffer, adding the CNMI configuration in the init solved the issue for me
  • Loading branch information
jagjordi authored and Pillar1989 committed Dec 27, 2019
1 parent aa5aa00 commit 02bc7ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions GPRS_Shield_Arduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ bool GPRS::init(void)
}
//delay(500); It is not necessary, as we have time before next command

// set New Message Indicator
if(!sim900_check_with_cmd(F("AT+CNMI=1,1,0,0,0\r\n"), "OK\r\n", CMD)) { // Set message mode to ASCII
return false;
}

if(!checkSIMStatus()) {
return false;
}
Expand Down

0 comments on commit 02bc7ab

Please sign in to comment.