Hi Denis,
Following are the logs:
./test/gn3
Connecting modem /he910_0...
ofonod[2389]:
drivers/telitmodem/location-reporting.c:telit_location_reporting_enabl
e() lr=0x82e09e0
ofonod[2389]:
drivers/telitmodem/location-reporting.c:telit_portcfg_check_cb()
lr=0x82e09e0 ok=1
ofonod[2389]:
drivers/telitmodem/location-reporting.c:telit_gps_enable_cb()
lr=0x82e09e0 ok=1
ofonod[2389]:
drivers/telitmodem/location-reporting.c:telit_gps_ctl_cb()
lr=0x82e09e0 ok=1
ofonod[2389]: src/modem.c:get_modem_property() modem 0x82e2ba0
property GPS
ofonod[2389]:
drivers/telitmodem/location-reporting.c:telit_location_reporting_disab
le() lr=0x82e09e0
ofonod[2389]:
drivers/telitmodem/location-reporting.c:telit_gps_disable_cb()
lr=0x82e09e0, ok=1
Everything looks as it should here.
The test script I am using is:
import dbus
import sys
import glib
bus = dbus.SystemBus()
if len(sys.argv) == 2:
path = sys.argv[1]
else:
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
modems = manager.GetModems()
path = modems[0][0]
print("Connecting modem %s..." % path) modem =
dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.LocationReporting')
fd = modem.Request()
What do you expect the script to do actually?
Once you obtain the file descriptor, your client must be around to do something with it
(e.g. read NMEA strings).
As soon as the client(UNIX process) who performed the 'Request()'
operation exits, oFono closes the fd and shuts down the NMEA port on the modem.
So everything is working as it should.
Kiran: I am facing problem while reading from the file descriptor I got from
modem.request(). One observation is, I get
"modem=/dev/ttyACM0 aux=/dev/ttyACM3 gps=/dev/ttyACM5" from ofonod logs, but
/dev/ttyACM5 is not accepting AT commands when I try from minicom.
Should I change gps port also to /dev/ttyACM3?
Regards,
Kiran