I am trying to have two modems working at the same time with ofono : one is
the Telit HE910, and the other one is the Option GTM382.
Both of them work fine when plugged alone, but if I use them both at the
same time,the initialization seems to stop during the telit_enable phase.
I am using ofono-1.3, I applied the several patches released in the
meantime to support the Telit modems including the latest
series patches "Telit plugin rework for HE910".
Here is the debug log from ofono :
ofonod[1789]: src/modem.c:ofono_modem_create() name: (null), type: telit
ofonod[1789]: plugins/udevng.c:setup_telit()
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-6
ofonod[1789]: plugins/udevng.c:setup_telit() /dev/ttyACM1 2/2/1 00 (null)
Telit Wireless Module Modem
ofonod[1789]: plugins/udevng.c:setup_telit() /dev/ttyACM2 2/2/1 02 (null)
(null)
ofonod[1789]: plugins/udevng.c:setup_telit() /dev/ttyACM3 2/2/1 04 (null)
(null)
ofonod[1789]: plugins/udevng.c:setup_telit() /dev/ttyACM4 2/2/1 06 (null)
(null)
ofonod[1789]: plugins/udevng.c:setup_telit() /dev/ttyACM5 2/2/1 08 (null)
(null)
ofonod[1789]: plugins/udevng.c:setup_telit() /dev/ttyACM6 2/2/1 0a (null)
(null)
ofonod[1789]: plugins/udevng.c:setup_telit() /dev/ttyACM7 2/2/1 0c (null)
(null)
ofonod[1789]: plugins/udevng.c:setup_telit() modem=/dev/ttyACM1
aux=/dev/ttyACM4 gps=(null) diag=/dev/ttyACM2
ofonod[1789]: src/modem.c:set_modem_property() modem 0x8d27150 property
Modem
ofonod[1789]: src/modem.c:set_modem_property() modem 0x8d27150 property Aux
ofonod[1789]: src/modem.c:set_modem_property() modem 0x8d27150 property GPS
ofonod[1789]: src/modem.c:ofono_modem_register() 0x8d27150
ofonod[1789]: plugins/telit.c:telit_probe() 0x8d27150
ofonod[1789]: src/modem.c:emit_modem_added() 0x8d27150
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27150 property
NetworkInterface
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27150 property
SysPath
ofonod[1789]: src/modem.c:__ofono_modem_append_properties() Ifname (null)
ofonod[1789]: src/modem.c:call_modemwatches() 0x8d27150 added:1
ofonod[1789]: plugins/smart-messaging.c:modem_watch() modem: 0x8d27150,
added: 1
ofonod[1789]: plugins/push-notification.c:modem_watch() modem: 0x8d27150,
added: 1
ofonod[1789]: plugins/udevng.c:create_modem()
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1
ofonod[1789]: plugins/udevng.c:create_modem() driver=hso
ofonod[1789]: src/modem.c:ofono_modem_create() name: (null), type: hso
ofonod[1789]: plugins/udevng.c:setup_hso()
/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1
ofonod[1789]: plugins/udevng.c:setup_hso() /dev/ttyHS0 255/255/255 00
(null) Diagnostic
ofonod[1789]: plugins/udevng.c:setup_hso() /dev/ttyHS1 255/255/255 01
(null) GPS
ofonod[1789]: plugins/udevng.c:setup_hso() /dev/ttyHS2 255/255/255 02
(null) GPS Control
ofonod[1789]: plugins/udevng.c:setup_hso() /dev/ttyHS3 255/255/255 03
(null) Application
ofonod[1789]: plugins/udevng.c:setup_hso() /dev/ttyHS4 255/255/255 06
(null) Control
ofonod[1789]: plugins/udevng.c:setup_hso() /dev/ttyHS5 255/255/255 09
(null) Modem
ofonod[1789]: plugins/udevng.c:setup_hso() control=/dev/ttyHS4
application=/dev/ttyHS3 modem=/dev/ttyHS5 network=(null)
ofonod[1789]: src/modem.c:set_modem_property() modem 0x8d27718 property
Control
ofonod[1789]: src/modem.c:set_modem_property() modem 0x8d27718 property
Application
ofonod[1789]: src/modem.c:set_modem_property() modem 0x8d27718 property
Modem
ofonod[1789]: src/modem.c:set_modem_property() modem 0x8d27718 property
NetworkInterface
ofonod[1789]: src/modem.c:ofono_modem_register() 0x8d27718
ofonod[1789]: plugins/hso.c:hso_probe() 0x8d27718
ofonod[1789]: src/modem.c:emit_modem_added() 0x8d27718
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27718 property
NetworkInterface
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27718 property
SysPath
ofonod[1789]: src/modem.c:__ofono_modem_append_properties() Ifname (null)
ofonod[1789]: src/modem.c:call_modemwatches() 0x8d27718 added:1
ofonod[1789]: plugins/smart-messaging.c:modem_watch() modem: 0x8d27718,
added: 1
ofonod[1789]: plugins/push-notification.c:modem_watch() modem: 0x8d27718,
added: 1
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27718 property
NetworkInterface
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27718 property
SysPath
ofonod[1789]: src/modem.c:__ofono_modem_append_properties() Ifname (null)
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27150 property
NetworkInterface
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27150 property
SysPath
ofonod[1789]: src/modem.c:__ofono_modem_append_properties() Ifname (null)
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27718 property
NetworkInterface
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27718 property
SysPath
ofonod[1789]: src/modem.c:__ofono_modem_append_properties() Ifname (null)
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27150 property
NetworkInterface
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27150 property
SysPath
ofonod[1789]: src/modem.c:__ofono_modem_append_properties() Ifname (null)
ofonod[1789]: plugins/telit.c:telit_enable() 0x8d27150
ofonod[1789]: src/modem.c:get_modem_property() modem 0x8d27150 property
Modem
ofonod[1789]: plugins/telit.c:open_device() Modem /dev/ttyACM1
I also used gdbserver to find out where the problem is. Here is the
backtrace from where i think the failure is :
│230 }
│231 }
│232
│233 fd = open(tty, O_RDWR | O_NOCTTY |
O_NONBLOCK);
/* the open function fails and returns -1 */
│234 if (fd < 0)
│235 return -1;
│236
│237 tcflush(fd, TCIOFLUSH);
#0 open_device (tty=0x8d27e08 "/dev/ttyACM1", options=0x8d1dbb0) at
gatchat/gattty.c:233
#1 g_at_tty_open (tty=0x8d27e08 "/dev/ttyACM1", options=0x8d1dbb0) at
gatchat/gattty.c:248
#2 0x080bd823 in open_device (modem=<value optimized out>, key=<value
optimized out>, debug=0x81227a8 "Modem: ")
at plugins/telit.c:210
#3 0x080bd8f3 in telit_enable (modem=0x8d27150) at plugins/telit.c:386
#4 0x080c0982 in set_powered (modem=0x8d27150, powered=1) at
src/modem.c:885
#5 0x080c19fc in modem_set_property (conn=0x8d1f178, msg=0x8d2bca0,
data=0x8d27150) at src/modem.c:1097
#6 0x08054e14 in process_message (connection=0x8d1f178,
message=0xbf834460, method=0x8d2b614,
iface_user_data=0x8d27150) at gdbus/object.c:224
#7 0xb77e12b2 in ?? ()
#8 0xb77d6544 in ?? ()
#9 0x08053bd0 in message_dispatch (data=0xb77f8ff4) at gdbus/mainloop.c:80
#10 0xb782d829 in ?? ()
#11 0xb782cf7d in ?? ()
#12 0xb782efee in ?? ()
#13 0xb783003e in ?? ()
#14 0x080bf1ff in main (argc=1, argv=0xbf834a54) at src/main.c:260
Here is what I have got so far...
I don't understand why this open fails when the Option is plugged in since
they don't use the same device ports (ttyACM? for HE910, and ttyHS? for
GTM382)
Thanks in advance for your help,
Etienne Mabille