Telit ME910C1-WW not detected
by Dresdo Gabriele
Hello,
I'm new to oFono, I'm trying to setup a Telit ME910C1 with oFono 1.18 in our embedded system (ARMHF) with Debian stretch kernel 4.9.11 but list-modems returns no results.
I installed ofono packet using apt-get
I can send and receive AT commands to the modem using a terminal connected to /dev/ttyUSB1
I paste Log from ofonod -dn.
Any suggestion will be useful
Thanks
Gabriele
ofonod[592]: oFono version 1.18
ofonod[592]: src/plugin.c:__ofono_plugin_init()
ofonod[592]: plugins/push-notification.c:push_notification_init()
ofonod[592]: plugins/smart-messaging.c:smart_messaging_init()
ofonod[592]: src/cdma-provision.c:ofono_cdma_provision_driver_register() driver: 0x54c3f868 name: CDMA provisioning
ofonod[592]: src/gprs-provision.c:ofono_gprs_provision_driver_register() driver: 0x54c3f83c name: Provisioning
ofonod[592]: plugins/upower.c:upower_init() upower init
ofonod[592]: src/handsfree-audio.c:ofono_handsfree_card_driver_register() driver: 0x54c3f7e8
ofonod[592]: plugins/dun_gw_bluez5.c:dun_gw_init()
ofonod[592]: src/handsfree-audio.c:ofono_handsfree_card_driver_register() driver: 0x54c3f74c
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f760, name: hfp
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f704, name: ublox
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f6ac, name: quectel
ofonod[592]: plugins/he910.c:he910_init()
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f65c, name: he910
ofonod[592]: plugins/connman.c:connman_init()
ofonod[592]: src/private-network.c:ofono_private_network_driver_register() driver: 0x54c3f630, name: ConnMan Private Network
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f5e8, name: sim900
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f5a0, name: samsung
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f558, name: speedupcdma
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f508, name: speedup
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f4c0, name: alcatel
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f468, name: icera
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f420, name: linktop
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f3d8, name: nokiacdma
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f390, name: nokia
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f348, name: cinterion
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f2c0, name: ste
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f268, name: ifx
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f220, name: palmpre
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f1d0, name: novatel
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f188, name: sierra
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f110, name: huawei
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f0c8, name: zte
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f068, name: hso
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3f018, name: mbm
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3efc8, name: calypso
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3ef80, name: wavecom
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3ef38, name: g1
ofonod[592]: src/cdma-voicecall.c:ofono_cdma_voicecall_driver_register() driver: 0x54c3eedc, name: cdmamodem
ofonod[592]: src/modem.c:ofono_devinfo_driver_register() driver: 0x54c3ef04, name: cdmamodem
ofonod[592]: src/cdma-connman.c:ofono_cdma_connman_driver_register() driver: 0x54c3ef24, name: cdmamodem
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3ee3c, name: phonesim
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3ee6c, name: localhfp
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3ee20, name: phonesim
ofonod[592]: src/ctm.c:ofono_ctm_driver_register() driver: 0x54c3ee0c, name: phonesim
ofonod[592]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x54c3ede4, name: phonesim
ofonod[592]: plugins/phonesim.c:parse_config() filename /etc/ofono/phonesim.conf
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3edc8, name: ubloxmodem
ofonod[592]: src/ussd.c:ofono_ussd_driver_register() driver: 0x54c3ed8c, name: speedupmodem
ofonod[592]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x54c3ec48, name: hfpmodem
ofonod[592]: src/modem.c:ofono_devinfo_driver_register() driver: 0x54c3ecec, name: hfpmodem
ofonod[592]: src/network.c:ofono_netreg_driver_register() driver: 0x54c3eca0, name: hfpmodem
ofonod[592]: src/call-volume.c:ofono_call_volume_driver_register() driver: 0x54c3ecd4, name: hfpmodem
ofonod[592]: src/handsfree.c:ofono_handsfree_driver_register() driver: 0x54c3ed1c, name: hfpmodem
ofonod[592]: src/siri.c:ofono_siri_driver_register() driver: 0x54c3ed54, name: hfpmodem
ofonod[592]: src/network.c:ofono_netreg_driver_register() driver: 0x54c3ebc0, name: dunmodem
ofonod[592]: src/gprs.c:ofono_gprs_driver_register() driver: 0x54c3ebe4, name: dunmodem
ofonod[592]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x54c3eaf0, name: stemodem
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3eb7c, name: stemodem
ofonod[592]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x54c3eb40, name: stemodem
ofonod[592]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x54c3e9cc, name: ifxmodem
ofonod[592]: src/audio-settings.c:ofono_audio_settings_driver_register() driver: 0x54c3ea24, name: ifxmodem
ofonod[592]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x54c3ea38, name: ifxmodem
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3ea70, name: ifxmodem
ofonod[592]: src/stk.c:ofono_stk_driver_register() driver: 0x54c3ea9c, name: ifxmodem
ofonod[592]: src/ctm.c:ofono_ctm_driver_register() driver: 0x54c3eabc, name: ifxmodem
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3e958, name: hsomodem
ofonod[592]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x54c3e97c, name: hsomodem
ofonod[592]: src/location-reporting.c:ofono_location_reporting_driver_register() driver: 0x54c3e918, name: telitmodem
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3e88c, name: mbmmodem
ofonod[592]: src/stk.c:ofono_stk_driver_register() driver: 0x54c3e8b0, name: mbmmodem
ofonod[592]: src/location-reporting.c:ofono_location_reporting_driver_register() driver: 0x54c3e8d0, name: mbmmodem
ofonod[592]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x54c3e7f4, name: calypsomodem
ofonod[592]: src/stk.c:ofono_stk_driver_register() driver: 0x54c3e844, name: calypsomodem
ofonod[592]: src/ussd.c:ofono_ussd_driver_register() driver: 0x54c3e6f8, name: huaweimodem
ofonod[592]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x54c3e70c, name: huaweimodem
ofonod[592]: src/audio-settings.c:ofono_audio_settings_driver_register() driver: 0x54c3e75c, name: huaweimodem
ofonod[592]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x54c3e794, name: huaweimodem
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3e770, name: huaweimodem
ofonod[592]: src/cdma-netreg.c:ofono_cdma_netreg_driver_register() driver: 0x54c3e7c4, name: huaweimodem
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3e67c, name: iceramodem
ofonod[592]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x54c3e6a8, name: iceramodem
ofonod[592]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x54c3e624, name: ztemodem
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3e5e0, name: swmodem
ofonod[592]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x54c3e598, name: nwmodem
ofonod[592]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x54c3e40c, name: atmodem
ofonod[592]: src/modem.c:ofono_devinfo_driver_register() driver: 0x54c3e4a4, name: atmodem
ofonod[592]: src/call-barring.c:ofono_call_barring_driver_register() driver: 0x54c3e45c, name: atmodem
ofonod[592]: src/call-forwarding.c:ofono_call_forwarding_driver_register() driver: 0x54c3e1e4, name: atmodem
ofonod[592]: src/call-meter.c:ofono_call_meter_driver_register() driver: 0x54c3e224, name: atmodem
ofonod[592]: src/call-settings.c:ofono_call_settings_driver_register() driver: 0x54c3e130, name: atmodem
ofonod[592]: src/phonebook.c:ofono_phonebook_driver_register() driver: 0x54c3e48c, name: atmodem
ofonod[592]: src/ussd.c:ofono_ussd_driver_register() driver: 0x54c3e3e8, name: atmodem
ofonod[592]: src/sms.c:ofono_sms_driver_register() driver: 0x54c3e1a0, name: atmodem
ofonod[592]: src/sim.c:ofono_sim_driver_register() driver: 0x54c3e328, name: atmodem
ofonod[592]: src/sim.c:ofono_sim_driver_register() driver: 0x54c3e370, name: atmodem-noef
ofonod[592]: src/stk.c:ofono_stk_driver_register() driver: 0x54c3e3c0, name: atmodem
ofonod[592]: src/network.c:ofono_netreg_driver_register() driver: 0x54c3e288, name: atmodem
ofonod[592]: src/cbs.c:ofono_cbs_driver_register() driver: 0x54c3e1c8, name: atmodem
ofonod[592]: src/call-volume.c:ofono_call_volume_driver_register() driver: 0x54c3e4d4, name: atmodem
ofonod[592]: src/gprs.c:ofono_gprs_driver_register() driver: 0x54c3e504, name: atmodem
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3e518, name: atmodem
ofonod[592]: src/sim-auth.c:ofono_sim_auth_driver_register() driver: 0x54c3e53c, name: atmodem
ofonod[592]: src/gnss.c:ofono_gnss_driver_register() driver: 0x54c3e55c, name: atmodem
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3e090, name: gobi
ofonod[592]: src/modem.c:ofono_devinfo_driver_register() driver: 0x54c3ded0, name: qmimodem
ofonod[592]: src/network.c:ofono_netreg_driver_register() driver: 0x54c3df38, name: qmimodem
ofonod[592]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x54c3def0, name: qmimodem
ofonod[592]: src/sim.c:ofono_sim_driver_register() driver: 0x54c3df5c, name: qmimodem-legacy
ofonod[592]: src/sim.c:ofono_sim_driver_register() driver: 0x54c3dfa4, name: qmimodem
ofonod[592]: src/sms.c:ofono_sms_driver_register() driver: 0x54c3dfec, name: qmimodem
ofonod[592]: src/ussd.c:ofono_ussd_driver_register() driver: 0x54c3e00c, name: qmimodem
ofonod[592]: src/gprs.c:ofono_gprs_driver_register() driver: 0x54c3e020, name: qmimodem
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3e034, name: qmimodem
ofonod[592]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x54c3e050, name: qmimodem
ofonod[592]: src/location-reporting.c:ofono_location_reporting_driver_register() driver: 0x54c3e078, name: qmimodem
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3de68, name: u8500
ofonod[592]: src/modem.c:ofono_devinfo_driver_register() driver: 0x54c3de48, name: u8500
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3de00, name: n900
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3ddb8, name: isiusb
ofonod[592]: src/modem.c:ofono_devinfo_driver_register() driver: 0x54c3db60, name: isimodem
ofonod[592]: src/phonebook.c:ofono_phonebook_driver_register() driver: 0x54c3db50, name: isimodem
ofonod[592]: src/network.c:ofono_netreg_driver_register() driver: 0x54c3db80, name: isimodem
ofonod[592]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x54c3dba4, name: isimodem
ofonod[592]: src/sms.c:ofono_sms_driver_register() driver: 0x54c3dbec, name: isimodem
ofonod[592]: src/cbs.c:ofono_cbs_driver_register() driver: 0x54c3dc0c, name: isimodem
ofonod[592]: src/sim.c:ofono_sim_driver_register() driver: 0x54c3dc20, name: isimodem
ofonod[592]: src/ussd.c:ofono_ussd_driver_register() driver: 0x54c3dc68, name: isimodem
ofonod[592]: src/call-forwarding.c:ofono_call_forwarding_driver_register() driver: 0x54c3dc7c, name: isimodem
ofonod[592]: src/call-settings.c:ofono_call_settings_driver_register() driver: 0x54c3dc9c, name: isimodem
ofonod[592]: src/call-barring.c:ofono_call_barring_driver_register() driver: 0x54c3dccc, name: isimodem
ofonod[592]: src/call-meter.c:ofono_call_meter_driver_register() driver: 0x54c3dce4, name: isimodem
ofonod[592]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x54c3dd0c, name: isimodem
ofonod[592]: src/gprs.c:ofono_gprs_driver_register() driver: 0x54c3dd34, name: isimodem
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3dd48, name: isimodem
ofonod[592]: src/audio-settings.c:ofono_audio_settings_driver_register() driver: 0x54c3dd64, name: isimodem
ofonod[592]: src/sim.c:ofono_sim_driver_register() driver: 0x54c3dd70, name: wgmodem2.5
ofonod[592]: drivers/rilmodem/rilmodem.c:rilmodem_init()
ofonod[592]: src/modem.c:ofono_devinfo_driver_register() driver: 0x54c3d928, name: rilmodem
ofonod[592]: drivers/rilmodem/sim.c:ril_sim_init()
ofonod[592]: src/sim.c:ofono_sim_driver_register() driver: 0x54c3d9fc, name: rilmodem
ofonod[592]: src/voicecall.c:ofono_voicecall_driver_register() driver: 0x54c3d96c, name: rilmodem
ofonod[592]: src/sms.c:ofono_sms_driver_register() driver: 0x54c3da44, name: rilmodem
ofonod[592]: src/network.c:ofono_netreg_driver_register() driver: 0x54c3d948, name: rilmodem
ofonod[592]: src/call-volume.c:ofono_call_volume_driver_register() driver: 0x54c3d9b4, name: rilmodem
ofonod[592]: src/gprs.c:ofono_gprs_driver_register() driver: 0x54c3d9cc, name: rilmodem
ofonod[592]: src/gprs.c:ofono_gprs_context_driver_register() driver: 0x54c3d9e0, name: rilmodem
ofonod[592]: src/ussd.c:ofono_ussd_driver_register() driver: 0x54c3da64, name: rilmodem
ofonod[592]: src/call-settings.c:ofono_call_settings_driver_register() driver: 0x54c3da78, name: rilmodem
ofonod[592]: src/call-forwarding.c:ofono_call_forwarding_driver_register() driver: 0x54c3daa8, name: rilmodem
ofonod[592]: src/radio-settings.c:ofono_radio_settings_driver_register() driver: 0x54c3dac8, name: rilmodem
ofonod[592]: src/call-barring.c:ofono_call_barring_driver_register() driver: 0x54c3daf0, name: rilmodem
ofonod[592]: src/netmon.c:ofono_netmon_driver_register() driver: 0x54c3db08, name: rilmodem
ofonod[592]: src/stk.c:ofono_stk_driver_register() driver: 0x54c3db18, name: rilmodem
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3d8c0, name: ril_sofia3gr
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3d878, name: infineon
ofonod[592]: src/modem.c:ofono_modem_driver_register() driver: 0x54c3d830, name: ril
ofonod[592]: plugins/udevng.c:udev_start()
ofonod[592]: plugins/udevng.c:enumerate_devices()
ofonod[592]: plugins/udevng.c:check_usb_device() hub [(null):(null)]
ofonod[592]: plugins/udevng.c:check_usb_device() hub [(null):(null)]
ofonod[592]: plugins/udevng.c:check_usb_device() usb [0424:2514]
ofonod[592]: plugins/udevng.c:check_usb_device() usb [1bc7:1101]
ofonod[592]: plugins/udevng.c:check_usb_device() option [(null):(null)]
ofonod[592]: plugins/udevng.c:check_usb_device() option [1bc7:1101]
ofonod[592]: plugins/udevng.c:add_device() /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.3
ofonod[592]: plugins/udevng.c:add_device() /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.3/2-1.3:1.0/ttyUSB0/tty/ttyUSB0
ofonod[592]: plugins/udevng.c:add_device() /dev/ttyUSB0 (telit) 255/255/255 [00] ==> (null) (null)
ofonod[592]: plugins/udevng.c:check_usb_device() option [(null):(null)]
ofonod[592]: plugins/udevng.c:check_usb_device() option [1bc7:1101]
ofonod[592]: plugins/udevng.c:add_device() /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.3
ofonod[592]: plugins/udevng.c:add_device() /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.3/2-1.3:1.1/ttyUSB1/tty/ttyUSB1
ofonod[592]: plugins/udevng.c:add_device() /dev/ttyUSB1 (telit) 255/255/255 [01] ==> (null) (null)
ofonod[592]: plugins/udevng.c:check_usb_device() option [(null):(null)]
ofonod[592]: plugins/udevng.c:check_usb_device() option [1bc7:1101]
ofonod[592]: plugins/udevng.c:add_device() /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.3
ofonod[592]: plugins/udevng.c:add_device() /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.3/2-1.3:1.2/ttyUSB2/tty/ttyUSB2
ofonod[592]: plugins/udevng.c:add_device() /dev/ttyUSB2 (telit) 255/254/255 [02] ==> (null) (null)
ofonod[592]: plugins/udevng.c:check_usb_device() option [(null):(null)]
ofonod[592]: plugins/udevng.c:check_usb_device() option [1bc7:1101]
ofonod[592]: plugins/udevng.c:add_device() /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.3
ofonod[592]: plugins/udevng.c:add_device() /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.3/2-1.3:1.3/ttyUSB3/tty/ttyUSB3
ofonod[592]: plugins/udevng.c:add_device() /dev/ttyUSB3 (telit) 255/255/255 [03] ==> (null) (null)
ofonod[592]: plugins/udevng.c:check_usb_device() hub [(null):(null)]
ofonod[592]: plugins/udevng.c:create_modem() /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.3
ofonod[592]: plugins/udevng.c:create_modem() driver=telit
ofonod[592]: src/modem.c:ofono_modem_create() name: (null), type: telit
ofonod[592]: plugins/udevng.c:setup_telit() /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb2/2-1/2-1.3
ofonod[592]: plugins/udevng.c:setup_telit() /dev/ttyUSB0 255/255/255 00 (null)
ofonod[592]: plugins/udevng.c:setup_telit() /dev/ttyUSB1 255/255/255 01 (null)
ofonod[592]: plugins/udevng.c:setup_telit() /dev/ttyUSB2 255/254/255 02 (null)
ofonod[592]: plugins/udevng.c:setup_telit() /dev/ttyUSB3 255/255/255 03 (null)
ofonod[592]: plugins/udevng.c:setup_telit() modem=/dev/ttyUSB0 aux=/dev/ttyUSB3 gps=(null) diag=/dev/ttyUSB1
ofonod[592]: src/modem.c:set_modem_property() modem 0x55d8e3d8 property Modem
ofonod[592]: src/modem.c:set_modem_property() modem 0x55d8e3d8 property Aux
ofonod[592]: src/modem.c:set_modem_property() modem 0x55d8e3d8 property GPS
ofonod[592]: src/modem.c:ofono_modem_register() 0x55d8e3d8
12 months
[PATCH] gprs: Postpone attach decisions until netreg is finished
by richard.rojfors@gmail.com
From: Richard Röjfors <richard(a)puffinpack.se>
In case the gprs_netreg_update is called from somewhere else
than the actual netreg update before any netreg updates have
happened. It can not make proper decisions. For instance
we might run on EUTRAN but it does not know yet. So check
if the technology is known to netreg, if not just return
since netreg will kick us when its finished initialising,
which will be very soon.
---
src/gprs.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/gprs.c b/src/gprs.c
index bdb8c8a2..4e79c528 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -1660,6 +1660,16 @@ static void gprs_netreg_removed(struct ofono_gprs *gprs)
static void gprs_netreg_update(struct ofono_gprs *gprs)
{
ofono_bool_t attach;
+ int technology;
+
+ technology = ofono_netreg_get_technology(gprs->netreg);
+
+ /* If we are called before netreg has updated us, just return
+ * we will get called again when the technology is available
+ * and we can make better decisions
+ */
+ if (technology == -1)
+ return;
attach = gprs->netreg_status == NETWORK_REGISTRATION_STATUS_REGISTERED;
@@ -1670,8 +1680,7 @@ static void gprs_netreg_update(struct ofono_gprs *gprs)
DBG("attach: %u, driver_attached: %u", attach, gprs->driver_attached);
- if (ofono_netreg_get_technology(gprs->netreg) ==
- ACCESS_TECHNOLOGY_EUTRAN && have_read_settings(gprs))
+ if (technology == ACCESS_TECHNOLOGY_EUTRAN && have_read_settings(gprs))
/*
* For LTE we set attached status only on successful
* context activation.
--
2.20.1
1 year, 6 months
[PATCH] atmodem: Check for auto activated contexts during init
by richard.rojfors@gmail.com
From: Richard Röjfors <richard(a)puffinpack.se>
To detect if a context gets activated before we register
for unsolicited events we need to check if any is
already activated, and flag it auto activated.
---
drivers/atmodem/gprs.c | 47 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/drivers/atmodem/gprs.c b/drivers/atmodem/gprs.c
index fbee5c94..10108281 100644
--- a/drivers/atmodem/gprs.c
+++ b/drivers/atmodem/gprs.c
@@ -43,6 +43,7 @@
static const char *cgreg_prefix[] = { "+CGREG:", NULL };
static const char *cgdcont_prefix[] = { "+CGDCONT:", NULL };
+static const char *cgact_prefix[] = { "+CGACT:", NULL };
static const char *none_prefix[] = { NULL };
struct gprs_data {
@@ -192,6 +193,48 @@ static void at_cgdcont_read_cb(gboolean ok, GAtResult *result,
activated_cid);
}
+static void at_cgact_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+ struct ofono_gprs *gprs = user_data;
+ struct gprs_data *gd = ofono_gprs_get_data(gprs);
+ GAtResultIter iter;
+
+ DBG("ok %d", ok);
+
+ if (!ok) {
+ ofono_warn("Can't read CGACT contexts.");
+ return;
+ }
+
+ g_at_result_iter_init(&iter, result);
+
+ while (g_at_result_iter_next(&iter, "+CGACT:")) {
+ int read_cid = -1;
+ int read_status = -1;
+
+ if (!g_at_result_iter_next_number(&iter, &read_cid))
+ break;
+
+ if (!g_at_result_iter_next_number(&iter, &read_status))
+ break;
+
+ if (read_status != 1)
+ continue;
+
+ /* Flag this as auto context as it was obviously active */
+ if (gd->last_auto_context_id == 0)
+ gd->last_auto_context_id = read_cid;
+
+ if (read_cid != gd->last_auto_context_id)
+ continue;
+
+ g_at_chat_send(gd->chat, "AT+CGDCONT?", cgdcont_prefix,
+ at_cgdcont_read_cb, gprs, NULL);
+
+ break;
+ }
+}
+
static void cgreg_notify(GAtResult *result, gpointer user_data)
{
struct ofono_gprs *gprs = user_data;
@@ -495,6 +538,10 @@ static void gprs_initialized(gboolean ok, GAtResult *result, gpointer user_data)
break;
}
+ /* Check if there is any already activated contexts at init */
+ g_at_chat_send(gd->chat, "AT+CGACT?", cgact_prefix,
+ at_cgact_cb, gprs, NULL);
+
ofono_gprs_register(gprs);
}
--
2.20.1
1 year, 7 months
Setting "RoamingAllowed" on by default; or storing persistently
by Tarmo Kuuse
Hi!
I'd like for my device to automatically connect to 3G data in roaming
wherever the GSM network permits it. I'd very much like to set this up
as default during manufacturing regardless of the SIM inserted. ofono
version 1.21 (debian buster).
I can tell ofono to enable roaming manually - either via the config file
(e.g. /var/lib/ofono/248030010014875/gprs) or dbus interface (e.g.
dbus-send --system --print-reply --dest=org.ofono /quectel_0
org.ofono.ConnectionManager.SetProperty string:"RoamingAllowed"
variant:boolean:true), but it does not seem to be stored persistently.
After a reboot ofono has disabled roaming again and the config file
holds "RoamingAllowed=0".
So my questions are:
1. can I set up ofono to always permit data connections in roaming?
2. if not, can I at least store RoamingAllowed persistently per SIM card?
As context: working on a 3G-equipped gateway device, factory-installed
with a roaming-enabled SIM card and typically shipped to a foreign
country (mostly within EU where data roaming incurs no penalty). It's
rather desirable that 3G comes online without requiring any setup
whatsoever once the gateway is powered on in destination country.
--
Kind regards
Tarmo Kuuse
1 year, 7 months
Detecting if a modem has dialing support
by Matt Ranostay
Hello et al,
So there are a few modems that org.ofono.VoiceCallManager interfaces
but don't have Dial support, and there is no programmatic way to check
without dialing attempting to dial a valid phone number.
Can't pass an empty string to test since it would fail the
Error.InvalidFormat test before Error.NotImplemented. The usecase for
this is we are using several modems per device (including HandsFree)
and want to know in the userspace application which can dial a
respective phone number.
Thanks,
Matt
1 year, 7 months
[PATCHv3 1/4] quectel: add dbus hardware interface
by Martin Hundebøll
For now the interface only exposes the modem supply voltage, but is
added as a preparation for signaling power events.
---
Changes since v2:
* updated commit message
Changes since v1:
* use and export int32_t for all three properties
* place dbus functions below close_serial()
* remove doc/ changes
* update comments for charge status and level
* unregister dbus api after canceling/unregister at chats
plugins/quectel.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 158 insertions(+)
diff --git a/plugins/quectel.c b/plugins/quectel.c
index 9cac92fa..efdb7617 100644
--- a/plugins/quectel.c
+++ b/plugins/quectel.c
@@ -37,6 +37,7 @@
#include <gattty.h>
#define OFONO_API_SUBJECT_TO_CHANGE
+#include <ofono.h>
#include <ofono/plugin.h>
#include <ofono/modem.h>
#include <ofono/devinfo.h>
@@ -49,12 +50,16 @@
#include <ofono/gprs.h>
#include <ofono/gprs-context.h>
#include <ofono/log.h>
+#include <ofono/dbus.h>
+
+#include <gdbus/gdbus.h>
#include <drivers/atmodem/atutil.h>
#include <drivers/atmodem/vendor.h>
static const char *cfun_prefix[] = { "+CFUN:", NULL };
static const char *cpin_prefix[] = { "+CPIN:", NULL };
+static const char *cbc_prefix[] = { "+CBC:", NULL };
static const char *qinistat_prefix[] = { "+QINISTAT:", NULL };
static const char *cgmm_prefix[] = { "UC15", "Quectel_M95", "Quectel_MC60",
NULL };
@@ -95,6 +100,16 @@ struct quectel_data {
struct l_gpio_writer *gpio;
};
+struct dbus_hw {
+ DBusMessage *msg;
+ struct ofono_modem *modem;
+ int32_t charge_status;
+ int32_t charge_level;
+ int32_t voltage;
+};
+
+static const char dbus_hw_interface[] = OFONO_SERVICE ".quectel.Hardware";
+
static void quectel_debug(const char *str, void *user_data)
{
const char *prefix = user_data;
@@ -227,6 +242,142 @@ static void close_serial(struct ofono_modem *modem)
ofono_modem_set_powered(modem, false);
}
+static void dbus_hw_reply_properties(struct dbus_hw *hw)
+{
+ struct quectel_data *data = ofono_modem_get_data(hw->modem);
+ DBusMessage *reply;
+ DBusMessageIter dbus_iter;
+ DBusMessageIter dbus_dict;
+
+ DBG("%p", hw->modem);
+
+ reply = dbus_message_new_method_return(hw->msg);
+ dbus_message_iter_init_append(reply, &dbus_iter);
+ dbus_message_iter_open_container(&dbus_iter, DBUS_TYPE_ARRAY,
+ OFONO_PROPERTIES_ARRAY_SIGNATURE,
+ &dbus_dict);
+
+ /*
+ * the charge status/level received from m95 and mc60 are invalid so
+ * only return those for the UC15 modem.
+ */
+ if (data->model == QUECTEL_UC15) {
+ ofono_dbus_dict_append(&dbus_dict, "ChargeStatus",
+ DBUS_TYPE_INT32, &hw->charge_status);
+
+ ofono_dbus_dict_append(&dbus_dict, "ChargeLevel",
+ DBUS_TYPE_INT32, &hw->charge_level);
+ }
+
+ ofono_dbus_dict_append(&dbus_dict, "Voltage", DBUS_TYPE_INT32,
+ &hw->voltage);
+
+ dbus_message_iter_close_container(&dbus_iter, &dbus_dict);
+
+ __ofono_dbus_pending_reply(&hw->msg, reply);
+}
+
+static void cbc_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+ struct dbus_hw *hw = user_data;
+ GAtResultIter iter;
+
+ DBG("%p", hw->modem);
+
+ if (!hw->msg)
+ return;
+
+ if (!ok)
+ goto error;
+
+ g_at_result_iter_init(&iter, result);
+
+ if (!g_at_result_iter_next(&iter, "+CBC:"))
+ goto error;
+
+ /* the returned charge status is valid only for uc15 */
+ if (!g_at_result_iter_next_number(&iter, &hw->charge_status))
+ goto error;
+
+ /* the returned charge level is valid only for uc15 */
+ if (!g_at_result_iter_next_number(&iter, &hw->charge_level))
+ goto error;
+
+ /* now comes the millivolts */
+ if (!g_at_result_iter_next_number(&iter, &hw->voltage))
+ goto error;
+
+ dbus_hw_reply_properties(hw);
+
+ return;
+
+error:
+ __ofono_dbus_pending_reply(&hw->msg, __ofono_error_failed(hw->msg));
+}
+
+static DBusMessage *dbus_hw_get_properties(DBusConnection *conn,
+ DBusMessage *msg,
+ void *user_data)
+{
+ struct dbus_hw *hw = user_data;
+ struct quectel_data *data = ofono_modem_get_data(hw->modem);
+
+ DBG("%p", hw->modem);
+
+ if (hw->msg != NULL)
+ return __ofono_error_busy(msg);
+
+ if (!g_at_chat_send(data->aux, "AT+CBC", cbc_prefix, cbc_cb, hw, NULL))
+ return __ofono_error_failed(msg);
+
+ hw->msg = dbus_message_ref(msg);
+
+ return NULL;
+}
+
+static const GDBusMethodTable dbus_hw_methods[] = {
+ { GDBUS_ASYNC_METHOD("GetProperties",
+ NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+ dbus_hw_get_properties) },
+ {}
+};
+
+static void dbus_hw_cleanup(void *data)
+{
+ struct dbus_hw *hw = data;
+
+ DBG("%p", hw->modem);
+
+ if (hw->msg)
+ __ofono_dbus_pending_reply(&hw->msg,
+ __ofono_error_canceled(hw->msg));
+
+ l_free(hw);
+}
+
+static void dbus_hw_enable(struct ofono_modem *modem)
+{
+ DBusConnection *conn = ofono_dbus_get_connection();
+ const char *path = ofono_modem_get_path(modem);
+ struct dbus_hw *hw;
+
+ DBG("%p", modem);
+
+ hw = l_new(struct dbus_hw, 1);
+ hw->modem = modem;
+
+ if (!g_dbus_register_interface(conn, path, dbus_hw_interface,
+ dbus_hw_methods, NULL, NULL,
+ hw, dbus_hw_cleanup)) {
+ ofono_error("Could not register %s interface under %s",
+ dbus_hw_interface, path);
+ l_free(hw);
+ return;
+ }
+
+ ofono_modem_add_interface(modem, dbus_hw_interface);
+}
+
static void cpin_notify(GAtResult *result, gpointer user_data)
{
struct ofono_modem *modem = user_data;
@@ -253,6 +404,8 @@ static void cpin_notify(GAtResult *result, gpointer user_data)
g_at_chat_unregister(data->aux, data->cpin_ready);
data->cpin_ready = 0;
+
+ dbus_hw_enable(modem);
}
static void cpin_query(gboolean ok, GAtResult *result, gpointer user_data)
@@ -650,6 +803,8 @@ static void cfun_disable(gboolean ok, GAtResult *result, gpointer user_data)
static int quectel_disable(struct ofono_modem *modem)
{
struct quectel_data *data = ofono_modem_get_data(modem);
+ DBusConnection *conn = ofono_dbus_get_connection();
+ const char *path = ofono_modem_get_path(modem);
DBG("%p", modem);
@@ -659,6 +814,9 @@ static int quectel_disable(struct ofono_modem *modem)
g_at_chat_cancel_all(data->aux);
g_at_chat_unregister_all(data->aux);
+ if (g_dbus_unregister_interface(conn, path, dbus_hw_interface))
+ ofono_modem_remove_interface(modem, dbus_hw_interface);
+
g_at_chat_send(data->aux, "AT+CFUN=0", cfun_prefix, cfun_disable, modem,
NULL);
--
2.22.0
1 year, 7 months
[PATCHv2] test: process-context-settings: add argument for default connection
by Martin Hundebøll
Add an optional argument to specify an interface to as default
connection for the system. This changes the constructed commands so that
the gateway is configured as default route, and nameservers are written
to resolv.conf.
---
I decided to drop the print-instead-execute approach, and simply add the
interface argument to get the default route and dns settings. These
changes were mostly to enable easy setup of internet on my board...
test/process-context-settings | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/test/process-context-settings b/test/process-context-settings
index 7ffb12b3..e0bc1083 100755
--- a/test/process-context-settings
+++ b/test/process-context-settings
@@ -11,6 +11,11 @@ manager = dbus.Interface(bus.get_object('org.ofono', '/'),
modems = manager.GetModems()
+default = None
+if len(sys.argv) > 1:
+ default = sys.argv[1]
+ print("Using %s as default link" % (default), file=sys.stderr)
+
for path, properties in modems:
if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
continue
@@ -50,11 +55,23 @@ for path, properties in modems:
cmd += "/32"
os.system(cmd);
- for i in settings["DomainNameServers"]:
- print(" Nameserver is %s" % (i),
+ if interface == default:
+ cmd = "ip route add default via " + gateway
+ cmd += " dev " + interface
+ os.system(cmd)
+
+ for i,dns in enumerate(settings["DomainNameServers"]):
+ print(" Nameserver is %s" % (dns),
file=sys.stderr)
- cmd = "ip route add " + i
- cmd +=" dev " + interface
+ if interface == default:
+ redirect = " > " if i == 0 else " >> "
+ cmd = "echo nameserver " + dns + redirect
+ cmd += "/etc/resolv.conf"
+ else:
+ cmd = "ip route add " + dns
+ cmd += " dev " + interface
+
os.system(cmd);
+
print('', file=sys.stderr)
--
2.22.0
1 year, 7 months
[PATCH 1/2] atmodem: gprs-context: parse list-less CGDATA response
by Martin Hundebøll
The Quectel M95 and MC60 modems respond to AT+CGDATA=? with a single
+CGDATA="PPP", but the callback in gprs-context expects a list of
protocols.
Avoid falling back to the old-style ATD*99 by not expecting a list of
protocols for serial quectel modems.
---
drivers/atmodem/gprs-context.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
index 4e623a63..f9f3c0ab 100644
--- a/drivers/atmodem/gprs-context.c
+++ b/drivers/atmodem/gprs-context.c
@@ -409,9 +409,11 @@ static void at_cgdata_test_cb(gboolean ok, GAtResult *result,
goto error;
}
- if (!g_at_result_iter_open_list(&iter)) {
- DBG("no list found");
- goto error;
+ if (gcd->vendor != OFONO_VENDOR_QUECTEL_SERIAL) {
+ if (!g_at_result_iter_open_list(&iter)) {
+ DBG("no list found");
+ goto error;
+ }
}
while (!found && g_at_result_iter_next_string(&iter, &data_type)) {
--
2.22.0
1 year, 7 months
[PATCHv2 1/4] quectel: add dbus hardware interface
by Martin Hundebøll
For now the interface only exposes the modem supply voltage, but is
added as a preparation for signaling power events.
---
Changes since v1:
* use and export int32_t for all three properties
* place dbus functions below close_serial()
* remove doc/ changes
* update comments for charge status and level
* unregister dbus api after canceling/unregister at chats
plugins/quectel.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 158 insertions(+)
diff --git a/plugins/quectel.c b/plugins/quectel.c
index 9cac92fa..efdb7617 100644
--- a/plugins/quectel.c
+++ b/plugins/quectel.c
@@ -37,6 +37,7 @@
#include <gattty.h>
#define OFONO_API_SUBJECT_TO_CHANGE
+#include <ofono.h>
#include <ofono/plugin.h>
#include <ofono/modem.h>
#include <ofono/devinfo.h>
@@ -49,12 +50,16 @@
#include <ofono/gprs.h>
#include <ofono/gprs-context.h>
#include <ofono/log.h>
+#include <ofono/dbus.h>
+
+#include <gdbus/gdbus.h>
#include <drivers/atmodem/atutil.h>
#include <drivers/atmodem/vendor.h>
static const char *cfun_prefix[] = { "+CFUN:", NULL };
static const char *cpin_prefix[] = { "+CPIN:", NULL };
+static const char *cbc_prefix[] = { "+CBC:", NULL };
static const char *qinistat_prefix[] = { "+QINISTAT:", NULL };
static const char *cgmm_prefix[] = { "UC15", "Quectel_M95", "Quectel_MC60",
NULL };
@@ -95,6 +100,16 @@ struct quectel_data {
struct l_gpio_writer *gpio;
};
+struct dbus_hw {
+ DBusMessage *msg;
+ struct ofono_modem *modem;
+ int32_t charge_status;
+ int32_t charge_level;
+ int32_t voltage;
+};
+
+static const char dbus_hw_interface[] = OFONO_SERVICE ".quectel.Hardware";
+
static void quectel_debug(const char *str, void *user_data)
{
const char *prefix = user_data;
@@ -227,6 +242,142 @@ static void close_serial(struct ofono_modem *modem)
ofono_modem_set_powered(modem, false);
}
+static void dbus_hw_reply_properties(struct dbus_hw *hw)
+{
+ struct quectel_data *data = ofono_modem_get_data(hw->modem);
+ DBusMessage *reply;
+ DBusMessageIter dbus_iter;
+ DBusMessageIter dbus_dict;
+
+ DBG("%p", hw->modem);
+
+ reply = dbus_message_new_method_return(hw->msg);
+ dbus_message_iter_init_append(reply, &dbus_iter);
+ dbus_message_iter_open_container(&dbus_iter, DBUS_TYPE_ARRAY,
+ OFONO_PROPERTIES_ARRAY_SIGNATURE,
+ &dbus_dict);
+
+ /*
+ * the charge status/level received from m95 and mc60 are invalid so
+ * only return those for the UC15 modem.
+ */
+ if (data->model == QUECTEL_UC15) {
+ ofono_dbus_dict_append(&dbus_dict, "ChargeStatus",
+ DBUS_TYPE_INT32, &hw->charge_status);
+
+ ofono_dbus_dict_append(&dbus_dict, "ChargeLevel",
+ DBUS_TYPE_INT32, &hw->charge_level);
+ }
+
+ ofono_dbus_dict_append(&dbus_dict, "Voltage", DBUS_TYPE_INT32,
+ &hw->voltage);
+
+ dbus_message_iter_close_container(&dbus_iter, &dbus_dict);
+
+ __ofono_dbus_pending_reply(&hw->msg, reply);
+}
+
+static void cbc_cb(gboolean ok, GAtResult *result, gpointer user_data)
+{
+ struct dbus_hw *hw = user_data;
+ GAtResultIter iter;
+
+ DBG("%p", hw->modem);
+
+ if (!hw->msg)
+ return;
+
+ if (!ok)
+ goto error;
+
+ g_at_result_iter_init(&iter, result);
+
+ if (!g_at_result_iter_next(&iter, "+CBC:"))
+ goto error;
+
+ /* the returned charge status is valid only for uc15 */
+ if (!g_at_result_iter_next_number(&iter, &hw->charge_status))
+ goto error;
+
+ /* the returned charge level is valid only for uc15 */
+ if (!g_at_result_iter_next_number(&iter, &hw->charge_level))
+ goto error;
+
+ /* now comes the millivolts */
+ if (!g_at_result_iter_next_number(&iter, &hw->voltage))
+ goto error;
+
+ dbus_hw_reply_properties(hw);
+
+ return;
+
+error:
+ __ofono_dbus_pending_reply(&hw->msg, __ofono_error_failed(hw->msg));
+}
+
+static DBusMessage *dbus_hw_get_properties(DBusConnection *conn,
+ DBusMessage *msg,
+ void *user_data)
+{
+ struct dbus_hw *hw = user_data;
+ struct quectel_data *data = ofono_modem_get_data(hw->modem);
+
+ DBG("%p", hw->modem);
+
+ if (hw->msg != NULL)
+ return __ofono_error_busy(msg);
+
+ if (!g_at_chat_send(data->aux, "AT+CBC", cbc_prefix, cbc_cb, hw, NULL))
+ return __ofono_error_failed(msg);
+
+ hw->msg = dbus_message_ref(msg);
+
+ return NULL;
+}
+
+static const GDBusMethodTable dbus_hw_methods[] = {
+ { GDBUS_ASYNC_METHOD("GetProperties",
+ NULL, GDBUS_ARGS({ "properties", "a{sv}" }),
+ dbus_hw_get_properties) },
+ {}
+};
+
+static void dbus_hw_cleanup(void *data)
+{
+ struct dbus_hw *hw = data;
+
+ DBG("%p", hw->modem);
+
+ if (hw->msg)
+ __ofono_dbus_pending_reply(&hw->msg,
+ __ofono_error_canceled(hw->msg));
+
+ l_free(hw);
+}
+
+static void dbus_hw_enable(struct ofono_modem *modem)
+{
+ DBusConnection *conn = ofono_dbus_get_connection();
+ const char *path = ofono_modem_get_path(modem);
+ struct dbus_hw *hw;
+
+ DBG("%p", modem);
+
+ hw = l_new(struct dbus_hw, 1);
+ hw->modem = modem;
+
+ if (!g_dbus_register_interface(conn, path, dbus_hw_interface,
+ dbus_hw_methods, NULL, NULL,
+ hw, dbus_hw_cleanup)) {
+ ofono_error("Could not register %s interface under %s",
+ dbus_hw_interface, path);
+ l_free(hw);
+ return;
+ }
+
+ ofono_modem_add_interface(modem, dbus_hw_interface);
+}
+
static void cpin_notify(GAtResult *result, gpointer user_data)
{
struct ofono_modem *modem = user_data;
@@ -253,6 +404,8 @@ static void cpin_notify(GAtResult *result, gpointer user_data)
g_at_chat_unregister(data->aux, data->cpin_ready);
data->cpin_ready = 0;
+
+ dbus_hw_enable(modem);
}
static void cpin_query(gboolean ok, GAtResult *result, gpointer user_data)
@@ -650,6 +803,8 @@ static void cfun_disable(gboolean ok, GAtResult *result, gpointer user_data)
static int quectel_disable(struct ofono_modem *modem)
{
struct quectel_data *data = ofono_modem_get_data(modem);
+ DBusConnection *conn = ofono_dbus_get_connection();
+ const char *path = ofono_modem_get_path(modem);
DBG("%p", modem);
@@ -659,6 +814,9 @@ static int quectel_disable(struct ofono_modem *modem)
g_at_chat_cancel_all(data->aux);
g_at_chat_unregister_all(data->aux);
+ if (g_dbus_unregister_interface(conn, path, dbus_hw_interface))
+ ofono_modem_remove_interface(modem, dbus_hw_interface);
+
g_at_chat_send(data->aux, "AT+CFUN=0", cfun_prefix, cfun_disable, modem,
NULL);
--
2.22.0
1 year, 7 months
[PATCH 1/1] ublox: detect and support LARA R2 series
by Jonas Bonn
---
drivers/ubloxmodem/ubloxmodem.c | 9 +++++++++
drivers/ubloxmodem/ubloxmodem.h | 3 ++-
plugins/udevng.c | 2 ++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/ubloxmodem/ubloxmodem.c b/drivers/ubloxmodem/ubloxmodem.c
index 719c77a0..034f7db1 100644
--- a/drivers/ubloxmodem/ubloxmodem.c
+++ b/drivers/ubloxmodem/ubloxmodem.c
@@ -77,6 +77,15 @@ const struct ublox_model ublox_models[] = {
.name = "TOBY-L4906",
.flags = UBLOX_F_TOBY_L4,
},
+ /* LARA L2 series */
+ {
+ .name = "LARA-R202",
+ .flags = UBLOX_F_LARA_R2,
+ },
+ {
+ .name = "LARA-R211",
+ .flags = UBLOX_F_LARA_R2,
+ },
{ /* sentinel */ },
};
diff --git a/drivers/ubloxmodem/ubloxmodem.h b/drivers/ubloxmodem/ubloxmodem.h
index 81fe9481..0bd7ef23 100644
--- a/drivers/ubloxmodem/ubloxmodem.h
+++ b/drivers/ubloxmodem/ubloxmodem.h
@@ -26,7 +26,8 @@
enum ublox_flags {
UBLOX_F_TOBY_L2 = (1 << 0),
UBLOX_F_TOBY_L4 = (1 << 1),
- UBLOX_F_HAVE_USBCONF = (1 << 2),
+ UBLOX_F_LARA_R2 = (1 << 2),
+ UBLOX_F_HAVE_USBCONF = (1 << 3),
};
struct ublox_model {
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 35354a16..1b54b4a2 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -1759,6 +1759,8 @@ static struct {
{ "ublox", "cdc_acm", "1546", "1010" },
{ "ublox", "cdc_ncm", "1546", "1010" },
{ "ublox", "cdc_acm", "1546", "1102" },
+ { "ublox", "cdc_acm", "1546", "110a" },
+ { "ublox", "cdc_ncm", "1546", "110a" },
{ "ublox", "rndis_host", "1546", "1146" },
{ "ublox", "cdc_acm", "1546", "1146" },
{ "gemalto", "option", "1e2d", "0053" },
--
2.20.1
1 year, 7 months