zabsalahid / serialport-gsm

SerialPort-GSM is a simplified plugin for communicating with gsm modems. (Primarily for sms) (Focused in PDU mode)
MIT License
92 stars 48 forks source link

AT+CNMI to specify in 'options' #96

Closed forelleblau closed 2 years ago

forelleblau commented 2 years ago

As mentioned (by others) in different issues, some have problems to recieve sms. I had to solve this too, today. During an established connection everything went well, but all the message sent when 'offline' did not get saved and reported with 'getSimInbox'.

The solution I found was to set the right CNMI - Values which seem to depend from the hardware used. It is possbile to set send a CNMI command with 'options.customInitCommand', but these are overwritten by the following:

https://github.com/zabsalahid/serialport-gsm/blob/4fc08fb8874b48e6b714631884efab3493c6c45a/lib/functions/modem.js#L1405

It could be an enhancement, if CNMI-Values could be set in 'options'.

I will try to make a PR if no one else is faster...

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

forelleblau commented 2 years ago

Fixed with PR/New version