levkovigor / ppposclient

A client library for gsm ppp protocol. This library can be used to make GET and POST requests and to connect mqtt with PubSubClient. It supports ESP32.
MIT License
15 stars 11 forks source link

pppos and sms #2

Closed garudaonekh closed 3 years ago

garudaonekh commented 3 years ago

Hi, I use this library as PPPOS for MQTT and also to read incoming SMS. But as I know when it's in PPPos mode, it can't read SMS. In order to read SMS, I have to switch to AT mode.

Do you have any advice on this?

levkovigor commented 3 years ago

@garudaonekh

Check example, there are 2 functions: enterATModePPPOS and cancelATModePPPOS to switch between PPP and AT Modes

garudaonekh commented 3 years ago

yes, i have tried both. and they work. But I donot wnt to switch back and forth at regular interval. I think if we have an interrupt when SMS arrived then it is better

levkovigor commented 3 years ago

@garudaonekh

RING pin on GSM module acts as a Ring Indicator. It is basically the ‘interrupt’ out pin from the module. It is by default high and will pulse low for 120ms when a call is received. It can also be configured to pulse when an SMS is received.

I've not tested this for SMS, so can't explain how to do it. Check user manual for GSM module.

garudaonekh commented 3 years ago

Thanks, your suggestion worked like a charm. It's default to RING but I can also make it worked with SMS.