Page 1 of 1

DW5821e - Using QMI Mode [Solved]

Posted: Tue Aug 30, 2022 2:12 am
by eskaryo
I'm running GoldenOrb_2022-06-24 ( OpenWrt 21.02-SNAPSHOT ) on a WG1608 with a DW5821e modem.

I'm reading that there are potential latency improvements when using QMI mode instead of MBIM and I'm really struggling to get QMI going.
It seems like ModemManager may be a surefire way to get this running in QMI mode, but it is not supported in ROOter due to kmod packages being required.

The DW5821e won't change the mode given the AT command AT^SETMODE=2, it always remains 0

usbmode configuration was attempted as well, but always always MBIM mode.

Code: Select all

 "413c:81d7": {
             "*": {
                  "msg": [  ],
                  "config": 1
             }
},

What can I do to get this to use QMI? Do I need to abandon ROOter?

Code: Select all

T:  Bus=02 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  3 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  2
P:  Vendor=413c ProdID=81d7 Rev= 3.18
S:  Manufacturer=Dell Inc.
S:  Product=DW5821e Snapdragon X20 LTE
S:  SerialNumber=0123456789ABCDEF
C:  #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=896mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:  If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=4096ms
I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=83(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=
E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=85(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
C:* #Ifs= 4 Cfg#= 2 Atr=a0 MxPwr=896mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E:  Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms

Re: DW5821e - QMI Mode

Posted: Wed Aug 31, 2022 9:16 pm
by eskaryo
Thanks to the crazy folks at 4pda.to

Create file:

Code: Select all

/etc/hotplug.d/usb/00-T77W968
Paste content:

Code: Select all

T77W968_PRODUCT="413c/81d7/318"

if [ "${PRODUCT}" = "${T77W968_PRODUCT}" ]; then
    if [ "${ACTION}" = "add" ]; then
        device_id="$(echo ${DEVICENAME} | awk -F':' '{print $1}')"
        device_path="/sys/bus/usb/devices/${device_id}/bConfigurationValue"
        config="$(cat ${device_path})"

        logger -t hotplug "T77W968: id: ${device_id}, path: ${device_path}, config mode:${config}"

        if [ "${config}" = "2" ]; then
          logger -t hotplug "T77W968: modem not in qmi, switching to qmi"

          echo -1 > ${device_path}
          echo 1 > ${device_path}
        fi
    fi
fi
Then either reset the usb port or bounce your router.

Re: DW5821e - Using QMI Mode [Solved]

Posted: Fri Sep 02, 2022 1:43 pm
by Didneywhorl
wow! Thanks for posting. That is good info!

Re: DW5821e - Using QMI Mode [Solved]

Posted: Tue Dec 13, 2022 3:11 pm
by matrx10503
Edit: I figured out how to add this script in rooter. It doesn't seem like my dw5821e likes qmi mode, couldn't keep a steady connection, kept rebooting.

Re: DW5821e - Using QMI Mode [Solved]

Posted: Mon Dec 26, 2022 3:51 pm
by eskaryo
matrx10503 wrote: Tue Dec 13, 2022 3:11 pm Edit: I figured out how to add this script in rooter. It doesn't seem like my dw5821e likes qmi mode, couldn't keep a steady connection, kept rebooting.
Hey matrx sorry it's taken me a while to get back to you.

This changes the protocol the router uses to communicate with the modem. I see slightly (5-10ms) better pings when playing games and don't experience the negative effects you have reported. I have swapped between QMI and MBIM and tested rates/latencies on a few occasions and at this point can only claim that very small improvement. Worth it, though, for FPS gaming I think.