Debuging APU4D4 with LTE modem

Hi
I managed to recreate the problem.
If you have time and still are interested you can try this:
Go to the file, right click on Download button and select Copy link addess.
Then paste the link in to your router after wget.

wget https://github.com/mrhaav/openwrt/raw/master/21.02.1/uqmi_2021-12-22-0.3_x86_64.ipk
1 Like

You are the best !

This time is the right time, and It did went through.
Didn't test the final result yet, but package could install with no problem.

root@OpenWrt:/tmp# opkg -V2 install uqmi_2021-12-22-0.3_x86_64.ipk
opkg_conf_parse_file: Loading conf file /etc/opkg.conf.
opkg_conf_parse_file: Loading conf file /etc/opkg/customfeeds.conf.
opkg_conf_parse_file: Loading conf file /etc/opkg/distfeeds.conf.
pkg_hash_load_feeds:
pkg_hash_load_feeds:
pkg_hash_load_status_files:
pkg_info_preinstall_check: Updating file owner list.
pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=uqmi:
pkg_hash_fetch_best_installation_candidate: uqmi 2020-11-22-0a19b5b7 x86_64
pkg_hash_fetch_best_installation_candidate: uqmi 2021-12-22 x86_64
Upgrading uqmi on root from 2020-11-22-0a19b5b7-3 to 2021-12-22-0.3...
pkg_remove_orphan_dependent: libc was autoinstalled and is still required by 101 installed packages.
pkg_remove_orphan_dependent: libubox20210516 was autoinstalled and is still required by 30 installed packages.
pkg_remove_orphan_dependent: libblobmsg-json20210516 was autoinstalled and is still required by 10 installed packages.
pkg_remove_orphan_dependent: kmod-usb-net was autoinstalled and is still required by 5 installed packages.
pkg_remove_orphan_dependent: wwan was autoinstalled and is still required by 2 installed packages.
pkg_run_script: Running script //usr/lib/opkg/info/uqmi.prerm.
pkg_run_script: Running script /tmp/opkg-iPlBlH/uqmi-ApLADB/preinst.
pkg_run_script: Running script //usr/lib/opkg/info/uqmi.postrm.
opkg_install_pkg: Removing obsolesced files for uqmi
remove_maintainer_scripts: Deleting //usr/lib/opkg/info/uqmi.control.
remove_maintainer_scripts: Deleting //usr/lib/opkg/info/uqmi.postinst.
remove_maintainer_scripts: Deleting //usr/lib/opkg/info/uqmi.prerm.
opkg_install_pkg: Upgrading maintainer scripts.
opkg_install_pkg: Installing data files for uqmi.
install_data_files: Extracting data files to /.
pkg_write_filelist: Creating //usr/lib/opkg/info/uqmi.list file for pkg uqmi.
opkg_install_pkg: Resolving conf files for uqmi
opkg_configure_packages: Configuring unpacked packages.
opkg_configure_packages: Reordering packages before configuring them...
Configuring uqmi.
pkg_run_script: Running script //usr/lib/opkg/info/uqmi.postinst.
write_status_files_if_changed: Writing status file.
pkg_write_changed_filelists: Saving changed filelists.

Please note that i have always proceed with copy / pasting as you have asked in the last e-mail.

Will keep you posted with the results !

Ok, so moving forward with this


After successfully installing the package, i am now benefiting from a fresh (and working) interface.
Very nice.

I had to install couple of missing things, because It complains about "Unsupported protocol type." :

  • lucy-proto-3g
  • lucy-proto-modemmanager

Rebooted to make sure everything was as expected.

It has defaulted to using "modem manager" as protocol, not sure if I should use this one or rather "QMI cellular". On the first reboot "modem manager" was correctly associated with the modem.

Since It didn't seem to wrk with "modem manager", I moved back to "QMI Cellular".

When switching to QMI Cellular, I had the following results :

**Protocol:** QMI Cellular
**RX:** 0 B (0 Pkts.)
**TX:** 0 B (0 Pkts.)

One time I had an "Error: Unknown error (IPV4_APN_ERROR)"

