Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atgen_setCNMI not working #486

Closed
peykens opened this issue Sep 1, 2019 · 2 comments · Fixed by #498
Closed

atgen_setCNMI not working #486

peykens opened this issue Sep 1, 2019 · 2 comments · Fixed by #498

Comments

@peykens
Copy link

peykens commented Sep 1, 2019

I try to fix the CNMI via atgen_setCNMI in the gammu section of the config, but whatever I try, the smsd always sets the CNMI at startup :
"AT+CNMI=2,1,0,2"

I need to get it to 2,0,0,2,1 in order to receive incoming messages.

Is something special needed ?

I'm using Huawei E3531 and raspberry Pi 3.
[gammu]
port = /dev/ttyUSB0
connection = at

Debugging

logformat = textall
atgen_setCNMI = 2,0,0,2,1

I can send message without problems.
When I stop the smsd, and set the CNMI manually, I can receive messages via gammu. but when I start the smsd, it resets the CNMI and no new messages received.

@stevecohenfr
Copy link

Hi. I spent a lot of time trying to run gammu with my Huawei E3531. Finally I switched to python-gsmmodem and created my own script. The problem is gammu is no longer maintained by the developer and looks for a new maintainer.

If you want to switch to python-gsmmodem you need to use the last python-gsmmodem version (called python-gsmmodem-new), the faucamp's version is no longer maintained and out of date. In this repository you have some exemples and one of them is to read sms.

The python exemple is just an exemple, it's incomplete. It does not read sms in the memory (if you receive a sms before running the script). And it does not concatenate multi parts sms (it will print unordered parts).
Also, as your script is running in live to read sms, you cannot send sms with another script because the dongle is busy.

So I created a complete script for that. It's quite simple but it concats big sms, reads sms in memory regularly and it starts a daemon that communicate with another script to send a sms.

Here is the GIST : https://gist.github.com/stevecohenfr/8d3908da4ed39169992e407261f4c0e6

Enjoy and let me know in the gist comments if you have any issue

Steve

@kstuart
Copy link
Contributor

kstuart commented Oct 17, 2019

@peykens currently Gammu only supports the first 4 CNMI parameters, that needs to be clarified in the docs. Try setting to 2,0,0,2 and see if that gets set correctly.

Also please remember if the software is not working as expected providing a debug log is very helpful for diagnosing any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants