On Fri, Apr 23, 2010 at 5:35 PM, William Maddler <[email protected]> wrote:
> Hello all,
> I've tried googling around but got no luck.
> I'd need to get current operator name a SIM card status (registered/not
> registered).
>
> Any clue or starting point? C or Python would be fine.
>
You can get them via dbus. First you get the operator code and country code,
then you get the proper string. In shell script:
#!/bin/sh
opcountry=$(dbus-send --system --print-reply=literal --dest=
com.nokia.phone.net /com/nokia/phone/net \
Phone.Net.get_registration_status | tr '\n' ' ' | awk '{print $8,$10}')
opcode=$(echo $opcountry | cut -f1 -d' ')
countrycode=$(echo $opcountry | cut -f2 -d' ')
dbus-send --system --print-reply
--dest=com.nokia.phone.net/com/nokia/phone/net \
Phone.Net.get_operator_name byte:0 uint32:$opcode uint32:$countrycode | grep
string \
| awk '{print $2}' | tr -d \"
--
Cláudio "Patola" Sampaio
IRC: ptl - Yahoo: patolaaa
Campinas, SP - Brazil.
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers