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

Can it work when the 3G connection is active? #18

Closed
HansF opened this issue Jul 12, 2013 · 4 comments
Closed

Can it work when the 3G connection is active? #18

HansF opened this issue Jul 12, 2013 · 4 comments
Assignees
Labels

Comments

@HansF
Copy link

HansF commented Jul 12, 2013

So all works well when there's no 3G connection. But when there is I have an issue running the incoming_call_demo.py script. When I dial the number it is ringing and with every ring an error message logs to the screen:

Exception in thread Thread-58:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/python_gsmmodem-0.8-py2.7.egg/gsmmodem/modem.py", line 643, in __threadedHandleModemNotification
    self._handleIncomingCall(lines)
  File "/usr/local/lib/python2.7/dist-packages/python_gsmmodem-0.8-py2.7.egg/gsmmodem/modem.py", line 672, in _handleIncomingCall
    callType = ringLine.split(' ', 1)[1]
IndexError: list index out of range

Manufacturer: huawei
Model: K3715
Revision: 11.104.05.00.00

Furthermore, I'm using the sakis3G script to connect.

@HansF
Copy link
Author

HansF commented Jul 12, 2013

If I first make the connection, and then start the python script, all is fine.

@HansF HansF closed this as completed Jul 12, 2013
@faucamp
Copy link
Owner

faucamp commented Jul 13, 2013

Thanks for the report! I'm glad you found a workaround, but this is indeed a valid bug (and one which I have been able to replicate), so I am reopening this until I have submitted a fix.

@faucamp faucamp reopened this Jul 13, 2013
@ghost ghost assigned faucamp Jul 13, 2013
faucamp added a commit that referenced this issue Jul 13, 2013
@faucamp
Copy link
Owner

faucamp commented Jul 13, 2013

The issue is that the sakis3g script modifies the "extended incoming call indication" setting of the modem (AT+CRC). Since python-gsmmodem sets this during connect(), it does not expect an external program to modify it - this is also why it works if you start python-gsmmodem after sakis3G.

The patch above allows python-gsmmodem to detect this change, so it should work fine either way for you now. Please re-open the ticket if the issue is not resolved for you.

@faucamp faucamp closed this as completed Jul 13, 2013
@HansF
Copy link
Author

HansF commented Jul 13, 2013

Works like a charm here. Thanks!

tahajahangir pushed a commit to tahajahangir/python-gsmmodem that referenced this issue Feb 23, 2017
add decoding for enc_list response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants