Project

General

Profile

Feature #2308

prepare GPRS for osmo-gsm-tester: try to use ofono to connect to an osmocom GPRS service

Added by neels 28 days ago. Updated 4 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Target version:
-
Start date:
05/30/2017
Due date:
% Done:

0%

Spec Reference:

Description

To prepare adding GPRS to the osmo-gsm-tester, manually run a local GSM network with data services and try querying some URL using ofono and a modem (e.g. the Sierra Wireless model, then the EC20 and Gobi). Does ofono work?

History

#1 Updated by pespin 27 days ago

  • Assignee set to osmo-gsm-tester

#2 Updated by pespin 4 days ago

  • Status changed from New to In Progress
  • Assignee changed from osmo-gsm-tester to pespin

#3 Updated by pespin 4 days ago

I have a Sysmobts+network setup on my desktop (gsm+gprs), and a Sierra Wireless modem.

I power on the modem correct, and register to the bts successfully:

mdbus2 -s org.ofono /sierra_1 org.ofono.Modem.SetProperty Powered true
mdbus2 -s org.ofono /sierra_1 org.ofono.Modem.SetProperty Online true
sleep 3
mdbus2 -s org.ofono /sierra_1 org.ofono.NetworkRegistration.Scan
mdbus2 -s org.ofono /sierra_1 org.ofono.NetworkRegistration.Register
sleep 5
mdbus2 -s org.ofono /sierra_1 org.ofono.NetworkRegistration.Getproperties

After that, I check that the GPRS side is powered, attached and roaming is allowed (Powered=true, Attached=true, RoamingAllowed=true):

mdbus2 -s org.ofono /sierra_1 org.ofono.ConnectionManager.GetProperties
({'Attached': <true>, 'Bearer': <'none'>, 'RoamingAllowed': <true>, 'Powered': <true>, 'Suspended': <false>},)

Then I get the GPRS contexts:

mdbus2 -s org.ofono /sierra_1 org.ofono.ConnectionManager.GetContexts
([('/sierra_1/context1', {'Name': <'Internet'>, 'Active': <false>, 'Type': <'internet'>, 'Protocol': <'ip'>, 'AccessPointName': <''>, 'Username': <''>, 'Password': <''>, 'AuthenticationMethod': <'chap'>, 'Settings': <@a{sv} {}>, 'IPv6.Settings': <@a{sv} {}>})],)

To manage the context, you use the path retrieve in GetContexts: /sierra_1/context1
To Active the context, I then use the following, which fails. While failing the modem is advertised to the kernel as a new device:

mdbus2 -s org.ofono /sierra_3/context1 org.ofono.ConnectionContext.SetProperty Active true
[ERR]: GDBus.Error:org.ofono.Error.Failed: Operation failed

This is what dmesg shows up while calling the failing Active method (usb disconnects + re-connects as new device):

[27027.512675] usb 4-1.2: USB disconnect, device number 8
[27027.513972] qcserial ttyUSB1: Qualcomm USB modem converter now disconnected from ttyUSB1
[27027.514017] qcserial 4-1.2:1.0: device disconnected
[27027.514457] qcserial ttyUSB2: Qualcomm USB modem converter now disconnected from ttyUSB2
[27027.514495] qcserial 4-1.2:1.2: device disconnected
[27027.514881] qcserial ttyUSB3: Qualcomm USB modem converter now disconnected from ttyUSB3
[27027.514919] qcserial 4-1.2:1.3: device disconnected
[27027.515140] qmi_wwan 4-1.2:1.8 wwp0s29u1u2i8: unregister 'qmi_wwan' usb-0000:00:1d.0-1.2, WWAN/QMI device
[27027.541988] qmi_wwan 4-1.2:1.10 wwp0s29u1u2i10: unregister 'qmi_wwan' usb-0000:00:1d.0-1.2, WWAN/QMI device
[27038.726981] usb 4-1.2: new high-speed USB device number 9 using ehci-pci
[27038.827876] usb 4-1.2: config 1 has an invalid interface number: 8 but max is 5
[27038.827881] usb 4-1.2: config 1 has an invalid interface number: 10 but max is 5
[27038.827884] usb 4-1.2: config 1 has an invalid interface number: 11 but max is 5
[27038.827887] usb 4-1.2: config 1 has no interface number 1
[27038.827889] usb 4-1.2: config 1 has no interface number 4
[27038.827891] usb 4-1.2: config 1 has no interface number 5
[27038.830329] qcserial 4-1.2:1.0: Qualcomm USB modem converter detected
[27038.830655] usb 4-1.2: Qualcomm USB modem converter now attached to ttyUSB1
[27038.831138] qcserial 4-1.2:1.2: Qualcomm USB modem converter detected
[27038.831285] usb 4-1.2: Qualcomm USB modem converter now attached to ttyUSB2
[27038.831698] qcserial 4-1.2:1.3: Qualcomm USB modem converter detected
[27038.831863] usb 4-1.2: Qualcomm USB modem converter now attached to ttyUSB3
[27038.832544] qmi_wwan 4-1.2:1.8: cdc-wdm0: USB WDM device
[27038.832960] qmi_wwan 4-1.2:1.8 wwan0: register 'qmi_wwan' at usb-0000:00:1d.0-1.2, WWAN/QMI device, 5a:83:ee:4d:06:f3
[27038.836286] qmi_wwan 4-1.2:1.10: cdc-wdm3: USB WDM device
[27038.836774] qmi_wwan 4-1.2:1.10 wwan1: register 'qmi_wwan' at usb-0000:00:1d.0-1.2, WWAN/QMI device, 5a:83:ee:4d:06:f3

