[GH-ISSUE #131] Add Quectel MHI driver parsing #104

Closed
opened 2026-03-04 11:58:38 +03:00 by kerem · 7 comments
Owner

Originally created by @stich86 on GitHub (Aug 10, 2025).
Original GitHub issue: https://github.com/4IceG/luci-app-3ginfo-lite/issues/131

Hi @4IceG,

i'm playing with a CPE that supporto only PCIE module, so I got an RM520N-GLAP (no the AA version). Using Quectel MHI driver, is not possible to see all informations.

I've edited 3ginfo.sh and getdevicevendorproduct() function adding this entry into the case statement:

        'mhi_DUN'*)
            devpath=$(find /sys/devices -name "$devname" -type d 2>/dev/null | head -1)
            target_dir=${devpath%/*/*/*}
            V=$(cat "$target_dir/vendor")
            D=$(cat "$target_dir/device")
            echo "pci/${V/0x/}${D/0x/}"
	    ;;

/dev/mhi_DUN is the AT port exposed by Quectel MHI driver. Then I've created under the modem/pci folder the usual file with VIDPID, for Quectel RM520N (using the usb file) only the last part was changed to display working protocol:

# Protocol
# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM
if [ -d "/sys/class/mhi_uci_q" ]; then
    if ls /sys/class/mhi_uci_q/mhi_QMI0 > /dev/null 2>&1; then
        PROTO="qmi"
    elif ls /sys/class/mhi_uci_q/mhi_MBIM* > /dev/null 2>&1; then
        PROTO="mbim"
    else
        PROTO="unknown"
    fi
fi

and it's working:

Image

Let me know if you want a PR

Thanks!

Originally created by @stich86 on GitHub (Aug 10, 2025). Original GitHub issue: https://github.com/4IceG/luci-app-3ginfo-lite/issues/131 Hi @4IceG, i'm playing with a CPE that supporto only PCIE module, so I got an RM520N-GLAP (no the AA version). Using Quectel MHI driver, is not possible to see all informations. I've edited `3ginfo.sh` and `getdevicevendorproduct()` function adding this entry into the case statement: ``` 'mhi_DUN'*) devpath=$(find /sys/devices -name "$devname" -type d 2>/dev/null | head -1) target_dir=${devpath%/*/*/*} V=$(cat "$target_dir/vendor") D=$(cat "$target_dir/device") echo "pci/${V/0x/}${D/0x/}" ;; ``` `/dev/mhi_DUN` is the AT port exposed by Quectel MHI driver. Then I've created under the `modem/pci` folder the usual file with VIDPID, for Quectel RM520N (using the usb file) only the last part was changed to display working protocol: ``` # Protocol # DRIVER=QMI_WWAN & DRIVER=CDC_MBIM if [ -d "/sys/class/mhi_uci_q" ]; then if ls /sys/class/mhi_uci_q/mhi_QMI0 > /dev/null 2>&1; then PROTO="qmi" elif ls /sys/class/mhi_uci_q/mhi_MBIM* > /dev/null 2>&1; then PROTO="mbim" else PROTO="unknown" fi fi ``` and it's working: <img width="746" height="845" alt="Image" src="https://github.com/user-attachments/assets/91be770a-95d7-4fd4-bb85-4ba123bf3054" /> Let me know if you want a PR Thanks!
kerem closed this issue 2026-03-04 11:58:39 +03:00
Author
Owner

@4IceG commented on GitHub (Aug 11, 2025):

Hi @stich86 ,
You can make a PR if you want 😏, but I don't know when the new package/repository update will be. Right now, I'm focusing on preparing the new package.

<!-- gh-comment-id:3175417991 --> @4IceG commented on GitHub (Aug 11, 2025): Hi @stich86 , You can make a PR if you want 😏, but I don't know when the new package/repository update will be. Right now, I'm focusing on preparing the new package.
Author
Owner

@stich86 commented on GitHub (Aug 11, 2025):

Hi @stich86 , You can make a PR if you want 😏, but I don't know when the new package/repository update will be. Right now, I'm focusing on preparing the new package.

done, here is the PR https://github.com/4IceG/luci-app-3ginfo-lite/pull/132 :)
Let me know!

<!-- gh-comment-id:3176252905 --> @stich86 commented on GitHub (Aug 11, 2025): > Hi [@stich86](https://github.com/stich86) , You can make a PR if you want 😏, but I don't know when the new package/repository update will be. Right now, I'm focusing on preparing the new package. done, here is the PR https://github.com/4IceG/luci-app-3ginfo-lite/pull/132 :) Let me know!
Author
Owner

@4IceG commented on GitHub (Nov 18, 2025):

Hi @stich86 ,
Do you have working packages in OpenWrt to support this modem in pcie mode?

PCIE MHI Driver, Quectel SPRD PCIE, Quectel QMI WWAN, Quectel GobiNet?

<!-- gh-comment-id:3549460881 --> @4IceG commented on GitHub (Nov 18, 2025): Hi @stich86 , Do you have working packages in OpenWrt to support this modem in pcie mode? PCIE MHI Driver, Quectel SPRD PCIE, Quectel QMI WWAN, Quectel GobiNet?
Author
Owner

@4IceG commented on GitHub (Nov 21, 2025):

Hi, @stich86 ,
I repeat the question :)

<!-- gh-comment-id:3562339816 --> @4IceG commented on GitHub (Nov 21, 2025): Hi, @stich86 , I repeat the question :)
Author
Owner

@stich86 commented on GitHub (Nov 21, 2025):

hi @4IceG,

regarding the driver, I've compiled the one from Quectel, and for the WWAN part, i've used quectel-cm and relative packages that @SuperKali has sent to me

@SuperKali can you help @4IceG on this part?

Thanks!

<!-- gh-comment-id:3562346381 --> @stich86 commented on GitHub (Nov 21, 2025): hi @4IceG, regarding the driver, I've compiled the one from Quectel, and for the WWAN part, i've used quectel-cm and relative packages that @SuperKali has sent to me @SuperKali can you help @4IceG on this part? Thanks!
Author
Owner

@SuperKali commented on GitHub (Nov 21, 2025):

@stich86 @4IceG here https://github.com/SuperKali/wwan-packages/blob/master/utils/quectel-cm/files/quectel.sh

I have to push local changes, will do soon, currently was pushed the old changes that should be work, i reworked autoreconnect but untested on pcie module

<!-- gh-comment-id:3562370310 --> @SuperKali commented on GitHub (Nov 21, 2025): @stich86 @4IceG here https://github.com/SuperKali/wwan-packages/blob/master/utils/quectel-cm/files/quectel.sh I have to push local changes, will do soon, currently was pushed the old changes that should be work, i reworked autoreconnect but untested on pcie module
Author
Owner

@4IceG commented on GitHub (Nov 21, 2025):

@SuperKali @stich86 Thanks!, I will test them.

<!-- gh-comment-id:3562390684 --> @4IceG commented on GitHub (Nov 21, 2025): @SuperKali @stich86 Thanks!, I will test them.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/luci-app-3ginfo-lite#104
No description provided.