[LEDE-DEV] [PATCH 1/2] uqmi: add support for MBIM devices with QMI service
Felix Fietkau
nbd at nbd.name
Tue Aug 23 04:40:44 PDT 2016
On 2016-08-21 02:01, Bjørn Mork wrote:
> Many Qualcomm based devices offer a QMI service when running in MBIM
> mode. This is useful for a number of requests which have no MBIM
> counterpart.
>
> This implementation is very basic, simply wrapping the QMI requests
> in an MBIM command. It is up to the user to make sure that the MBIM
> command sequence is valid, using a mix of umbim and uqmi requests.
>
> umbim must be used to send "OPEN" before uqmi can issue any MBIM
> requests. Example:
>
> 1. use umbim to open the session, using the '-n' option:
>
> $ umbim -d /dev/cdc-wdm0 -n caps
> devicetype: 0003 - remote
> cellularclass: 0001
> voiceclass: 0001 - no-voice
> simclass: 0002
> dataclass: 003C
> smscaps: 0003
> controlcaps: 0001
> maxsessions: 0008
> deviceid: 0145820007xxxxx
> firmwareinfo: SWI9X30C_02.08.02.00
> hardwareinfo: EM7455
>
> 2. use uqmi to send an MBIM request, using the '-m' option:
>
> $ uqmi -m -d /dev/cdc-wdm0 --get-serving-system
> {
> "registration": "registered",
> "plmn_mcc": 242,
> "plmn_mnc": 1,
> "plmn_description": "TELENOR",
> "roaming": false
> }
>
> 3. use umbim to close the open session, using the '-t X' option:
>
> $ umbim -d /dev/cdc-wdm0 -t 2 caps
> devicetype: 0003 - remote
> cellularclass: 0001
> voiceclass: 0001 - no-voice
> simclass: 0002
> dataclass: 003C
> smscaps: 0003
> controlcaps: 0001
> maxsessions: 0008
> deviceid: 0145820007xxxxx
> firmwareinfo: SWI9X30C_02.08.02.00
> hardwareinfo: EM7455
>
> Signed-off-by: Bjørn Mork <bjorn at mork.no>
Applied with some cleanups and portability fixes.
I changed the code to use __packed and endian conversion from libubox.
- Felix
More information about the Lede-dev
mailing list