62 | | == Gain Access to the Amit webUI |
| 66 | = Software |
| 67 | == AT Commands and Script |
| 68 | |
| 69 | 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). |
| 70 | |
| 71 | 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. |
| 72 | |
| 73 | 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. |
| 74 | |
| 75 | Here are the commands run in order (assuming attached script is on the board at /root/init_mdg200.sh): |
| 76 | |
| 77 | {{{ |
| 78 | apt-get install -y curl |
| 79 | modprobe option |
| 80 | echo 0x5c6 0x90b3 > /sys/bus/usb-serial/drivers/option1/new_id |
| 81 | ifconfig usb0 up |
| 82 | dhclient usb0 |
| 83 | /root/init_mdg200.sh |
| 84 | }}} |
| 85 | |
| 86 | 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, I was simply able to do the following to gain internet activity. |
| 87 | |
| 88 | {{{ |
| 89 | mmcli -L (to get the modem number) |
| 90 | mmcli -m <insert modem number> --simple-connect="apn=hologram" |
| 91 | ifconfig usb0 up |
| 92 | dhclient usb0 |
| 93 | ping 8.8.8.8 |
| 94 | }}} |
| 95 | |
| 96 | |
| 97 | 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. |
| 98 | |
| 99 | [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. |
| 100 | |
| 101 | == Amit webUI |