xhikarishii / openwrt-ipq

This fork is dedicated for NSS Development of Arcadyan AW1000
Other
10 stars 2 forks source link

Quectel Cellular, QMI Cellular, ModemManager Protocols #2

Closed atan2005 closed 3 months ago

atan2005 commented 3 months ago

Describe the bug

I have to perform steps below for the modem to register and obtain ip address with my ISP (Optus and Telstra):-

  1. When initially checking the Modem - Details - 3ginfo-lite screen, all entries were blank.
  2. Under the Network - Interfaces - 5g, I have to first change from Protocol: Quectel Cellular to QMI Cellular, and check the 3ginfo-lite screen again, this time some entries appears as it has registered with my ISP, however the Connection statistics: Waiting for connection data... (picture highlighted in red).
  3. Repeating step 2 by reversing the Protocol: back to Quectel Cellular, this time Connection statistics is showing data!! I have left as APN: internet (for Optus) and telstra.internet (for Telstra), PDP Type: IPv4/IPv6 and remember to save and restart the interface during each step.
  4. If I reboot the modem, I need to repeat step 1 to 3 for internet connection, so something is broken here.
  5. Instead of step 4, if I add a protocol under Network Interfaces such as ModemManager in addition of existing Quectel Cellular interface, this setup will survive a reboot or power-off/on and will connect automatically upon boot. ModemManager interface will only display Error: Unknown error (NEGOTIATIONFAILED) (picture highlighted in red) but not causing any issue.
  6. If I only run the ModemManager interface on its own, it will register and connect to my ISP however with strange default gateway ip address of 10.64.64.64 (picture highlighted in red). The router can connect to internet resources, but NAT client pc cannot. The default gateway ip address (which may not exist) cannot be pinged from anywhere.

Also I have to change from your default Argon theme that was causing the "scrolling capture" screen issue to using either Bootstrap, BootstrapDark or BootstrapLight theme). Please see attached pictures of each scenarios.

Scenario 1. When only running QMI Cellular protocol. Screenshot 2024-07-25 at 16-15-33 HikariWrt - LuCI-qmi-network-interface Screenshot 2024-07-25 at 16-13-11 HikariWrt - LuCI-qmi-3ginfo-lite Screenshot 2024-07-25 at 16-15-44 HikariWrt - LuCI-qmi-overview

AT+CGCONTRDP +CGCONTRDP: 1,5,telstra.internet,10.102.225.113,32.1.128.4.20.128.63.27.180.135.251.253.123.243.131.6, 254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1,10.3.56.162 32.1.128.4.44.66.11.22.0.0.0.0.0.0.0.2,10.3.8.2 32.1.128.4.45.67.12.0.0.0.0.0.0.0.0.1 OK

Scenario 2. When running Quectel Cellular protocol in parallel with ModemManager protocol. Screenshot 2024-07-27 at 18-41-07 HikariWrt - LuCI-quectel-network-interface2 Screenshot 2024-07-27 at 18-38-03 HikariWrt - LuCI-quectel-3ginfo-lite2 Screenshot 2024-07-27 at 18-38-32 HikariWrt - LuCI-quectel-overview2

AT+CGCONTRDP +CGCONTRDP: 1,5,telstra.internet,10.141.181.81,32.1.128.4.20.160.47.28.3.127.186.90.186.80.126.18, 254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1,10.3.56.162 32.1.128.4.44.66.11.22.0.0.0.0.0.0.0.2,10.3.8.2 32.1.128.4.45.67.12.0.0.0.0.0.0.0.0.1 OK

After a while, the two Virtual dynamic interface (DHCP client): _5g4 and _5g6 will disappear from the Network Interfaces screen and under the Status - Overview - Network section will also be updated to show IPv4 Upstream, IPv6 Upstream boxes and no duplicates.

Scenario 3. When only running ModemManager protocol. Screenshot 2024-07-25 at 16-30-02 HikariWrt - LuCI-modemmanager-network-interface Screenshot 2024-07-25 at 16-30-41 HikariWrt - LuCI-modemmanager-3ginfo-lite Screenshot 2024-07-25 at 16-31-22 HikariWrt - LuCI-modemmanager-overview

