Open alejandroMA opened 8 years ago
@alejandroMA merged here https://github.com/babca/python-gsmmodem
please check it out and do a pull request there if you found any bugs.
hey @babca, so sorry to be so late to respond, i just though this repo was really death. o first thank you so much for merging, ~~how ever i made another simple commit to my fork. it only touches the code i introduced. (sorry for the typo in my commit message). https://github.com/alejandroMA/python-gsmmodem/commit/0010fbdbbdb75533bc6acc4864965a05bc073b48 So i guest i make a pull request to your fork?~~ Sorry you already merged that.
also i think i would be great if your fork could be up in pip as another package (python-gsmmodem-new maybe, or gsmmodem-new).
Thanks for suggestions, I tried to add it: https://github.com/babca/python-gsmmodem/issues/5 I hope it is done right, if not, let me know.
@alejandroMA Are you able to help me fix broken unit tests? https://github.com/babca/python-gsmmodem/issues/6 :-)
unfortunately this week i'm a little busy, and i have one modem available right now and it on production-ish, so i cant tinker with it or change to the python-gmsmodem-new right now.
but i would love to help, if you have something in mind for next week i can help :). Or i'll do the test new week.
I'm putting all my ideas into my Issues tab https://github.com/babca/python-gsmmodem/issues Main three things I'd like to currently see checked and resolved are:
serial.Serial()
with serial.serial_for_url()
in serial_comms.py for a native remote modem support. https://github.com/babca/python-gsmmodem/issues/2
So i´m using a sim900 modem with Arduino as a serial interface. While trying to connect to it, i would always get a timeOutException, turns out that Arduino reboots it-self every time a new serial connection starts so, when the first AT command get send, Arduino isn’t on yet, so it never reaches the sim900 modem, modem doesn’t respond, timeOutException. waiting for 2-3 sec does the trick.
Also i needed a way to set a custom CNMI, since the default one doesn’t work with the sim900 modem.
added "waittingForModemToStartInSeconds" argument to GsmModem.conect(), added AT_CNMI property to GsmModem.
The waittingForModemToStartInSeconds arg allows to wait after the serial connection has started, and before sending the AT commands.
The AT_CNMI proprety of the GsmModem class allow to specify the CNMI parameter of the gsm modem, this helps to set up the incoming sms notifications.