Seeed-Studio / GPRS_SIM900

library for GPRS shield with sim900 module.
MIT License
138 stars 96 forks source link

force disable sms notification, to allow sms read #29

Closed fcaldarelli closed 6 years ago

fcaldarelli commented 6 years ago

When using SIM900 module from factory, SMSread example will not work because module is receiving sms event callback through serial port.

Force disabling sms notification, will solve the problem.

ortegafernando commented 6 years ago

Hi, I have been using this library since almost two years ago. I haven't got this problem before. Any one else with this problem ?

fcaldarelli commented 6 years ago

Maybe I have previously uploaded a script into Arduino that set CNMI value, to receive sms notifications through serial port.

But I think that disabling sms notification via serial port in init() method is a secure board initialization.

fcaldarelli commented 6 years ago

After many tests, I've found that the command to launch should be:

AT-CMGF=1

instead that of pull request.

KillingJacky commented 6 years ago

@FabrizioCaldarelli thank you for your investigations, could you please finalize this PULL with your proved working patch?

lanselambor commented 6 years ago

@FabrizioCaldarelli I think the new SMS indicator should be kept as AT+CNMI=2,1,0,0. AT+CNMI=0,0,0,0 will disable the SMS notification.