AT+CGCONTRDP No reply received.

OpenWrt version

r26991-3ac5a2b54f

OpenWrt release

v1.1.0b

OpenWrt target/subtarget

qualcommax/ipq807x

Device

Arcadyan AW1000

Image kind

Official downloaded image

Steps to reproduce

No response

Actual behaviour

No response

Expected behaviour

No response

Additional info

No response

Diffconfig

No response

Terms

MiG-41 commented 3 months ago

Is it not enough just to do after some time of boot/reset /etc/init.d/network restart ? This is not possible , that each time you have to change protocol to QMI...

xhikarishii commented 3 months ago

@atan2005 can you show me the configuration tab of your 3ginfo lite? See if it's set to /dev/ttyUSB2 as the diag port. Also make sure that the interface is pointing towards wan

atan2005 commented 3 months ago

Under Modem - Information about 3G/4G/5G connection - Configuration tab, they were already set as Interface: wan and IP address / port for communication with the modem: /dev/ttyUSB2. This is the same under Modem - AT Commands - Configuration - Port for communication with the modem: /dev/ttyUSB2 for when testing various AT commands.

Screenshot 2024-07-26 at 20-57-00 HikariWrt - LuCI--quectel-3ginfo-lite-configuration

Under the Network - Interfaces when using the Quectel and QMI protocols, can only set Modem device: /dev/cdc-wdm0 and when using ModemManager can only set Modem device: Quectel - RG500Q-EA.

Back in 16-Jul-2024, I have posted the System Logs in Arcadyan AW1000 (Telstra 5G Smart Modem) support- IPQ807x for when performing Step 1 to Step 3 when using Optus sim.

MiG-41 commented 3 months ago

Why you are adding mm interface , it is not needed, v1.1.0-beta should connect with default settings . Only thing with could be to correct is:

If it is not connecting , please do after system boot: /etc/init.d/network restart , or ifup wan ,and see what happen.

If still problems ,maybe you pass answers from modem for these AT commands:

AT+QCFG="usbnet" AT+CGDCONT? AT+CGCONTRDP AT+QNWPREFCFG="mode_pref" AT+QNWPREFCFG="lte_band" AT+QNWPREFCFG="nsa_nr5g_band" AT+QNWPREFCFG="nr5g_band" AT+QMBNCFG="Select" AT+QMBNCFG="AutoSel" AT+QMBNCFG="List"

atan2005 commented 3 months ago

I have already tried to softboot and power off/on many times during each step and/or each scenario before coming to the conclusion. Please refer to my original post: step 2 and scenario 1, when running QMI Cellular protocol on its own and for updated output of AT+CGCONTRDP under each scenarios.

AT+QCFG="usbnet" +QCFG: "usbnet",0 OK

AT+CGDCONT? +CGDCONT: 1,"IPV4V6","telstra.internet","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0 +CGDCONT: 2,"IP","telstra.internet","0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0 +CGDCONT: 3,"IPV6","telstra.internet","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0 OK

AT+CGCONTRDP +CGCONTRDP: 1,5,telstra.internet,10.102.225.113,32.1.128.4.20.128.63.27.180.135.251.253.123.243.131.6, 254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.1,10.3.56.162 32.1.128.4.44.66.11.22.0.0.0.0.0.0.0.2,10.3.8.2 32.1.128.4.45.67.12.0.0.0.0.0.0.0.0.1 OK

AT+QNWPREFCFG="mode_pref" +QNWPREFCFG: "mode_pref",AUTO OK

AT+QNWPREFCFG="lte_band" +QNWPREFCFG: "lte_band",1:2:3:4:5:6:7:8:9:10:11:12:13:14:17:18:19:20:21:23:24:25:26:27:28:29:30:31:32:33:34:35:36:37:38:39:40:41:42:43:46:47:48:49:66:67:68:71:250:252:255 OK

AT+QNWPREFCFG="nsa_nr5g_band" +QNWPREFCFG: "nsa_nr5g_band",1:2:3:5:7:8:12:14:20:25:28:34:38:39:40:41:48:50:51:65:66:70:71:74:75:76:77:78:79:80:81:82:83:84:85:86:257:258:259:260:261 OK

