Changes between Version 20 and Version 21 of wireless/modem/AMITMDG
- Timestamp:
- 11/15/2022 11:36:34 PM (5 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
wireless/modem/AMITMDG
v20 v21 66 66 = Software 67 67 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 78 71 79 72 Gateworks 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). 80 73 81 The base OS for this is the Ubuntu 20.04system 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 uion 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.74 The 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 76 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. 84 77 85 78 Download 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. 86 81 87 82 Here are the commands run in order (assuming attached script is on the board at /root/init_mdg200.sh): … … 96 91 }}} 97 92 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.93 After 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. 99 94 100 95 {{{ … … 106 101 }}} 107 102 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. 103 The 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. 104 Every boot from there on after: 105 {{{ 106 modprobe option 107 echo 0x5c6 0x90b3 > /sys/bus/usb-serial/drivers/option1/new_id 108 ifconfig usb0 up 109 dhclient usb0 110 }}} 110 111 111 112 [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. 112 113 114 == SSH 115 It is possible to SSH into the MDG200 116 117 Default SSH username/password: (If it has not been changed in the webgui) 118 119 admin/wirelessm2m 120 121 Command list is provide [http://trac.gateworks.com/attachment/wiki/wireless/modem/AMITMDG/20220831-MDG100-200-CLI_Command_list_V3.docx here] 122 113 123 == Amit webUI 114 124 125 This method allows modem configuration through a WebGUI. 126 127 This can be achieved through a SSH tunnel to the Gateworks SBC. 128 129 First, on the Gateworks SBC, bring the interface up: 130 {{{#!bash 131 ifconfig usb0 up 132 dhclient usb0 133 }}} 134 Then 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 {{{ 136 ssh -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 140 Then, 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 142 A more involved method that involves nftables: 143 [[CollapsibleStart(NFTables)]] 115 144 Install nftables: 116 145 {{{#!bash … … 143 172 dhclient usb0 144 173 }}} 174 [[CollapsibleEnd]] 145 175 146 176 === Configure the modem using the WebUI