Changes between Version 25 and Version 26 of expansion/gw16126


Ignore:
Timestamp:
06/11/2019 07:03:11 PM (5 years ago)
Author:
Tim Harvey
Comment:

re-wrote AT section to remove obsolete URAT and steer people towards using profiles vs COPS

Legend:

Unmodified
Added
Removed
Modified
  • expansion/gw16126

    v25 v26  
    3434 * /dev/cdc-wdm0 (qmi) (CONFIG_USB_NET_QMI_WWAN qmi_wwan)
    3535 * /sys/class/net/wwan0 (net) (CONFIG_USB_NET_QMI_WWAN qmi_wwan)
     36  - **Note that the 3 tty devices can appear in different order as USB enumeration is not guaranteed to be consistent across boots**
    3637
    3738'''The drivers do not add the modem device ID (05c6:90b2) until mainline kernel 4.17'''.
     
    8081 - Fully supported (with the above)
    8182
    82 OpenWrt 18.6.1:
     83OpenWrt 18.6.x:
    8384 - requires kmod-usb-net-opton, kmod-usb-net-qmi-wwan, kmod-usb-serial, kmod-usb-serial-ftdi, kmod-usb-serial-qualcomm, kmod-bluetooth, kmod-crypto-user, kmod-crypto-hash, bluez-daemon, uqmi
    8485 - fully supported (with the above)
     
    8990The modem features a Qualcomm chipset that uses the 'option' and 'qmi_wwan' Linux drivers providing the following devices:
    9091 * /dev/ttyUSB1 (qcdm)
    91  * /dev/ttyUSB2
     92 * /dev/ttyUSB2 (AT)
    9293 * /dev/cdc-wdm0 (qmi)
    9394 * /sys/class/net/wwan0 (net)
     
    99100''' Note, because this modem uses raw-ip, the IP from the provider will not automatically be applied to the interface. The provider will give an IP and then it must manually be applied to the wwan0 interface.'''
    100101
    101 ==== AT Commands ====
    102 
    103 AT Commands are supported on one of the /dev/ttyUSB lines.
    104 
    105 * [https://www.u-blox.com/sites/default/files/SARA-R4-SARA-N4_ATCommands_%28UBX-17003787%29.pdf u-blox SARA-R4/N4 series AT Commands Manual, Doc. No. UBX-17003787]
    106 
    107 Radio Access Technology (RAT):
    108  * R4 Series of Ublox Modems support NB-IoT and Cat-M1 and are enabled default. NB-IoT hasn't spread much in the USA so turning that off can speed up connections to CAT-M1
    109 {{{
    110 AT+URAT? # Query the radio access technology; 7 = Cat-M1, 8 = NB-Iot, 7&8 = both
    111 AT+URAT=7 # Cat-M1 only
    112 AT+URAT=8 # NB-IoT only
    113 AT+URAT=7&8 # both
    114 }}}
    115 
    116 Operator selection:
    117 {{{
    118 AT+COPS?  #is to check what network currently on
    119 AT+COPS=? #is to check what networks are available
    120 +COPS: (1,"311 480","311 480","311480",7),(2,"AT&T","AT&T","310410",7),(1,"313 100","313 100","313100",7),,(0,1,2,3,4),(0,1,2)
    121 AT+COPS=1,2,"310410" #sets to AT&T
    122 AT+COPS=1,2,"311480" #sets to verizon
    123 AT+COPS=0,0 #To go back to automatic carrier selection (which is typically recommended)
    124 }}}
     102==== AT Commands
     103For a detailed list of all AT commands see:
     104 * [https://www.u-blox.com/sites/default/files/SARA-R4-SARA-N4_ATCommands_%28UBX-17003787%29.pdf u-blox SARA-R4/N4 series AT Commands Manual, Doc. No. UBX-17003787]
     105
     106AT Commands are supported on the second /dev/ttyUSB lines. Because you can't guarantee the order Linux enumerates USB devices use the following to determine the AT tty:
     107{{{#!bash
     108DEVICE=/dev/$(for i in $(ls -d /sys/bus/usb/drivers/option/*/ttyUSB*); do basename $i; done | tail -n1)
     109}}}
     110
     111Note that you can not use AT commands while using PPP as this uses the same TTY. If using PPP you can kill pppd (ie 'ifdown wwan0'), perform AT commands closing the TTY when done, then re-start pppd (ie 'ifup wwan0'). It is highly recommended you use QMI as that uses a different interface leaving the AT TTY available for use if needed to do things that perhaps are not supported by QMI.
     112
     113
     114===== Mobile Network Operator (MNO) Selection
     115Use the {{{AT+UMNOPROF}}} command to change profiles to a specific Mobile Network Operator (MNO):
     116 * AT+UMNOPROF? - show current profile
     117 * AT+UMNOPROF=? - list supported profiles
     118 * AT+UMNOPROF=<n> - set profile to <n>
     119
     120Notes:
     121 * **Do not modify individual parameters within the profile such as operator selection as that can break compatibility with your operator**
     122 * you must de-register from the network before changing the MNO (AT+COPS=2)
     123 * you must issue a reset after changing the MNO (AT+CFUN=15 issues a silent reset with a detach from the network and saving of NVM parameters)
     124 * Setting the profile to the currently set profile does not reset the parameters. To reset the parameters,
     125 set a different profile than the current one and then set the the profile back to the original (like 0).
     126 
     127Examples:
     128 * Set MNO to Verizon:
     129{{{#!bash
     130# obtain AT command TTY (the 2nd tty)
     131DEVICE=/dev/$(for i in $(ls -d /sys/bus/usb/drivers/option/*/ttyUSB*); do basename $i; done | tail -n1)
     132# configure TTY
     133stty -F $DEVICE ignbrk -brkint -icrnl -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
     134# background process to read TTY responses
     135cat $DEVICE &
     136at "AT+COPS=2" # deregister from network
     137at "AT+UMNOPROF=0" # set MNO to auto
     138at "AT+UMNOPROF=3" # set MNO to Verizon
     139at "AT+CFUN=15" # de-register from network, save NVM, and reset modem
     140}}}
     141 * Note that the {{{AT+CFUN=15}}} will cause the modem to disconnect and re-enumerate on the bus
    125142
    126143