AT+QNWPREFCFG="nr5g_band" +QNWPREFCFG: "nr5g_band",1:2:3:5:7:8:12:14:20:25:28:34:38:39:40:41:48:50:51:65:66:70:71:74:75:76:77:78:79:80:81:82:83:84:85:86:257:258:259:260:261 OK

AT+QMBNCFG="Select" +QMBNCFG: "Select",Telstra_Australia_Commercial OK

AT+QMBNCFG="AutoSel" +QMBNCFG: "AutoSel",1 OK

AT+QMBNCFG="List" +QMBNCFG: "List",0,1,1,"Telstra_Australia_Commercial",0x0A010F00,202111231 +QMBNCFG: "List",1,0,0,"Optus_Australia_Commercial",0x0A014400,202101151 +QMBNCFG: "List",2,0,0,"Germany-VoLTE-Vodafone",0x0A010449,202101151 +QMBNCFG: "List",3,0,0,"ChunghwaTel_Taiwan_Commercial",0x0A014F00,202104021 +QMBNCFG: "List",4,0,0,"Spark_Commercial",0x0A01FE09,202101151 +QMBNCFG: "List",6,0,0,"TIM_Italy_Commercial",0x0A012B00,202101151 +QMBNCFG: "List",7,0,0,"France-Commercial-Orange",0x0A010B21,202101151 +QMBNCFG: "List",8,0,0,"Commercial-DT-VOLTE",0x0A011F1F,202108201 +QMBNCFG: "List",9,0,0,"UK-VoLTE-Vodafone",0x0A010426,202101151 +QMBNCFG: "List",10,0,0,"Commercial-EE",0x0A01220B,202101151 +QMBNCFG: "List",11,0,0,"Commercial-LGU",0x0A012608,202101151 +QMBNCFG: "List",12,0,0,"Commercial-KT",0x0A01280B,202101151 +QMBNCFG: "List",13,0,0,"Commercial-SKT",0x0A01270A,202101151 +QMBNCFG: "List",14,0,0,"Commercial-Reliance",0x0A011B0C,202101151 +QMBNCFG: "List",15,0,0,"Commercial-SBM",0x0A011C0B,202101151 +QMBNCFG: "List",16,0,0,"Commercial-KDDI",0x0A010709,202101151 +QMBNCFG: "List",17,0,0,"Commercial-DCM",0x0A010D0D,202101151 +QMBNCFG: "List",19,0,0,"VoLTE_OPNMKT_CT",0x0A0113E0,202101151 +QMBNCFG: "List",20,0,0,"Volte_OpenMkt-Commercial-CMCC",0x0A012010,202101151 +QMBNCFG: "List",21,0,0,"ROW_Commercial",0x0A010809,202201041 OK

MiG-41 commented 3 months ago

I sugggest to deactivate MBN files (use a manual configuration ) , so

AT+QMBNCFG="Deactivate" AT+QMBNCFG="AutoSel",0 And then check , if there are no "x,1,1" at any files ( Now "Telstra_Australia_Commercial" has it).

atan2005 commented 3 months ago

AT+QMBNCFG="Deactivate"

AT+QMBNCFG="AutoSel",0 OK

