Changes between Version 39 and Version 40 of wireless/modem


Ignore:
Timestamp:
04/26/2019 07:53:03 PM (6 years ago)
Author:
Cale Collins
Comment:

added toby l2 openwrt instructions

Legend:

Unmodified
Added
Removed
Modified
  • wireless/modem

    v39 v40  
    17531753 * OpenWrt will show both usb0 and usb1 enumerated. usb1 should be used for the internet.
    17541754 * 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])
    1755   * Sample AT Command set (login to modem AT commands on /dev/ttyACM0 with information [#at here])
     1755
     1756Steps to establish connection using !OpenWrt (tested with 16.02):
     1757* Verify USB device is present:
    17561758{{{
    1757 AT+CFUN=4 # command to detach the module from the network
    1758 AT+UCGDFLT=1,"IP","yourapn" # Initial PDP (packet data protocol) context configuration
    1759 AT+CFUN=1 # return to the module full functionality
    1760 }}}
    1761   * AT+CGDCONT - Defines the connection parameters for a PDP context
    1762   * AT+UCGDFLT - Configures the initial PDP context, i.e. sets the configuration of the PDN (packet data network) activated at attach time in LTE network. The configuration can be optionally saved in NVM (non volatile memory).
    1763  * Tested configuration in /etc/config/network:
     1759* lsusb |grep U-Blox
     1760}}}
     1761* Verify serial interface is present:
    17641762{{{
    1765 config interface 'wan'
    1766         option ifname 'usb1'
    1767         option proto 'dhcp'
    1768 }}}
     1763* dmesg |grep ttyACM0
     1764}}}
     1765* Verify both virtual adapters usb0 and usb1 are present:
     1766{{{
     1767ls /sys/class/net
     1768}}}
     1769* Use UCI commands to configure interface:
     1770{{{
     1771uci set network.wan=interface
     1772uci set network.wan.proto=dhcp
     1773uci set network.wan.ifname=usb1
     1774uci commit network
     1775}}}
     1776Using STTY/cat/echo enter these AT commands, more details [wiki:/wireless/modem#ATcommands  here]:
     1777* Configure STTY echo:
     1778{{{#!bash
     1779stty -F /dev/ttyACM0 ignbrk -brkint -icrnl -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
     1780}}}
     1781* Configure STTY cat:
     1782{{{#!bash
     1783cat /dev/ttyACM0 &
     1784}}}
     1785* Verify you can communicate with modem using AT commands:
     1786{{{#!bash
     1787echo -n -e "ATI\r" > /dev/ttyACM0
     1788}}}
     1789* Verify modem IP configuration
     1790{{{#!bash
     1791echo -n -e "at+uipconf?\r" > /dev/ttyACM0
     1792# 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"
     1793
     1794}}}
     1795* Detach the modem from the network:
     1796{{{#!bash
     1797echo -n -e "AT+CFUN=4\r" > /dev/ttyACM0
     1798}}}
     1799* Set APN (default IOT device APN used in this example):
     1800{{{#!bash
     1801echo -n -e "AT+UCGDFLT=1,"IP","m2m.com.attz"\r" > /dev/ttyACM0
     1802echo -n -e "AT+UCGDFLT?\r" > /dev/ttyACM0 #to verify
     1803}}}
     1804* Re-connect to network:
     1805{{{#!bash
     1806echo -n -e "AT+CFUN=1\r" > /dev/ttyACM0
     1807}}}
     1808* Verify network parameters, a dynamically assigned IP address should be displayed:
     1809{{{#!bash
     1810echo -n -e "at+cgdcont?\r" > /dev/ttyACM0
     1811}}}
     1812
     1813This completes the configuration process, you may need to reset you device, otherwise perform ping test.  Name resolution may need to be set. 
    17691814
    17701815[=#sierra-wireless]