RADIUSdesk

logo

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
technical:lte [2022/11/23 11:33]
admin [Interacting with the modem]
technical:lte [2022/11/23 14:56] (current)
admin [Using AT Commands]
Line 1: Line 1:
 ====== Hands On LTE on OpenWrt ====== ====== Hands On LTE on OpenWrt ======
 ===== Supported hardware ===== ===== Supported hardware =====
-  * The supported LTE hardware in OpenWrt can be a minefield and my recommendation is to stick with those hardware that have been tested by the community and confirmed working.+  * The supported LTE hardware in OpenWrt can be a minefield and my recommendation is to stick with those hardware that have been tested by the community to be confirmed working.
   * In the past I tried to use a Huawei LTE USB stick.    * In the past I tried to use a Huawei LTE USB stick. 
   * They can be running in two modes.   * They can be running in two modes.
Line 7: Line 7:
         * **NCM**  https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_ncm         * **NCM**  https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_ncm
   * The preferred mode is **NCM** but the with USB stick I had it was impossible to switch modes and I was stuck with **RNDIS** mode.   * The preferred mode is **NCM** but the with USB stick I had it was impossible to switch modes and I was stuck with **RNDIS** mode.
-  * Another time I had a Mikrotik device with one of their LTE modems (pcie card). After many days and trying many things I eventually just gave up and replaced the card with another one that has proper OpenWrt support. +  * Another time I had a Mikrotik Access Point flashed with OpenWrt that had one of their LTE modems (pcie card). After many days of trying various things I eventually just gave up and replaced the card with one that has proper OpenWrt support. 
-  * Some Access Points that comes with  LTE modems included are well supported in OpenWrt.+  * Some Access Points that comes with LTE modems included are well supported in OpenWrt.
         * Cell-C / Belotech (https://openwrt.org/toh/cell_c/rtl30vw)         * Cell-C / Belotech (https://openwrt.org/toh/cell_c/rtl30vw)
         * GL.iNet GL-MiFi (https://openwrt.org/toh/gl.inet/gl-mifi)         * GL.iNet GL-MiFi (https://openwrt.org/toh/gl.inet/gl-mifi)
Line 38: Line 38:
   * qmi-utils   * qmi-utils
   * picocom   * picocom
 +  * luci-proto-qmi
 <code bash> <code bash>
 opkg update opkg update
-opkg install picocom qmi-utils+opkg install picocom qmi-utils uci-proto-qmi
 </code> </code>
  
Line 54: Line 55:
 <code bash> <code bash>
 uqmi -d /dev/cdc-wdm0 --get-data-status uqmi -d /dev/cdc-wdm0 --get-data-status
 +#This is the return
 +"connected"
 +
 uqmi -d /dev/cdc-wdm0 --get-signal-info uqmi -d /dev/cdc-wdm0 --get-signal-info
 +#This is the return
 +{
 + "type": "lte",
 + "rssi": -69,
 + "rsrq": -11,
 + "rsrp": -96,
 + "snr": 11.000000
 +}
 +
 uqmi -d /dev/cdc-wdm0 --get-system-info uqmi -d /dev/cdc-wdm0 --get-system-info
 +#This is the return
 +{
 + "wcdma": {
 + "service_status": "none",
 + "true_service_status": "none",
 + "preferred_data_path": false
 + },
 + "lte": {
 + "service_status": "available",
 + "true_service_status": "available",
 + "preferred_data_path": false,
 + "domain": "cs-ps",
 + "service": "cs-ps",
 + "roaming_status": "off",
 + "forbidden": false,
 + "mcc": "655",
 + "mnc": "07",
 + "tracking_area_code": 18,
 + "enodeb_id": 18353,
 + "cell_id": 80,
 + "voice_support": true,
 + "ims_voice_support": false,
 + "cell_access_status": "all calls",
 + "registration_restriction": 0,
 + "registration_domain": 0
 + }
 +}
 </code> </code>
  
 ===== UCI Configuration ===== ===== UCI Configuration =====
 +  * The UCI system includes support for LTE confguration in ///etc/config/network//.
 +  * The MESHdesk firmware will create the config section based on the configuration returned by the controller.
 +  * Here is a sample section as reference
 +<code bash>
 +config interface 'wwan'
 + option ifname 'wwan'
 + option disabled '0'
 + option wan_bridge '0'
 + option device '/dev/cdc-wdm0'
 + option apn 'lte.broadband.is'
 + option proto 'qmi'
 + option auth 'none'
 +</code>
 +  * You can also install the **luci-proto-qmi** package which essentially does the same that MESHdesk and APdesk does but only local on the Access Point. 
  
  
 ===== Using AT Commands ===== ===== Using AT Commands =====
 +  * We can use picocom terminal to reach the LTE modem
 +<code bash>
 + picocom /dev/ttyUSB2
 +</code>
 +  * I had to first issue the following commands before the modem returned something for CUSD
 +<code bash>
  
 +AT+CMGF=1
 +OK
 +ATZ
 +OK
 +AT+CUSD=1,"*101#",15
 +OK
 +
 ++CUSD: 0,"Balance: R 0.00 .Data: 25.83 MB.",15
 +
 +</code>
 +  * You can allos issue the following command without needing to log into picocom
 +<code bash>
 + echo 'AT+CUSD=1,"*101#",15' | picocom -qrix 10000 /dev/ttyUSB2
 +#Here is what my provider returned
 ++CUSD: 0,"Balance: R 0.00 .Data: 6.40 MB.",15
 +</code>