Changes between Version 20 and Version 21 of wireless/modem/AMITMDG


Ignore:
Timestamp:
11/15/2022 11:36:34 PM (5 months ago)
Author:
Ryan Erbstoesser
Comment:

update page for modem manager

Legend:

Unmodified
Added
Removed
Modified
  • wireless/modem/AMITMDG

    v20 v21  
    6666= Software
    6767
    68 == SSH
    69 It is possible to SSH into the MDG200
    70 
    71 Default SSH username/password: (If it has not been changed in the webgui)
    72 
    73 admin/wirelessm2m
    74 
    75 Command list is provide [http://trac.gateworks.com/attachment/wiki/wireless/modem/AMITMDG/20220831-MDG100-200-CLI_Command_list_V3.docx here]
    76 
    77 == AT Commands and Script
     68
     69
     70== Modem Manager
    7871
    7972Gateworks has put together a script that allows to easily reconfigure the MDG200 modem to be configurable with modem manager in AT mode. The only dependency for this script is that you have curl installed on your system (first command run here).
    8073
    81 The base OS for this is the Ubuntu 20.04 system that we ship as the default image on our product. This script also assumes the modem is in the factory reset state. You can simply reset a MDG200 to the factory reset by depressing the button on the modem for >6 seconds while powered on, we have found we needed to wait 30 seconds or so after doing this for the factory defaults to be set correctly.
    82 
    83 The script logs into the web ui on the device, sets the password if needed (required on first login), set the mode to "modem" mode, sets the sim selection to the external sim (on the GW board), and set AT_NMEA mode then reboots the device.
     74The base OS for this is the Ubuntu system that we ship as the default image on our product. This script also assumes the modem is in the factory reset state. You can simply reset a MDG200 to the factory reset by depressing the button on the modem for >6 seconds while powered on, we have found we needed to wait 30 seconds or so after doing this for the factory defaults to be set correctly.
     75
     76The script logs into the web UI on the device, sets the password if needed (required on first login), set the mode to "modem" mode, sets the sim selection to the external sim (on the GW board), and set AT_NMEA mode then reboots the device.
    8477
    8578Download the init_mdg200.sh script [http://trac.gateworks.com/attachment/wiki/wireless/modem/AMITMDG/init_mdg200.txt here]
     79  * Note, the script needs execute permissions to run on the Gateworks platform.
     80  * Note, if the script has issues running, some users need to run a dos2unix command to ensure proper file encoding.
    8681
    8782Here are the commands run in order (assuming attached script is on the board at /root/init_mdg200.sh):
     
    9691}}}
    9792
    98 After the command runs, the modem reboots and re-initializes into modem modem with the AT interface exposed that modemmanager can then latch on to. This takes 30-45 seconds to complete to the point modem manager can then communicate with it. From there, we were simply able to do the following to gain internet activity.
     93After the command runs, the modem reboots and re-initializes into 'modem' mode (factory default was NAT mode) with the AT interface exposed that modemmanager can then latch on to. This takes 30-45 seconds to complete to the point modem manager can then communicate with it. If it doesn't appear after that time, a full system / power reset should be tried. From there, we were simply able to do the following to gain internet activity.
    9994
    10095{{{
     
    106101}}}
    107102
    108 
    109 The modprobe of the option module and the "echo" command will need to be done on init every boot, but the init_mdg200.sh should only need to be done once during provisioning.
     103The modprobe of the option module and the "echo" command will need to be done on init every boot (likely also the ifconfig usb0 up command & dhclient usb0), but the init_mdg200.sh should only need to be done once during provisioning.
     104Every boot from there on after:
     105{{{
     106modprobe option
     107echo 0x5c6 0x90b3 > /sys/bus/usb-serial/drivers/option1/new_id
     108ifconfig usb0 up
     109dhclient usb0
     110}}}
    110111
    111112[http://trac.gateworks.com/attachment/wiki/wireless/modem/AMITMDG/MDG100%20work%20on%20Linux.pdf This] document explains how to use the AMIT modem with AT commands if you prefer to avoid the WebUI.
    112113
     114== SSH
     115It is possible to SSH into the MDG200
     116
     117Default SSH username/password: (If it has not been changed in the webgui)
     118
     119admin/wirelessm2m
     120
     121Command list is provide [http://trac.gateworks.com/attachment/wiki/wireless/modem/AMITMDG/20220831-MDG100-200-CLI_Command_list_V3.docx here]
     122
    113123== Amit webUI
    114124
     125This method allows modem configuration through a WebGUI.
     126
     127This can be achieved through a SSH tunnel to the Gateworks SBC.
     128
     129First, on the Gateworks SBC, bring the interface up:
     130{{{#!bash
     131ifconfig usb0 up
     132dhclient usb0
     133}}}
     134Then run the following command on a laptop/desktop that is on the same network as the Gateworks SBC (that has [wiki:ubuntu#SSHServer SSH enabled])
     135{{{
     136ssh -L 8888:172.16.0.1:80 root@192.168.1.101
     137#where 192.168.1.101 is the IP of the Gateworks SBC
     138}}}
     139
     140Then, on the laptop or desktop, open a browser and browse to http://localhost:8888 and you will see a modem login page (admin/admin)
     141
     142A more involved method that involves nftables:
     143[[CollapsibleStart(NFTables)]]
    115144Install nftables:
    116145{{{#!bash
     
    143172dhclient usb0
    144173}}}
     174[[CollapsibleEnd]]
    145175
    146176=== Configure the modem using the WebUI