skorokithakis / A6lib

An ESP8266/Arduino library for communicating with the A6 GSM module. ⛺
MIT License
127 stars 49 forks source link

Received SMS wont display on Serial Monitor #25

Open vanjsy opened 6 years ago

vanjsy commented 6 years ago

Hi, thanks for this awesome library of yours. I've tried this, everything's working fine. But the only problem is that, the text messages that I send to GSM A6 wont display on the serial monitor. Do you happen to encounter this problem? Thank you.

skorokithakis commented 6 years ago

Hmm, I can't say I have, I'm afraid :/ I did encounter various problems with the A6 chip, it doesn't seem to be the most reliable around. Please let me know or submit a PR if you manage to fix it.

1technophile commented 6 years ago

Thanks also for this lib, I have the same issue with my A7, I'm able to:

But I'm not able to receive sms

1technophile commented 6 years ago

just by changing storage location of SMS msg (line 72 of A6lib.cpp), I'm now able to receive SMS if (A6_OK != A6command("AT+CPMS=SM,SM,SM", "OK", "yy", A6_CMD_TIMEOUT, 2, NULL))

skorokithakis commented 6 years ago

@1technophile Thank you for the update! @vanjsy, does that work for you?

vanjsy commented 6 years ago

Hi @skorokithakis , I didn't try it yet. Once I did I'll update you if it works, thank you.

vanjsy commented 6 years ago

I dont have my ESP8266 with me though, but will this library works on Arduino Uno? If so, which part will i need to modify? Thanks.

skorokithakis commented 6 years ago

As far as I know, it works unmodified. Try the suggestion above to see if it works.

vanjsy commented 6 years ago

Even using Arduino Uno?

skorokithakis commented 6 years ago

Yeah, it should work, but I haven't tried it personally.

vanjsy commented 6 years ago

Hello, live message still not displaying when texting the GSM using my mobile.

skorokithakis commented 6 years ago

I know, please don't post messages like that.

vanjsy commented 6 years ago

Like what sir? Apology.

skorokithakis commented 6 years ago

Comments that don't add any new information.

IMAN4K commented 6 years ago

Here are some useful info about SMS Storage area: https://www.developershome.com/sms/cpmsCommand.asp As @1technophile mentioned, you should set Preferred Storage to SIM (mine can handle about 15 and don't know why ME doesn't work!).maybe Preferred Storage should be default to SM or control by some Macros. And remember that SMS index for A6 & A6 mini start at 1! This lib definitely needs some modification to remove blocking operations, enabling async and callbacks , adding UTF8 etc.

skorokithakis commented 6 years ago

you should set Preferred Storage to SIM

I am a bit wary of doing that because I remember my module working with ME but not with SM, and I don't have my A6 to test with, so I can't verify that this fixes things for more people than ME... There's a comment in the code to change that if it doesn't work, but I agree that it would be better as a parameter. Can someone create a PR with storage selection, perhaps?

And remember that SMS index for A6 & A6 mini start at 1!

Is this currently set to 0 somewhere? I didn't find any mentions, but I'd appreciate someone pointing out any bugs.

This lib definitely needs some modification to remove blocking operations, enabling async and callbacks , adding UTF8 etc.

PRs for that would be very welcome!

@vanjsy Does it not work for you even if you set the storage to SM?