Skip to content

Quectel: Fix parse at command error in quectel-set-command cli

Mank Wang requested to merge Mank.Wang/libmbim:main into main

The at command may have multiple commas, like:at+qcfg="usbcfg",0x2C7C,0x6008,0x00FF, so we need to take the first split to see if it is the command type. If it is, then combine the remaining splits into a string. If not, combine the splits into a string. $ sudo mbimcli -d /dev/cdc-wdm0 --quectel-set-command="at+cversion;+qgmr;+csub"

VERSION: EM061KGLAAR01A02M2G Jan 10 2024 13:58:47 Authors: QCT

EM061KGLAAR01A02M2G_01.010.01.010

SubEdition: V01

OK

$ sudo mbimcli -d /dev/cdc-wdm0 -p --quectel-set-command="AT+CRSM=176,28599,0,0,15"

+CRSM: 148,8,""

OK

$ sudo mbimcli -d /dev/cdc-wdm0 -p --quectel-set-command=at,"at+qcfg="usbcfg""

+QCFG: "usbcfg",0x2C7C,0x6009,0x00FF

OK $ sudo mbimcli -d /dev/cdc-wdm0 -p --quectel-set-command=at,"at+qcfg="usbcfg",0x2C7C,0x6008,0x00FF"

OK

$ sudo mbimcli -d /dev/cdc-wdm0 -p --quectel-set-command=at,"at+qcfg="usbcfg""

+QCFG: "usbcfg",0x2C7C,0x6008,0x00FF

OK

Merge request reports

Loading