AT+QMBNCFG="List" +QMBNCFG: "List",0,0,0,"Telstra_Australia_Commercial",0x0A010F00,202111231 +QMBNCFG: "List",1,0,0,"Optus_Australia_Commercial",0x0A014400,202101151 +QMBNCFG: "List",2,0,0,"Germany-VoLTE-Vodafone",0x0A010449,202101151 +QMBNCFG: "List",3,0,0,"ChunghwaTel_Taiwan_Commercial",0x0A014F00,202104021 +QMBNCFG: "List",4,0,0,"Spark_Commercial",0x0A01FE09,202101151 +QMBNCFG: "List",5,0,0,"Telia_Sweden",0x0A012400,202101151 +QMBNCFG: "List",6,0,0,"TIM_Italy_Commercial",0x0A012B00,202101151 +QMBNCFG: "List",7,0,0,"France-Commercial-Orange",0x0A010B21,202101151 +QMBNCFG: "List",8,0,0,"Commercial-DT-VOLTE",0x0A011F1F,202108201 +QMBNCFG: "List",9,0,0,"UK-VoLTE-Vodafone",0x0A010426,202101151 +QMBNCFG: "List",10,0,0,"Commercial-EE",0x0A01220B,202101151 +QMBNCFG: "List",11,0,0,"Commercial-LGU",0x0A012608,202101151 +QMBNCFG: "List",12,0,0,"Commercial-KT",0x0A01280B,202101151 +QMBNCFG: "List",13,0,0,"Commercial-SKT",0x0A01270A,202101151 +QMBNCFG: "List",14,0,0,"Commercial-Reliance",0x0A011B0C,202101151 +QMBNCFG: "List",15,0,0,"Commercial-SBM",0x0A011C0B,202101151 +QMBNCFG: "List",16,0,0,"Commercial-KDDI",0x0A010709,202101151 +QMBNCFG: "List",17,0,0,"Commercial-DCM",0x0A010D0D,202101151 +QMBNCFG: "List",18,0,0,"VoLTE-CU",0x0A011561,202101151 +QMBNCFG: "List",19,0,0,"VoLTE_OPNMKT_CT",0x0A0113E0,202101151 +QMBNCFG: "List",20,0,0,"Volte_OpenMkt-Commercial-CMCC",0x0A012010,202101151 +QMBNCFG: "List",21,0,0,"ROW_Commercial",0x0A010809,202201041 OK

MiG-41 commented 3 months ago

And now how looks APN? AT+CGDCONT? AT+CGCONTRDP Is it ok now ?

atan2005 commented 3 months ago

When only running QMI Cellular protocol and having MBN deactivated will produce pictures as below. If MBN was reactivated it will go back to my previously posted pictures in Scenario 1 above.

Screenshot 2024-07-29 at 13-28-06 HikariWrt - LuCI-qmi-network-interface-mbn-disabled Screenshot 2024-07-29 at 13-29-10 HikariWrt - LuCI-qmi-3ginfo-lite-mbn-disabled Screenshot 2024-07-29 at 13-29-52 HikariWrt - LuCI-qmi-overview-mbn-disbaled

AT+CGDCONT? +CGDCONT: 1,"IPV4V6","telstra.internet","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0 OK

AT+CGCONTRDP OK

xhikarishii commented 3 months ago

Hi @atan2005

What is your module's current firmware? You can check by sending the AT command ATI.

Also as @MiG-41 mentioned, can you try again with the default configuration? It should work out of the box.

atan2005 commented 3 months ago

ATI Quectel RG500Q-EA Revision: RG500QEAAAR11A07M4G_ACY OK

AT+QGMR RG500QEAAAR11A07M4G_ACY OK

As per my replies to @MiG-41, it still didn't work for me.

xhikarishii commented 3 months ago

@atan2005 now I see where the problem is :)

You are using an outdated firmware of the module, you can update your module using qfirehose, the firmware is also on my repositories

And by the looks of it you are still using a custom firmware.

xhikarishii commented 3 months ago

Here quectel-rm500q-ea

atan2005 commented 3 months ago

@xhikarishii My device is a Telstra branded Arcadyan AW1000 which I got back in 03-Jun-2024 and it was running Telstra firmware version 0.06.01r, hardware version: XCI35AX44Z-TA before I replace it with OpenWrt snapshots dated 30-Jun-2024, then QWrt, then HikariWrt.

Could you please confirm if it is fine to proceed to update my Quectel modem with the firmware RG500QEAAAR13A01M4G_01.200.01.200.zip that you have provided if you consider my modem is still on outdated Telstra custom firmware revision: RG500QEAAAR11A07M4G_ACY? Thanks.

xhikarishii commented 3 months ago

@atan2005 should be fine, I came from the same module firmware version too when I got mine

atan2005 commented 3 months ago

