Changes between Version 100 and Version 101 of wireless/modem


Ignore:
Timestamp:
06/27/2023 11:38:17 PM (17 months ago)
Author:
Ryan Erbstoesser
Comment:

cleanup, remove toby as it is EOL

Legend:

Unmodified
Added
Removed
Modified
  • wireless/modem

    v100 v101  
    256256
    257257* screen
    258  * NOTE: a screen session for AT commands within another screen session may
     258 * NOTE: a screen session for AT commands within another screen session may prove to be challenging
    259259{{{#!bash
    260260screen /dev/ttyUSB0 57600
     
    262262
    263263* stty/cat/echo:
     264 * '''Please note''': More complex AT commands may not work well with this method, minicom or screen is recommended
    264265{{{#!bash
    265266stty -F /dev/ttyUSB0 ignbrk -brkint -icrnl -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
     
    10931094
    10941095
     1096[=#modemmanagerdebug]
     1097==== Modem Manger Debug
     1098
     1099!ModemManager can prodcuce verbose debug output.  To do this stop and disable the systemd process, then reload !ModemManager with the debug flag.  In the codeblock below arguments have been added to log the output rather than blast it to the screen. 
     1100
     1101{{{#!bash
     1102systemctl stop ModemManager
     1103systemctl disable ModemManager
     1104/usr/sbin/ModemManager --debug > debug_logfile 2>&1 &  #this will log the output without spamming up the terminal with output.
     1105mmcli -m 0 --enable #execute mmcli commands as you would normally
     1106mmcli -m 0 --simple-connect="apn=$APN"
     1107}}}
     1108
    10951109[=#networkmanager]
    10961110=== !NetworkManager ===
     
    20552069== U-Blox Modems ==
    20562070
    2057 === GW16126 CATM1 Sara
     2071=== GW16132 CATM1 Sara
    20582072
    20592073This is a low bandwidth modem for IoT designs that Gateworks has created. Please read more on the [wiki:expansion/gw16126 GW16126 Wiki Page]
    2060 
    2061 === Toby L2 ===
    2062 
    2063 Gateworks has tested the Toby MPCI-L201 in USA (Mini-PCIe form factor) (GW17046)
    2064 [https://www.u-blox.com/en/product/mpci-l2-series]
    2065 
    2066  * LTE Cat 4 - Up to 150Mb/s throughput
    2067  * Multiple countries supported with different model variants
    2068  * Industrial Temperature -40 to +85C Operation
    2069  * FOTA Support
    2070  * Drivers required
    2071   * cdc_acm driver provides ttyACM0(at) (/dev/ttyACM0)
    2072   * rndis_host driver provides usb0(net)
    2073    * Will create a network interface shown from the command: ifconfig -a
    2074  * No pinout concerns - PERST# and WLAN_DIS# are used and are 3.3V compliant, VDD is 3.0 to 3.6V
    2075  * Toby L2 Documentation: [https://www.u-blox.com/en/product-resources?f%5B0%5D=property_file_product_filter%3A2451]
    2076  * Purchasing:
    2077   * GW17046 - Gateworks Shop: [https://shop.gateworks.com/index.php?route=product/product&product_id=228]
    2078  * Antenna suggestion & adapter cable: [https://shop.gateworks.com/index.php?route=product/product&product_id=89&search=gw16065 GW16065] & [https://shop.gateworks.com/index.php?route=product/product&product_id=42 GW10036]
    2079  
    2080 ==== Toby 3G Sunset ====
    2081 
    2082 Only U-Blox products that are voice-centric might be impacted by the 3G sunset.
    2083 
    2084 You can ensure the modem is explicitly set to “data centric” by issuing the commands below.
    2085 
    2086 {{{#!bash
    2087 AT+CFUN=4 #Set module in Airplane mode
    2088 AT+CEMODE=2 #Set module to "data centric"
    2089 AT+CFUN=1 #Set module in "Full" mode
    2090 }}}
    2091 
    2092 ==== BSP specific notes ====
    2093 
    2094 '''Ubuntu Notes:'''
    2095  * Tested on [wiki:ventana/ubuntu Gateworks Xenial and Bionic] (Bionic requires installing network-manager)
    2096  * Uses modem manager and network manager
    2097  * Sample set of commands:
    2098 {{{
    2099 mmcli --modem 0 --enable
    2100 mmcli --modem 0 --simple-connect="apn=yourapnname"
    2101 dhclient usb0
    2102 }}}
    2103 
    2104  * There will be an IP address assigned, something such as 192.168.1.100 to usb0. Test this using the ifconfig command (do not expect a WAN IP)
    2105  * Try first to ping an actual IP address, like 8.8.8.8 (in case DNS isn't working....)
    2106  * Then try a domain name, like www.yahoo.com
    2107   * If a domain name doesn't work, try adding a DNS like the Google DNS as follows and try the ping again:
    2108 {{{
    2109 echo "nameserver 8.8.8.8" > /etc/resolv.conf
    2110 }}}
    2111 
    2112 '''OpenWrt Notes:'''
    2113  * OpenWrt 16.02 and 18.02 have been tested
    2114  * OpenWrt 16.02 will show both usb0 and usb1 enumerated. usb1 should be used for the internet.
    2115  * Must set the APN via AT commands (Read more in the [https://www.u-blox.com/sites/default/files/u-blox-CEL_ATCommands_%28UBX-13002752%29.pdf AT Command Manual])
    2116 
    2117 Steps to establish connection using !OpenWrt:
    2118 * Verify USB device is present:
    2119 {{{
    2120 lsusb |grep U-Blox
    2121 }}}
    2122 * Verify serial interface is present:
    2123 {{{
    2124 dmesg |grep ttyACM0
    2125 }}}
    2126 * Verify virtual adapter usb0 is present. 
    2127 {{{
    2128 ls /sys/class/net
    2129 }}}
    2130 * Use UCI commands to configure interface:
    2131 {{{
    2132 uci set network.lan= # remove br-lan to avoid routing conflict
    2133 uci set network.wan=interface
    2134 uci set network.wan.proto=dhcp
    2135 uci set network.wan.ifname=usb0
    2136 uci commit network
    2137 }}}
    2138 * Refresh network interfaces
    2139 {{{
    2140 /etc/init.d/network restart
    2141 }}}
    2142 Using STTY/cat/echo enter these AT commands, more details [wiki:/wireless/modem#ATcommands  here]:
    2143 * Configure STTY echo:
    2144 {{{#!bash
    2145 stty -F /dev/ttyACM0 ignbrk -brkint -icrnl -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
    2146 }}}
    2147 * Configure STTY cat:
    2148 {{{#!bash
    2149 cat /dev/ttyACM0 &
    2150 }}}
    2151 * Verify you can communicate with modem using AT commands:
    2152 {{{#!bash
    2153 echo -n -e "ATI\r" > /dev/ttyACM0
    2154 }}}
    2155 * Verify modem IP configuration
    2156 {{{#!bash
    2157 echo -n -e "at+uipconf?\r" > /dev/ttyACM0
    2158 # Example output: +UIPCONF: "192.168.1.1","255.255.255.0","192.168.1.100","192.168.1.100","fe80::fce7:5fff:fe5b:34e/64"
    2159 
    2160 }}}
    2161 * Detach the modem from the network:
    2162 {{{#!bash
    2163 echo -n -e "AT+CFUN=4\r" > /dev/ttyACM0
    2164 }}}
    2165 * Set APN (default IOT device APN used in this example):
    2166 {{{#!bash
    2167 echo -n -e "AT+UCGDFLT=1,"IP","m2m.com.attz"\r" > /dev/ttyACM0
    2168 echo -n -e "AT+UCGDFLT?\r" > /dev/ttyACM0 #to verify
    2169 }}}
    2170 * Re-connect to network:
    2171 {{{#!bash
    2172 echo -n -e "AT+CFUN=1\r" > /dev/ttyACM0
    2173 }}}
    2174 * Verify network parameters, a dynamically assigned IP address should be displayed:
    2175 {{{#!bash
    2176 echo -n -e "at+cgdcont?\r" > /dev/ttyACM0
    2177 }}}
    2178 
    2179 This completes the configuration process, you may need to reset you device, otherwise perform ping test.  Name resolution may need to be set. 
    21802074
    21812075[=#sierra-wireless]
     
    22902184
    22912185To send AT Commands from the Linux Shell, use echo with -e -n and terminate with \r. Example below:
     2186 * PLEASE NOTE: This may not work property for some more complex AT commands, minicom or screen is recommended instead.
    22922187{{{#!bash
    22932188echo -e -n "at+cfun=1\r" > /dev/ttyUSB3
    22942189}}}
     2190
    22952191
    22962192
     
    23932289}}}
    23942290
    2395 [=#modemmanagerdebug]
    2396 === Modem Manger Debug ===
    2397 
    2398 !ModemManager can prodcuce verbose debug output.  To do this stop and disable the systemd process, then reload !ModemManager with the debug flag.  In the codeblock below arguments have been added to log the output rather than blast it to the screen. 
    2399 
    2400 {{{#!bash
    2401 systemctl stop ModemManager
    2402 systemctl disable ModemManager
    2403 /usr/sbin/ModemManager --debug > debug_logfile 2>&1 &  #this will log the output without spamming up the terminal with output.
    2404 mmcli -m 0 --enable #execute mmcli commands as you would normally
    2405 mmcli -m 0 --simple-connect="apn=$APN"
    2406 }}}
    24072291
    24082292[=#sim]