Files
packages/net/modemmanager
Aleksander Morgado a684cdbab0 modemmanager: fix device unplug handling
When a USB modem device is unplugged, we had to do two different
things: first, cleanup the sysfs cache; and second, set interface as
unavailable.

Those two things were never being done properly due to several
different issues:

 * The parent sysfs path retrieval logic relies on checking for which
 sysfs path has the vid/pid files. This logic obviously only works
 when the device is available, and cannot be used on e.g. removal
 events.

 * The command to cleanup the modem wait status from the sysfs cache
 was not removing the previous state properly, because the sysfs path
 variable wasn't escaped properly for the sed command.

This patch handles those issues in order to have a proper device
removal handling, by making sure the sysfs path is properly escaped in
the sed command, and by introducing a new hotplug script that runs
when the full USB device is removed.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
2019-11-27 09:28:10 +01:00
..

OpenWrt ModemManager

Description

Cellular modem control and connectivity

Optional libraries libmbim and libqmi are available. Optional mbim-utils and qmi-utils are available. Your modem may require additional kernel modules.

Usage

Once installed, you can configure the 2G/3G/4G modem connections directly in

/etc/config/network as in the following example:

config interface 'broadband'
    option device   '/sys/devices/platform/soc/20980000.usb/usb1/1-1/1-1.2/1-1.2.1'
    option proto    'modemmanager'
    option apn      'ac.vodafone.es'
    option username 'vodafone'
    option password 'vodafone'
    option pincode  '7423'
    option lowpower '1'