[FSO] Dbus, AT RAW access
smurfy - phil
openmoko at smurfy.de
Thu Nov 13 19:08:16 CET 2008
Hi,
thanks for the help but it will not work for me,
for me, %CBHZ=1 appears to do nothing :)
as i said before with "AT+CNMI=2,1,0,1,0" and "AT+CNMI=2,1,2,1,0" i
could one CB but not more.
also only if i use this commands in mickeyterm. if i use DebugCommand it
says ok, but no Dbus msg appears.
i wrote a small python testscript but it does not work for me (i never
get any cb message)
i have O2, with a stored homezone on my simcard. (on both of my simcards)
--- script:
#!/usr/bin/python
import dbus
import dbus.glib
import sys,os
import re
import gobject
session_bus = dbus.SystemBus()
def hzsignal(str):
print "HZ:" + str + "\r"
def cbsignal(str):
print "CB:" + str + "\r"
obj = session_bus.get_object
('org.freesmartphone.ogsmd','/org/freesmartphone/GSM/Device',
introspect=True)
cb = dbus.Interface (obj,'org.freesmartphone.GSM.CB');
obj2 = session_bus.get_object
('org.freesmartphone.frameworkd','/org/freesmartphone/GSM/Device',
introspect=True)
dbg = dbus.Interface (obj,'org.freesmartphone.GSM.Debug');
print "enable CBHZ\r"
dbg.DebugCommand('%CBHZ=1\r\n');
cb.SetCellBroadcastSubscriptions('all')
print cb.GetCellBroadcastSubscriptions() + "\r"
print "toggle CNMI cb off\r"
dbg.DebugCommand('AT+CNMI=2,1,0,1,0\r\n');
print "toggle CNMI cb on\r"
dbg.DebugCommand('AT+CNMI=2,1,2,1,0\r\n');
print "toggle CNMI cb done\r"
session_bus.add_signal_receiver(hzsignal, 'HomeZoneStatus',
'org.freesmartphone.GSM.HZ', 'org.freesmartphone.ogsmd',
'/org/freesmartphone/GSM/Server')
session_bus.add_signal_receiver(cbsignal, 'IncomingCellBroadcast',
'org.freesmartphone.GSM.CB', 'org.freesmartphone.ogsmd',
'/org/freesmartphone/GSM/Device')
global main_loop
gobject.threads_init()
dbus.glib.init_threads()
main_loop = gobject.MainLoop()
main_loop.run()
More information about the devel
mailing list