But the interface seems always desperetly down:

6: wwan0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN qlen 1000
    link/[65534]

I have deleted and re-created the interface, and also tried to switch back to "modem manager" with no luck. I am unable to reconfigure the device using "modem manager" modem no longer is appearing on the list of available devices.

So I am still stuck.

Do you know if there are some CLI command that i could do to try to manually get this working ?
Also where and how can I get a meaningful debug, I am not a pro of openWRT, and i don't even know how to do something equivalent of a tail -f on a log file


Thanks for your help.

Hi
Uninstall Modem Manager and use Luci-proto-qmi and configure your wwan interface with QMI.

From the log:

Fri Jan 14 14:35:29 2022 daemon.notice netifd: Interface '4G' is setting up now
Fri Jan 14 14:35:29 2022 daemon.notice netifd: 4G (4640): PINcode disabled
Fri Jan 14 14:35:29 2022 daemon.notice netifd: 4G (4640): Data format set to raw-ip
Fri Jan 14 14:35:29 2022 daemon.notice netifd: 4G (4640): Default profile number: 1
Fri Jan 14 14:35:30 2022 daemon.notice netifd: 4G (4640): Initiate airplane mode
Fri Jan 14 14:35:33 2022 daemon.notice netifd: 4G (4640): Change default profile
Fri Jan 14 14:35:33 2022 daemon.notice netifd: 4G (4640): apn: orange.fr to orange
Fri Jan 14 14:35:33 2022 daemon.notice netifd: 4G (4640): ./qmi.sh: eval: line 216: authentication:: not found
Fri Jan 14 14:35:33 2022 daemon.notice netifd: 4G (4640): Airplame mode off
Fri Jan 14 14:35:34 2022 daemon.notice netifd: 4G (4640): registered on 20801
Fri Jan 14 14:35:35 2022 daemon.notice netifd: 4G (4640): Registered to Orange on WCDMA
Fri Jan 14 14:36:06 2022 daemon.notice netifd: 4G (4640): Unable to connect with ipv4, check APN settnings
Fri Jan 14 14:36:06 2022 daemon.notice netifd: 4G (4686): Stopping network 4G
Fri Jan 14 14:36:06 2022 daemon.notice netifd: 4G (4686): Command failed: Permission denied
Fri Jan 14 14:36:06 2022 daemon.notice netifd: Interface '4G' is now down

Hi
Have you configured the correct APN settings? :wink:
Can you print:

uci show network.4G

./qmi.sh: eval: line 216: authentication:: not found is an error i the script when printing the change in authentication method. It will be corrected in release 0.4.

Well as far as i can tell my settings were ok for Orange France:

Grabbed them from here:

qmi interface :

root@OpenWrt:/# uci show network.4G
network.4G=interface
network.4G.proto='qmi'
network.4G.device='/dev/cdc-wdm0'
network.4G.apn='orange'
network.4G.auth='pap'
network.4G.pdptype='ipv4'

DonÂŽt you need to specify username and password?

I have tested it with the right login / passwd which are orange / orange

No luck, I still have the " Error: Unknown error (IPV4_APN_ERROR)"

root@OpenWrt:/# uci show network.4G
network.4G=interface
network.4G.proto='qmi'
network.4G.device='/dev/cdc-wdm0'
network.4G.apn='orange'
network.4G.auth='pap'
network.4G.pdptype='ipv4'
network.4G.username='orange'
network.4G.password='orange'

When trying to up the interface it still shows up as :

6: wwan0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
    link/[65534]
    inet6 fe80::8193:1504:83cf:6762/64 scope link flags 800
       valid_lft forever preferred_lft forever

I am not sure if the "state UNKNOWN" is ok or not ??
Looks a bit weired to me, why isn't this interface simply UP ?

Can you reboot your router and paste the log from the modem?

Are you sure you have the correct APN? Can you compare with what you have in you mobile? Or try the "router" SIMcard in you mobile.

You can use uqmi to debug the modem.

uqmi --help

There always seems to be these problem tied to PIN.
But PIN has been deactivated !

