[pyhumod] e220 problem

44 views
Skip to first unread message

mistletoe

unread,
Sep 29, 2009, 3:57:01 AM9/29/09
to pyhumod
oozie:
I can't send message with pyhumod on the E220. Which are
the available manufacturers with pyhumod ? The error log is:

>>> mod = humod.Modem('/dev/ttyUSB1', '/dev/ttyUSB0')
>>> modem.show_model()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'modem' is not defined
>>> mod.show_model()
'+GMM: Model 199'
>>> mod.show_revision()
'+GMR: S/W VER: M6025A-SBTZ-2.5.201T SCMS1111'

>>> mod.show_imei()
'+GSN: 81F41C00'
>>> mod.enable_textmode(True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/site-packages/humod/
at_com
mands.py", line 369, in enable_textmode
return self._common_enable('+CMGF', '1', '0', status)
File "/usr/local/lib/python2.5/site-packages/humod/
at_com
mands.py", line 355, in _common_enable
_common_set(self, command, active_set)
File "/usr/local/lib/python2.5/site-packages/humod/
at_com
mands.py", line 110, in _common_set
data = Command(modem, at_cmd, prefixed).set(value)
File "/usr/local/lib/python2.5/site-packages/humod/
at_com
mands.py", line 64, in set
self.prefixed)
File "/usr/local/lib/python2.5/site-packages/humod/
humode
m.py", line 158, in send_at
return self.return_data(cmd)
File "/usr/local/lib/python2.5/site-packages/humod/
humode
m.py", line 181, in return_data
errors.check_for_errors(input_line)
File "/usr/local/lib/python2.5/site-packages/humod/
errors .py",
line 35, in check_for_errors
raise AtCommandError, input_line
humod.errors.AtCommandError: ERROR
>>> mod.sms_send('18926180600', 'hello,world') Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/site-packages/humod/
at_com
mands.py", line 136, in sms_send
result = self.ctrl_port.return_data()
File "/usr/local/lib/python2.5/site-packages/humod/
humode
m.py", line 181, in return_data
errors.check_for_errors(input_line)
File "/usr/local/lib/python2.5/site-packages/humod/
errors .py",
line 35, in check_for_errors
raise AtCommandError, input_line
humod.errors.AtCommandError: ERROR
>>> mod.sms_send('18926180600', 'hello,world')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/site-packages/humod/
at_com
mands.py", line 136, in sms_send
result = self.ctrl_port.return_data()
File "/usr/local/lib/python2.5/site-packages/humod/
humode
m.py", line 181, in return_data
errors.check_for_errors(input_line)
File "/usr/local/lib/python2.5/site-packages/humod/
errors .py",
line 35, in check_for_errors
raise AtCommandError, input_line
humod.errors.AtCommandError: ERROR
>>> mod.sms_send('18926180600', 'hello,world')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/site-packages/humod/
at_com
mands.py", line 136, in sms_send
result = self.ctrl_port.return_data()
File "/usr/local/lib/python2.5/site-packages/humod/
humode
m.py", line 181, in return_data
errors.check_for_errors(input_line)
File "/usr/local/lib/python2.5/site-packages/humod/
errors .py",
line 35, in check_for_errors
raise AtCommandError, input_line
humod.errors.AtCommandError: ERROR

>>> mod.sms_list()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/site-packages/humod/
at_com
mands.py", line 160, in sms_list
messages_data = message_lister.set('"%s"' %
message_typ
e)
File "/usr/local/lib/python2.5/site-packages/humod/
at_com
mands.py", line 64, in set
self.prefixed)
File "/usr/local/lib/python2.5/site-packages/humod/
humode
m.py", line 158, in send_at
return self.return_data(cmd)
File "/usr/local/lib/python2.5/site-packages/humod/
humode
m.py", line 181, in return_data
errors.check_for_errors(input_line)
File "/usr/local/lib/python2.5/site-packages/humod/
errors .py",
line 35, in check_for_errors
raise AtCommandError, input_line
humod.errors.AtCommandError: ERROR

oozie

unread,
Sep 29, 2009, 6:53:02 AM9/29/09
to pyh...@googlegroups.com
Hi,

On Tue, Sep 29, 2009 at 8:57 AM, mistletoe <mistle...@gmail.com> wrote:

> oozie:
> I can't send message with pyhumod on the E220. Which are
> the available manufacturers with pyhumod ? The error log is:

The supported manufacturer is just one: Huawei.

Does your modem come from Huawei? Did they write the firmware for the
modem? In Huawei modems +GMM and +GMR give unprefixed output and they
use a different revision string format: "xx.xxx.xx.xx.xx"

What does mod.show_manufacturer() say?

Huawei E220 should respond with 'E220' to mod.show_model().

>>>> mod = humod.Modem('/dev/ttyUSB1', '/dev/ttyUSB0')

Remark: Usually, the modem device is detected as first, and the
control device as second.

--
best regards,
oozie
http://pyhumod.ooz.ie/

Reply all
Reply to author
Forward
0 new messages