This is what I get in ofonod -d -n while calling that method (basically udev telling ofono that the device is no longer available and that a new one is available):

ofonod[15404]: drivers/qmimodem/gprs-context.c:qmi_activate_primary() cid 1

ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.0/ttyUSB1/tty/ttyUSB1
ofonod[15404]: plugins/udevng.c:destroy_modem() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2
ofonod[15404]: src/modem.c:ofono_modem_remove() 0x1f98850
ofonod[15404]: src/modem.c:modem_unregister() 0x1f98850
ofonod[15404]: src/modem.c:modem_change_state() old state: 3, new state: 0
ofonod[15404]: src/modem.c:flush_atoms()
ofonod[15404]: src/gprs.c:gprs_context_unregister() 0x1f700d0, 0x1f6fdc0
ofonod[15404]: src/gprs.c:gprs_context_remove() atom: 0x1f70140
ofonod[15404]: drivers/qmimodem/gprs-context.c:qmi_gprs_context_remove()
ofonod[15404]: plugins/bluez5.c:bt_unregister_profile() Bluetooth: Unregistering profile /bluetooth/profi
le/dun_gw
ofonod[15404]: src/gprs.c:gprs_unregister() 0x1f6fdc0
ofonod[15404]: src/network.c:__ofono_netreg_remove_status_watch() 0x1f95b00
ofonod[15404]: src/gprs.c:gprs_remove() atom: 0x1f6fe70
ofonod[15404]: drivers/qmimodem/gprs.c:qmi_gprs_remove()
ofonod[15404]: src/ussd.c:ussd_remove() atom: 0x1f98bb0
ofonod[15404]: drivers/qmimodem/ussd.c:qmi_ussd_remove()
ofonod[15404]: src/sim.c:ofono_sim_remove_spn_watch() 0x1f98580
ofonod[15404]: src/network.c:netreg_remove() atom: 0x1f981b0
ofonod[15404]: drivers/qmimodem/network-registration.c:qmi_netreg_remove()
ofonod[15404]: plugins/push-notification.c:push_notification_cleanup() 0x1f6dbb0
ofonod[15404]: plugins/smart-messaging.c:smart_messaging_cleanup() 0x1f98950
ofonod[15404]: src/sms.c:sms_remove() atom: 0x1f1a2c0
ofonod[15404]: drivers/qmimodem/sms.c:qmi_sms_remove()
ofonod[15404]: src/radio-settings.c:radio_settings_remove() atom: 0x1f739f0
ofonod[15404]: drivers/qmimodem/radio-settings.c:qmi_radio_settings_remove()
ofonod[15404]: src/phonebook.c:phonebook_remove() atom: 0x1f739c0
ofonod[15404]: src/stk.c:stk_remove() atom: 0x1f73950
ofonod[15404]: src/location-reporting.c:location_reporting_remove() atom: 0x1f421d0
ofonod[15404]: drivers/qmimodem/location-reporting.c:qmi_location_reporting_remove()
ofonod[15404]: src/voicecall.c:voicecall_remove() atom: 0x1f6bc30
ofonod[15404]: drivers/qmimodem/voicecall.c:qmi_voicecall_remove()
ofonod[15404]: plugins/bluez5.c:bt_unregister_profile() Bluetooth: Unregistering profile /bluetooth/profi
le/hfp_ag
ofonod[15404]: src/sim.c:sim_remove() atom: 0x1f6d860
ofonod[15404]: drivers/qmimodem/sim.c:qmi_sim_remove()
ofonod[15404]: src/modem.c:devinfo_remove() atom: 0x1f6ed80
ofonod[15404]: drivers/qmimodem/devinfo.c:qmi_devinfo_remove()
ofonod[15404]: plugins/gobi.c:gobi_disable() 0x1f98850
ofonod[15404]: src/modem.c:get_modem_property() modem 0x1f98850 property AlwaysOnline
ofonod[15404]: plugins/gobi.c:gobi_remove() 0x1f98850
ofonod[15404]: src/modem.c:unregister_property() property 0x1f1e110
ofonod[15404]: src/modem.c:unregister_property() property 0x1f951e0
ofonod[15404]: src/modem.c:unregister_property() property 0x1f6db40
ofonod[15404]: src/modem.c:unregister_property() property 0x1f6ee50
ofonod[15404]: src/modem.c:unregister_property() property 0x1f6eb50
ofonod[15404]: src/modem.c:emit_modem_removed() 0x1f98850
ofonod[15404]: src/modem.c:call_modemwatches() 0x1f98850 added:0
ofonod[15404]: plugins/dun_gw_bluez5.c:modem_watch() modem: 0x1f98850, added: 0
ofonod[15404]: plugins/hfp_ag_bluez5.c:modem_watch() modem: 0x1f98850, added: 0
ofonod[15404]: plugins/smart-messaging.c:modem_watch() modem: 0x1f98850, added: 0
ofonod[15404]: plugins/push-notification.c:modem_watch() modem: 0x1f98850, added: 0
ofonod[15404]: plugins/udevng.c:destroy_modem() /dev/ttyUSB1
ofonod[15404]: plugins/udevng.c:destroy_modem() /dev/ttyUSB2
ofonod[15404]: plugins/udevng.c:destroy_modem() /dev/ttyUSB3
ofonod[15404]: plugins/udevng.c:destroy_modem() wwp0s29u1u2i8
ofonod[15404]: plugins/udevng.c:destroy_modem() /dev/cdc-wdm0
ofonod[15404]: plugins/udevng.c:destroy_modem() wwp0s29u1u2i10
ofonod[15404]: plugins/udevng.c:destroy_modem() /dev/cdc-wdm3
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.3/ttyUSB3/tty/ttyUSB3
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.0
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.2/ttyUSB2/tty/ttyUSB2
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.2
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.3
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.8/net/wwp0s29u1u2i8
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.8/usbmisc/cdc-wdm0
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.8
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.10/net/wwp0s29u1u2i10
ofonod[15404]: plugins/bluez5.c:unregister_profile_cb()
ofonod[15404]: plugins/bluez5.c:unregister_profile_cb()
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.10/usbmisc/cdc-wdm3
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.11
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2
:1.10
ofonod[15404]: plugins/udevng.c:remove_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2
ofonod[15404]: plugins/udevng.c:check_usb_device() usb [8087:0024]
ofonod[15404]: plugins/udevng.c:check_usb_device() qcserial [1199:68c0]
ofonod[15404]: plugins/udevng.c:check_usb_device() qcserial [1199:68c0]
ofonod[15404]: plugins/udevng.c:check_usb_device() qcserial [1199:68c0]
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.
3/ttyUSB3/tty/ttyUSB3
ofonod[15404]: plugins/udevng.c:add_device() /dev/ttyUSB3 (sierra) 255/0/0 [03] ==> (null) (null)
ofonod[15404]: plugins/udevng.c:check_usb_device() qcserial [1199:68c0]
ofonod[15404]: plugins/udevng.c:check_usb_device() qcserial [1199:68c0]
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.
0/ttyUSB1/tty/ttyUSB1
ofonod[15404]: plugins/udevng.c:add_device() /dev/ttyUSB1 (sierra) 255/255/255 [00] ==> (null) (null)
ofonod[15404]: plugins/udevng.c:check_usb_device() usb [1199:68c0]
ofonod[15404]: plugins/udevng.c:check_usb_device() qmi_wwan [1199:68c0]
ofonod[15404]: plugins/udevng.c:check_usb_device() qcserial [1199:68c0]
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.
2/ttyUSB2/tty/ttyUSB2
ofonod[15404]: plugins/udevng.c:add_device() /dev/ttyUSB2 (sierra) 255/0/0 [02] ==> (null) (null)
ofonod[15404]: plugins/udevng.c:check_usb_device() qmi_wwan [1199:68c0]
ofonod[15404]: plugins/udevng.c:check_usb_device() qmi_wwan [1199:68c0]
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.
10/usbmisc/cdc-wdm3
ofonod[15404]: plugins/udevng.c:add_device() /dev/cdc-wdm3 (sierra) 255/255/255 [0a] ==> (null) (null)
ofonod[15404]: plugins/udevng.c:check_usb_device() qmi_wwan [1199:68c0]
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.
8/usbmisc/cdc-wdm0
ofonod[15404]: plugins/udevng.c:add_device() /dev/cdc-wdm0 (sierra) 255/255/255 [08] ==> (null) (null)
ofonod[15404]: plugins/udevng.c:check_usb_device() qmi_wwan [1199:68c0]
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.10/net/wwp0s29u1u2i10
ofonod[15404]: plugins/udevng.c:add_device() wwp0s29u1u2i10 (sierra) 255/255/255 [0a] ==> (null) (null)
ofonod[15404]: plugins/udevng.c:check_usb_device() qmi_wwan [1199:68c0]
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2
ofonod[15404]: plugins/udevng.c:add_device() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.8/net/wwp0s29u1u2i8
ofonod[15404]: plugins/udevng.c:add_device() wwp0s29u1u2i8 (sierra) 255/255/255 [08] ==> (null) (null)
ofonod[15404]: plugins/udevng.c:check_modem_list()
ofonod[15404]: plugins/udevng.c:create_modem() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2
ofonod[15404]: plugins/udevng.c:create_modem() driver=sierra
ofonod[15404]: src/modem.c:ofono_modem_create() name: (null), type: sierra
ofonod[15404]: plugins/udevng.c:setup_sierra() /sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2
ofonod[15404]: plugins/udevng.c:setup_sierra() /dev/ttyUSB1 255/255/255 00 (null) tty
ofonod[15404]: plugins/udevng.c:setup_sierra() /dev/ttyUSB2 255/0/0 02 (null) tty
ofonod[15404]: plugins/udevng.c:setup_sierra() /dev/ttyUSB3 255/0/0 03 (null) tty
ofonod[15404]: plugins/udevng.c:setup_sierra() wwp0s29u1u2i8 255/255/255 08 (null) net
ofonod[15404]: plugins/udevng.c:setup_sierra() /dev/cdc-wdm0 255/255/255 08 (null) usbmisc
ofonod[15404]: plugins/udevng.c:setup_sierra() wwp0s29u1u2i10 255/255/255 0a (null) net
ofonod[15404]: plugins/udevng.c:setup_sierra() /dev/cdc-wdm3 255/255/255 0a (null) usbmisc
ofonod[15404]: src/modem.c:ofono_modem_set_driver() type: gobi
ofonod[15404]: plugins/udevng.c:setup_sierra() modem=(null) app=(null) net=wwp0s29u1u2i10 diag=(null) qmi=/dev/cdc-wdm3
ofonod[15404]: src/modem.c:set_modem_property() modem 0x1f73800 property Device
ofonod[15404]: src/modem.c:set_modem_property() modem 0x1f73800 property Modem
ofonod[15404]: src/modem.c:set_modem_property() modem 0x1f73800 property App
ofonod[15404]: src/modem.c:set_modem_property() modem 0x1f73800 property Diag
ofonod[15404]: src/modem.c:set_modem_property() modem 0x1f73800 property NetworkInterface
ofonod[15404]: src/modem.c:ofono_modem_register() 0x1f73800
ofonod[15404]: plugins/gobi.c:gobi_probe() 0x1f73800
ofonod[15404]: src/modem.c:emit_modem_added() 0x1f73800
ofonod[15404]: src/modem.c:call_modemwatches() 0x1f73800 added:1
ofonod[15404]: plugins/dun_gw_bluez5.c:modem_watch() modem: 0x1f73800, added: 1
ofonod[15404]: plugins/hfp_ag_bluez5.c:modem_watch() modem: 0x1f73800, added: 1
ofonod[15404]: plugins/smart-messaging.c:modem_watch() modem: 0x1f73800, added: 1
ofonod[15404]: plugins/push-notification.c:modem_watch() modem: 0x1f73800, added: 1

Also available in: Atom PDF