User Tools

Site Tools


doc:appunti:hardware:tl-mr6400_openwrt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:hardware:tl-mr6400_openwrt [2023/02/01 16:25] – [The SNMP Daemon] niccolodoc:appunti:hardware:tl-mr6400_openwrt [2024/04/26 15:30] (current) – [Upgrade to OpenWRT 22.05.0] niccolo
Line 53: Line 53:
 ===== Upgrade the uqmi package ===== ===== Upgrade the uqmi package =====
  
-Download the custom **uqmi** packages for OpenWRT 22.03.2 here: **[[https://github.com/mrhaav/openwrt/raw/master/22.03.2/uqmi_2022-11-29-0.10_mipsel_24kc.ipk|uqmi_2022-11-29-0.10_mipsel_24kc.ipk]]**.+Using the stock **uqmi** package provided by OpenWRT 22.03.2 I was not able to bring up the LTE interface. The error message shown by **logread** was: 
 + 
 +<code> 
 +daemon.notice netifd: lte4g (2329): Command failed: 
 +    ubus call network.interface notify_proto 
 +    { "action": 0, "link-up": false, "keep": false, "interface": "lte4g"
 +    (Permission denied) 
 +daemon.notice netifd: Interface 'lte4g' is now down 
 +daemon.notice netifd: Interface 'lte4g' is setting up now 
 +daemon.notice netifd: lte4g (2343): Waiting for SIM initialization 
 +</code> 
 + 
 +I downloaded a custom **uqmi** packages for OpenWRT 22.03.2 here: **[[https://github.com/mrhaav/openwrt/raw/master/22.03.2/uqmi_2022-11-29-0.10_mipsel_24kc.ipk|uqmi_2022-11-29-0.10_mipsel_24kc.ipk]]**.
  
 The **uqmi** depends upon **libubox** and **libblobmsg-json**, these are the exact versions that satisfied the dependency in my installation: The **uqmi** depends upon **libubox** and **libblobmsg-json**, these are the exact versions that satisfied the dependency in my installation:
Line 61: Line 73:
 ^ libblobmsg-json20220515  | 2022-05-15-d2223ef9-1  | ^ libblobmsg-json20220515  | 2022-05-15-d2223ef9-1  |
  
 +Now the ''logread'' output is OK, except that IPv6 is not negotiated (may be a fault by the Iliad provider):
 +
 +<code>
 +kern.info kernel:  qmi_wwan 1-1:1.4: cdc-wdm0: USB WDM device
 +kern.info kernel:  qmi_wwan 1-1:1.4 wwan0:
 +                   register 'qmi_wwan' at usb-101c0000.ehci-1,
 +                   WWAN/QMI device, 1a:45:b9:77:47:66
 +kern.info kernel:  usbcore: registered new interface driver qmi_wwan
 +kern.info kernel:  usbcore: registered new interface driver option
 +kern.info kernel:  usbserial: USB Serial support registered for GSM modem (1-port)
 +daemon.notice netifd: Interface 'lte4g' is setting up now
 +daemon.notice netifd: lte4g (1900): PINcode disabled
 +daemon.notice netifd: lte4g (1900): Data format set to raw-ip
 +daemon.notice netifd: lte4g (1900): Default profile: 1
 +daemon.notice netifd: lte4g (1900): Change default profile
 +daemon.notice netifd: lte4g (1900):  apn:  to iliad
 +daemon.notice netifd: lte4g (1900):  authentication: none to both
 +daemon.notice netifd: lte4g (1900): Airplane mode off
 +daemon.notice netifd: lte4g (1900):  registered on 22250
 +daemon.notice netifd: lte4g (1900): Registered to Iliad on LTE
 +daemon.notice netifd: lte4g (1900): Connected with IPv4
 +daemon.notice netifd: lte4g (1900): Unable to connect with IPv6
 +daemon.notice netifd: lte4g (1900): Setting up wwan0
 +daemon.notice netifd: Interface 'lte4g' is now up
 +</code>
  
 ===== Configure the LTE connection ===== ===== Configure the LTE connection =====
Line 260: Line 297:
  
 <code bash> <code bash>
-snmpwalk -v 2c -c public 172.16.4.189 'NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."lte_rssi"'+snmpwalk -v 2c -c public 192.168.1.'NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."lte_rssi"'
 NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."lte_rssi" = STRING: -65 NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."lte_rssi" = STRING: -65
 </code> </code>
  
 +===== Wake-on-LAN =====
 +
 +I was not able to instal the **wakeonlan** package because it depends upon Perl (not enough space on flash memory). Fortunately I was able to install **etherwake**, which requires only **4 kb**.
 +
 +===== Upgrade to OpenWRT 22.05.0 =====
 +
 +To upgrade from OpenWRT **22.03.3** to **22.05.0** we used the **sysupgrade** option, which preserves the existing configuration, at least partially.
 +
 +Download the new firmware **[[https://downloads.openwrt.org/releases/23.05.0/targets/ramips/mt76x8/openwrt-23.05.0-ramips-mt76x8-tplink_tl-mr6400-v5-squashfs-sysupgrade.bin|openwrt-23.05.0-ramips-mt76x8-tplink_tl-mr6400-v5-squashfs-sysupgrade.bin]]** to your PC. Connect the PC to one of the Ethernet ports of the router and point your browser to the LuCI web interface. Click the **System** => **Backup / Flash Firmware** page and then upload the firmware file to the router by clicking **Flash new firmware image**.
 +
 +Once the router reboots, you can access it via SSH or LuCI web, the network configuration should have been preserved.
 +
 +Beware that all the extra packages must be installed again, notably the **uqmi** package, required to drive the LTE modem for internet access, must be upgraded to version **[[https://raw.githubusercontent.com/mrhaav/openwrt/master/23.05.0/uqmi_2022-11-29-0.11_mipsel_24kc.ipk|uqmi_2022-11-29-0.11_mipsel_24kc.ipk]]**. That version is not included into the official repository and thus must be downloaded from the GitHub repository.
 +
 +The repository roots are:
 +
 +  * https://downloads.openwrt.org/releases/23.05.0/targets/ramips/mt76x8/
 +  * https://downloads.openwrt.org/releases/23.05.0/packages/mipsel_24kc/
 +
 +This is the list of all the extra packages installed:
 +
 +^ Package                               ^ Space  ^
 +| uqmi_2022-11-29-0.11_mipsel_24kc.ipk  |   92K |
 +| openvpn                                228K |
 +| luci-app-openvpn                      |  320K |
 +| tcpdump-mini                          |  314K |
 +| snmpd                                  540K |
 +| luci-app-snmpd                        |    8K |
 +| etherwake                                8K |
 +| coreutils-base64                      |       |
 +
 +===== Sending and receiving SMS =====
 +
 +Once installed the **uqmi** package, there is a daemon process **/usr/bin/uqmi_d.sh** which is responsible for sending and receiving SMS messages. The program will check every 30 seconds if there is a file into the **send** directory and eventually save received SMS messages from the modem memory to the **received** directory:
 +
 +  * **/var/sms/send/**
 +  * **/var/sms/received/**
 +
 +To send a message just create a text file into the **/var/sms/send/** directory; the first line must contain the recipient phone number, the following lines are the text message. E.g.
 +
 +<file>
 ++393274445556
 +Hello, World!
 +</file>
 +
 +Received messages will be saved automatically into **/var/sms/received/**, in files named something like **sms_20240426T150933**. The content will be something like:
 +
 +<file>
 +[Phone Number|CallerID]
 +Tex message.
 +</file>
 +
 +If you stop the running uqmi_d.sh daemon, it is possibile to retrieve received messages from **sim** or from **me** (memory). Get first the list of messages availables and then retrieve one:
 +
 +<code>
 +uqmi -d /dev/cdc-wdm0 --list-messages --storage me
 +uqmi -s -d /dev/cdc-wdm0 --get-message 0 --storage me
 +</code>
  
 ===== Web References ===== ===== Web References =====
doc/appunti/hardware/tl-mr6400_openwrt.1675265132.txt.gz · Last modified: 2023/02/01 16:25 by niccolo