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

Arduino, sim900 fixes #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alejandroMA
Copy link

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.

…), 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.
@babca
Copy link

babca commented Aug 19, 2016

@alejandroMA merged here
https://github.com/babca/python-gsmmodem

please check it out and do a pull request there if you found any bugs.

@alejandroMA
Copy link
Author

alejandroMA commented Sep 5, 2016

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).
alejandroMA@0010fbd
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).

@babca
Copy link

babca commented Sep 6, 2016

Thanks for suggestions, I tried to add it: babca#5
I hope it is done right, if not, let me know.

@babca
Copy link

babca commented Sep 6, 2016

@alejandroMA Are you able to help me fix broken unit tests? babca#6 :-)

@alejandroMA
Copy link
Author

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.

@babca
Copy link

babca commented Sep 7, 2016

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:

  1. test if it is a working replacement for original v0.9 / if it introduces any new bugs
  2. check unit tests. "Are they outdated or there are bug in the code?" Fix unit tests after rapid merging babca/python-gsmmodem#6
  3. replace serial.Serial() with serial.serial_for_url() in serial_comms.py for a native remote modem support. Add native support for remote modems connected over the network (connect to IP address) babca/python-gsmmodem#2

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 this pull request may close these issues.

2 participants