My apologies for a very late answer, I was on 3-week holidays with no
access to Internet.
I tried to get hold of EC325 but, unfortunately, none of my friends
was in a possession of the device, so I can't really confirm if a
different set of commands applies, but I suspect it shouldn't be much
different from e.g. E220.
In your first posting you mentioned that you were using an outdated
Linux version issued in 2005 with an even older dbus subsystem (which
is probably a reason why find_huawei_iface.py fails). Can you please
try something more recent?
It seems that the modem device (/dev/ttyUSB0) is recognized correctly,
but the control device (/dev/ttyUSB1?) does not allow serial port
communication and hence pyhumod hangs forever on it.
Please try the following, it would be best if you could answer the
questions on some recent Linux distribution (with a kernel issued at
latest in 2008):
What is the output of 'ls -al /dev/ttyUSB*' command?
Do you see 2, 3 or more ttyUSB* interfaces?
Use minicom to connect to the ports that have been listed and try
typing in the minicom window the following command:
AT+GMI <press enter>
AT+GMM <press enter>
They should display the manufacturer and device model on the ttyUSB?
ports that are correctly recognized.
[...]
--
best regards,
oozie
http://pyhumod.ooz.ie/
On Fri, Aug 28, 2009 at 10:47 AM, mistletoe<mistle...@gmail.com> wrote:
>
> why did you make pyhumod have a function -- sendATCommand() ?
>
> then we can send all at commmand with this interface.
I understand that the question is why I didn't implement that function
or method.
This is where a developer guide would come in handy - I will try to
publish something on the project wiki this weekend.
Anyway, I implemented something else - the Command class.
Here is a short description of how it works:
In general, you can pass an AT command to the modem in 4 ways:
- "AT+CMD" - to tell the modem do something, (run)
- "AT+CMD?" - to query the current setting in the memory or the
current state, (get)
- "AT+CMD=?" - to see what are the possible values to set, (dsc for describe)
- "AT+CMD=value" - to set a value for the given command/setting. (set)
For instance, if you want to see who is the manufacturer and use an
"AT+GMI" command to do that you can do the following:
>>> import humod
>>> from humod.at_commands import Command as Cmd
>>> m=humod.Modem()
>>> show_manufacturer = Cmd(m, '+GMI')
>>> show_manufacturer.run()
If you want to get a list of networks with the "AT+COPS=?" command,
you will do the following:
>>> networks = Cmd(m, '+COPS')
>>> networks.dsc()
and so on...
On Tue, Sep 1, 2009 at 9:10 AM, mistletoe<mistle...@gmail.com> wrote:
>
> I think there is some problem in your code. For example:
>
> In the huawei AT Command: http://www.sangrong.com/download/cm300.pdf
>
> Send message command is : AT$HSMSSD=13300133110, 11, 1, 1
>
> it will be sure that I can't send message with function "dec". I
> suggest that you would make a moderm class: it acts like the command
> minicom. After connecting I enter the whole AT command and the result
> returns.
I can't disagree with the fact that there is a bunch of problems in my code :)
However, the functionality that you are looking for is probably
already in there. You can use one of the serial port methods
(inherited from serial.Serial) to send strings to the modem
minicom-style.
For instance:
m = humod.Modem()
m.ctrl_port.write('ATZ\r\n')
Also, it's not the dec() but dsc() method. And I agree, you can not
set values with the dsc() methods (dsc is there for querying). You can
do it with the set() method. Just in case you would like to do that I
have redesigned some of the internals and updated the Developers
Guide:
http://code.google.com/p/pyhumod/wiki/DevelGuide
Obviously, I'm not stopping you from hacking PyHumod minicom-style.
Please make sure that you use the latest source version from the
mercurial repository.
> I find the similar perl package in the CPAN.
> http://search.cpan.org/~cosimo/Device-Modem-1.51/docs/Device-Modem.pod
Thanks for the link.
It's probably a good idea to close this thread as it went a bit off topic.