root@OpenWrt:/# qmicli -d /dev/cdc-wdm0 -p --uim-get-slot-status
[/dev/cdc-wdm0] Successfully got slots status
[/dev/cdc-wdm0] 2 physical slots found:
  Physical slot 1:
     Card status: present
     Slot status: active
    Logical slot: 1
           ICCID: 89330111313865774840
  Physical slot 2:
     Card status: absent
     Slot status: inactive

This is what I have when launching with qmicli - I think these are the right settings.
Somehow I am stuck with this PIN problem
 and there is no PIN so It either triggers this on the wrong slot or there is something else.

root@OpenWrt:/# qmicli -v --device=/dev/cdc-wdm0 --device-open-proxy --wds-start
-network="ip-type=4,apn=orange.fr,auth='PAP',username=orange,password=orange" --
client-no-release-cid
[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Opening device with flags 'proxy, auto'...
[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] automatically selecting QMI mode
[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] created endpoint
[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<<   length = 28
<<<<<<   data   = 01:1B:00:00:00:00:00:01:00:FF:10:00:01:0D:00:2F:64:65:76:2F:63:64:63:2D:77:64:6D:30

[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Sent generic request (translated)...
<<<<<< QMUX:
<<<<<<   length  = 27
<<<<<<   flags   = 0x00
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "none"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 16
<<<<<<   message     = "Internal Proxy Open" (0xFF00)
<<<<<< TLV:
<<<<<<   type       = "Device Path" (0x01)
<<<<<<   length     = 13
<<<<<<   value      = 2F:64:65:76:2F:63:64:63:2D:77:64:6D:30
<<<<<<   translated = /dev/cdc-wdm0

[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Received message...
<<<<<< RAW:
<<<<<<   length = 19
<<<<<<   data   = 01:12:00:80:00:00:01:01:00:FF:07:00:02:04:00:00:00:00:00

[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Received generic response (translated)...
<<<<<< QMUX:
<<<<<<   length  = 18
<<<<<<   flags   = 0x80
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "response"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 7
<<<<<<   message     = "Internal Proxy Open" (0xFF00)
<<<<<< TLV:
<<<<<<   type       = "Result" (0x02)
<<<<<<   length     = 4
<<<<<<   value      = 00:00:00:00
<<<<<<   translated = SUCCESS

[14 Jan 2022, 19:43:18] [Debug] QMI Device at '/dev/cdc-wdm0' ready
[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Assuming service 'wds' is supported...
[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Allocating new client ID...
[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<<   length = 16
<<<<<<   data   = 01:0F:00:00:00:00:00:02:22:00:04:00:01:01:00:01

[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Sent generic request (translated)...
<<<<<< QMUX:
<<<<<<   length  = 15
<<<<<<   flags   = 0x00
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "none"
<<<<<<   transaction = 2
<<<<<<   tlv_length  = 4
<<<<<<   message     = "Allocate CID" (0x0022)
<<<<<< TLV:
<<<<<<   type       = "Service" (0x01)
<<<<<<   length     = 1
<<<<<<   value      = 01
<<<<<<   translated = wds

[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Received message...
<<<<<< RAW:
<<<<<<   length = 24
<<<<<<   data   = 01:17:00:80:00:00:01:02:22:00:0C:00:02:04:00:00:00:00:00:01:02:00:01:1E

[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Received generic response (translated)...
<<<<<< QMUX:
<<<<<<   length  = 23
<<<<<<   flags   = 0x80
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "response"
<<<<<<   transaction = 2
<<<<<<   tlv_length  = 12
<<<<<<   message     = "Allocate CID" (0x0022)
<<<<<< TLV:
<<<<<<   type       = "Result" (0x02)
<<<<<<   length     = 4
<<<<<<   value      = 00:00:00:00
<<<<<<   translated = SUCCESS
<<<<<< TLV:
<<<<<<   type       = "Allocation Info" (0x01)
<<<<<<   length     = 2
<<<<<<   value      = 01:1E
<<<<<<   translated = [ service = 'wds' cid = '30' ]

[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Registered 'wds' (version unknown) client with ID '30'
[14 Jan 2022, 19:43:18] [Debug] Network start parameters set (apn: 'orange.fr', 3gpp_profile: '0', 3gpp2_profile: '0', auth: 'pap', ip-type: '4', username: 'orange', password: 'orange', autoconnect: 'unspecified')
[14 Jan 2022, 19:43:18] [Debug] Asynchronously starting network...
[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Sent message...
<<<<<< RAW:
<<<<<<   length = 51
<<<<<<   data   = 01:32:00:00:01:1E:00:01:00:20:00:26:00:19:01:00:04:18:06:00:6F:72:61:6E:67:65:17:06:00:6F:72:61:6E:67:65:16:01:00:01:14:09:00:6F:72:61:6E:67:65:2E:66:72

[14 Jan 2022, 19:43:18] [Debug] [/dev/cdc-wdm0] Sent generic request (translated)...
<<<<<< QMUX:
<<<<<<   length  = 50
<<<<<<   flags   = 0x00
<<<<<<   service = "wds"
<<<<<<   client  = 30
<<<<<< QMI:
<<<<<<   flags       = "none"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 38
<<<<<<   message     = "Start Network" (0x0020)
<<<<<< TLV:
<<<<<<   type       = "IP Family Preference" (0x19)
<<<<<<   length     = 1
<<<<<<   value      = 04
<<<<<<   translated = ipv4
<<<<<< TLV:
<<<<<<   type       = "Password" (0x18)
<<<<<<   length     = 6
<<<<<<   value      = 6F:72:61:6E:67:65
<<<<<<   translated = orange
<<<<<< TLV:
<<<<<<   type       = "Username" (0x17)
<<<<<<   length     = 6
<<<<<<   value      = 6F:72:61:6E:67:65
<<<<<<   translated = orange
<<<<<< TLV:
<<<<<<   type       = "Authentication Preference" (0x16)
<<<<<<   length     = 1
<<<<<<   value      = 01
<<<<<<   translated = pap
<<<<<< TLV:
<<<<<<   type       = "APN" (0x14)
<<<<<<   length     = 9
<<<<<<   value      = 6F:72:61:6E:67:65:2E:66:72
<<<<<<   translated = orange.fr

[14 Jan 2022, 19:43:19] [Debug] [/dev/cdc-wdm0] Received message...
<<<<<< RAW:
<<<<<<   length = 39
<<<<<<   data   = 01:26:00:80:01:1E:02:01:00:20:00:1A:00:02:04:00:01:00:0E:00:01:04:00:00:00:00:00:10:02:00:01:00:11:04:00:03:00:C8:09

[14 Jan 2022, 19:43:19] [Debug] [/dev/cdc-wdm0] Received generic response (translated)...
<<<<<< QMUX:
<<<<<<   length  = 38
<<<<<<   flags   = 0x80
<<<<<<   service = "wds"
<<<<<<   client  = 30
<<<<<< QMI:
<<<<<<   flags       = "response"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 26
<<<<<<   message     = "Start Network" (0x0020)
<<<<<< TLV:
<<<<<<   type       = "Result" (0x02)
<<<<<<   length     = 4
<<<<<<   value      = 01:00:0E:00
<<<<<<   translated = FAILURE: CallFailed
<<<<<< TLV:
<<<<<<   type       = "Packet Data Handle" (0x01)
<<<<<<   length     = 4
<<<<<<   value      = 00:00:00:00
<<<<<<   translated = 0
<<<<<< TLV:
<<<<<<   type       = "Call End Reason" (0x10)
<<<<<<   length     = 2
<<<<<<   value      = 01:00
<<<<<<   translated = generic-unspecified
<<<<<< TLV:
<<<<<<   type       = "Verbose Call End Reason" (0x11)
<<<<<<   length     = 4
<<<<<<   value      = 03:00:C8:09
<<<<<<   translated = [ type = 'cm' reason = '2504' ]

error: couldn't start network: QMI protocol error (14): 'CallFailed'
call end reason (1): generic-unspecified
verbose call end reason (3,2504): [cm] invalid-sim-state
[/dev/cdc-wdm0] Client ID not released:
        Service: 'wds'
            CID: '30'
[14 Jan 2022, 19:43:19] [Debug] [/dev/cdc-wdm0] Releasing 'wds' client with flags 'none'...
[14 Jan 2022, 19:43:19] [Debug] [/dev/cdc-wdm0] Unregistered 'wds' client with ID '30'
[14 Jan 2022, 19:43:19] [Debug] Client released
[14 Jan 2022, 19:43:19] [Debug] Closed

Hi
Can you run this and paste the output?

uqmi -d /dev/cdc-wdm0 --uim-get-sim-state
uqmi -d /dev/cdc-wdm0 --get-profile-settings 3gpp,1
uqmi -d /dev/cdc-wdm0 --get-device-operating-mode
uqmi -d /dev/cdc-wdm0 --get-serving-system
uqmi -d /dev/cdc-wdm0 --get-signal-info
uqmi -d /dev/cdc-wdm0 --get-system-info
uqmi -d /dev/cdc-wdm0 --get-current-settings

Thx, Mr Haav,

Here is the output of all uqmi commands.

root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --uim-get-sim-state
{
        "pin1_status": "disabled",
        "pin1_verify_tries": 3,
        "pin1_unlock_tries": 10,
        "pin2_status": "not_verified",
        "pin2_verify_tries": 3,
        "pin2_unlock_tries": 10
}
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-profile-settings 3gpp,1
{
        "apn": "\"orange.fr\"",
        "pdp-type": "ipv4",
        "username": "orange",
        "password": "orange",
        "auth": "PAP"
}
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-device-operating-mode
"online"
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-serving-system
{
        "registration": "registered",
        "plmn_description": "Orange",
        "plmn_mcc": 208,
        "plmn_mnc": 1,
        "mnc_length": 2,
        "roaming": false
}
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
        "type": "wcdma",
        "rssi": -85,
        "ecio": 12
}
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-system-info
{
        "gsm": {
                "service_status": "none",
                "true_service_status": "none",
                "preferred_data_path": false
        },
        "wcdma": {
                "service_status": "available",
                "true_service_status": "available",
                "preferred_data_path": false,
                "domain": "cs",
                "service": "cs-ps",
                "roaming_status": "off",
                "forbidden": false,
                "mcc": "208",
                "mnc": "01",
                "location_area_code": 792,
                "rnc_id": 139,
                "cell_id": 24096
        },
        "lte": {
                "service_status": "none",
                "true_service_status": "none",
                "preferred_data_path": false,
                "registration_restriction": 0
        }
}
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-current-settings
"Out of call"

Hi
Your APN looks strange. Can you test this?

uqmi -d /dev/cdc-wdm0 --modify-profile 3gpp,1 --apn orange.fr
uqmi -d /dev/cdc-wdm0 --get-profile-settings 3gpp,1

Here is the result:

root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-profile-settings 3gpp,1
{
        "apn": "orange.fr",
        "pdp-type": "ipv4",
        "username": "orange",
        "password": "orange",
        "auth": "PAP"
}

Do you have the same APN-settings in Luci?
What happens if you restart the modem/interface from Luci?

Well unfortunately :

**Protocol:** QMI Cellular
**RX:** 0 B (0 Pkts.)
**TX:** 0 B (0 Pkts.)
**Error:** Unknown error (IPV4_APN_ERROR)

Can you print uqmi -d /dev/cdc-wdm0 --get-profile-settings 3gpp,1 again?

I assume that you have tried:

  • APN : orange
  • Nom d'utilisateur : orange
  • Mot de passe : orange
  • Type d'authentification : PAP
  • Protocole APN : IPv4

My interpretation from your logs:
Your PINcode is disabled
SIMcard OK, your are able to register on 3G (WCDMA)
But something is still wrong with your APNsettings

1 Like

Yeeepi you yeeepi yeah !!
It is now working !

<strong>Protocol:</strong> QMI Cellular
**Uptime:** 0h 17m 37s
**RX:** 6.38 KB (32 Pkts.)
**TX:** 18.47 KB (362 Pkts.)

Thank you so much for your help !!