@xhikarishii As a side note, the extracted files can be scp over from Windows pc, this time the files have been extracted into a USB flash drive (as volume 4, designated d:) formatted with exFAT (or FAT or NTFS) partition being one of the 3 most commonly available filesystem types on Windows pc.

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     C   OS           NTFS   Partition    458 GB  Healthy    Boot
  Volume 1         RESTORE      NTFS   Partition     17 GB  Healthy
  Volume 2         SYSTEM       FAT32  Partition    260 MB  Healthy    System
  Volume 3         RECOVERY     NTFS   Partition    950 MB  Healthy    Hidden
  Volume 4     D                exFAT  Removable   2000 MB  Healthy

C:\>dir d:
 Volume in drive D has no label.
 Volume Serial Number is 240D-1A8E

 Directory of d:\

13/06/2023  02:59 AM             1,740 md5.txt
13/06/2023  02:59 AM             5,710 contents.xml
30/07/2024  09:36 AM    <DIR>          update
12/07/2023  06:40 PM           915,410 Quectel_RG500Q-EA-AA_软件版本变更说明_V1301_01.200.01.200.pdf
12/07/2023  06:40 PM           852,693 Quectel_RG500Q-EA-AA_Firmware_Release_Notes_V1301_01.200.01.200.pdf
               4 File(s)      1,775,553 bytes
               1 Dir(s)   1,891,336,192 bytes free

Before inserting USB drive...

root@HikariWrt:/# ls -l /dev/sd*
ls: /dev/sd*: No such file or directory

After inserting USB drive...

root@HikariWrt:/# ls -l /dev/sd*
brw-------    1 root     root        8,   0 Jul 30 09:42 /dev/sda

root@HikariWrt:/# block info | grep "/dev/sd"
/dev/sda: UUID="240D-1A8E" TYPE="exfat"

root@HikariWrt:/# lsusb -t
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 001: Dev 002, If 0, Class=[unknown], Driver=option, 5000M
    |__ Port 001: Dev 002, If 1, Class=[unknown], Driver=option, 5000M
    |__ Port 001: Dev 002, If 2, Class=[unknown], Driver=option, 5000M
    |__ Port 001: Dev 002, If 3, Class=[unknown], Driver=option, 5000M
    |__ Port 001: Dev 002, If 4, Class=[unknown], Driver=qmi_wwan_q, 5000M

It detected the usb drive /dev/sda with exfat filesystem but it did not detect the first and only partition /dev/sda1 with the extracted files in it. From further research, it lacks these packages kmod-fs-exfat, kmod-fs-vfat, kmod-fs-ntfs3 to support the 3 most common filesystems on Windows. When these packages were tried to be installed, it complained about the incompatible version as below:-

Screenshot 2024-07-30 at 11-20-56 HikariWrt - LuCI-System-Software-kmod-fs-exfat

Screenshot 2024-07-30 at 11-21-41 HikariWrt - LuCI-System-Software-kmod-fs-vfat

Screenshot 2024-07-30 at 11-22-20 HikariWrt - LuCI-System-Software-kmod-fs-ntfs3

root@HikariWrt:/# uname -r
6.6.37

Your firmware version of 6.6.37 versus new available version: 6.6.43 dated 30-Jul-2024 and going forward only newer snapshot versions will be available. Could you please advise how do I resolve the versions mismatch issue (or how to download version 6.6.37) and also going forward if more software are needed?

MiG-41 commented 3 months ago

Please look out during mode update , if it will stuck on some reason , also whole router will not boot: https://forum.openwrt.org/t/arcadyan-aw1000-telstra-5g-smart-modem-support-ipq807x/122307/115

Just to be warned.

Easiest way is to use WinSCP and use SCP protocol to transfer files ,like here: https://www.youtube.com/watch?v=uyI2_B024Nk

xhikarishii commented 3 months ago

@atan2005 let's focus on the current issue, and create one on separate thread so we don't get confused here :)

But I have added the kernel mods on the next build, you'll need to recompile the kernel for those packages

xhikarishii commented 3 months ago

Hi @atan2005 did that worked for you? Since I haven't received any updates for a week I'll close this issue.