wiki:wireless/modem/AMITMDG

Amit MDG100 and MGD200 Cellular Modem

The Amit MGD200 is designed as a socket modem using a mini-PCIe form factor via USB 2.0 interface, perfect for use with Gateworks SBC's. This product has cellular capability with WCDMA and LTE Cat4 and also support GNSS receiver for location information. The device offers an OS-ready NIC interface (Option1 driver in Linux) and a friendly web-based GUI for parameter setting and status checking. Best of all it's PTCRB certified as an end device so no additional testing is required by ATT/Verizon!

MDG200 is a Cat-4 LTE (150Mbps DL, 50Mbps UL) modem.

Certification

Hardware setup

MDG200 Installation

This Modem consists of two pieces, a mPCI-e adapter board, and the modem module.

To install see the following instructions:

  1. Insert your nanoSIM into the nanoSIM socket on the bottom side of the modem module.
  2. Attach the adapter board to the SBC with the two hex male/female standoffs as shown below.

amit base board

  1. Plug the modem module into the connector on the adapter and then using the two screws secure it to the adapter board as shown below.

amit mounted

  1. Attach your antennas. Two I-PEX connectors are used for external LTE antenna and one I-PEX connector is used for an external GPS antenna.

Antennas

  • QTY 2 I-PEX connector for external LTE antenna
  • QTY 1 I-PEX connector for external GPS antenna

Gateworks sells the GW16065 cellular antenna and the GW10036 pigtail.

Note often PTCRB certification requires the use of the same exact antenna that was certified with and the GW16065 may or may not qualify. Taoglas is a top recommended antenna manufacturer.

Software Configuration

The Gateworks board is incapable of displaying when used in a headless configuration. The Amit modem requires some configuration using it's webUI, in order to do this from the board port forwarding is required.

Software

Modem Manager

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).

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.

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.

Download the init_mdg200.sh script here

  • Note, the script needs execute permissions to run on the Gateworks platform.
  • Note, if the script has issues running, some users need to run a dos2unix command to ensure proper file encoding.

Here are the commands run in order (assuming attached script is on the board at /root/init_mdg200.sh):

apt-get install -y curl
modprobe option
echo 0x5c6 0x90b3 > /sys/bus/usb-serial/drivers/option1/new_id
ifconfig usb0 up
dhclient usb0
/root/init_mdg200.sh

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.

mmcli -L (to get the modem number)
mmcli -m <insert modem number> --simple-connect="apn=hologram"
ifconfig usb0 up
dhclient usb0
ping 8.8.8.8

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. Every boot from there on after:

modprobe option
echo 0x5c6 0x90b3 > /sys/bus/usb-serial/drivers/option1/new_id
ifconfig usb0 up
dhclient usb0

This document explains how to use the AMIT modem with AT commands if you prefer to avoid the WebUI.

SSH

It is possible to SSH into the MDG200

Default SSH username/password: (If it has not been changed in the webgui)

admin/wirelessm2m

Command list is provide here

Amit webUI

This method allows modem configuration through a WebGUI.

This can be achieved through a SSH tunnel to the Gateworks SBC.

First, on the Gateworks SBC, bring the interface up:

ifconfig usb0 up
dhclient usb0

Then run the following command on a laptop/desktop that is on the same network as the Gateworks SBC (that has SSH enabled)

ssh -L 8888:172.16.0.1:80 root@192.168.1.101
#where 192.168.1.101 is the IP of the Gateworks SBC

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)

A more involved method that involves nftables: CollapsibleStart(NFTables) Install nftables:

apt-get update
apt install nftables -y

Enable port forwarding:

systemctl enable nftables.service
systemctl start nftables.service
sysctl net.ipv4.ip_forward
sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf

Verify port forwarding is now enabled:

sysctl -p

Configure nftables to pass traffic from modem webUI to Gateworks SBC port so it can be interfaced with on a desktop:

nft flush ruleset
nft add table nat
nft 'add chain nat postrouting { type nat hook postrouting priority 100 ; }'
nft 'add chain nat prerouting { type nat hook prerouting priority -100; }'
nft 'add rule nat prerouting iif eth0 tcp dport { 0-9000 } dnat 172.16.0.1'
nft add rule nat postrouting masquerade

Bring the modem interface up:

ifconfig usb0 up
dhclient usb0

CollapsibleEnd

Configure the modem using the WebUI

Acquire the ip address of eth0 (not the modem). Using a workstation on the same subnet, open a browser then enter the ip address of eth0 on the Gateworks SBC. Login using username "admin", password "admin".

To enable AT/NEMA select administrator>manager, "at/nema", tick the enable box then save.

adnema

Set mode to NAT, setup>network>device-mode use the drop-down then select NAT then save.

http://trac.gateworks.com/attachment/wiki/wireless/modem/AMITMDG100/amitbaseboard.png

Configure cellular options (setup>network>cellular):

  • sim select - internal
  • apn - manual
  • manual apn - "hologram" (or your apn)
  • authentication - auto
  • ip type - ipv4
  • ip modem - dynamic ip

cellular

Save.

Verify ethernet settings:

ethernet

Save and logout.

Get a connection

Back on the Gateworks SBC...

Configure the driver:

modprobe option
echo 0x5c6 0x90b3 > /sys/bus/usb-serial/drivers/option1/new_id

Use modem manager to establish a connection:

mmcli -m 0 --enable

This should return "successfully enabled the modem"

mmcli -m 0 --simple-connect="apn=hologram"

This should return "successfully connected the modem"

If these steps are not working check that your SIM card is activated and your antennas are connected. A scan can be used to verify that your desired network is aviable

mmcli --modem 0 --3gpp-scan --timeout=300

For example this will return:

---------------------
3GPP scan | networks: 310410 - AT&T (umts, available)
          |           311490 - 311 490 (lte, forbidden)
          |           310260 - T-Mobile (lte, available)
          |           313100 - FirstNet (lte, forbidden)
          |           310410 - AT&T (lte, current)
          |           311480 - Verizon (lte, available)
          |           310260 - T-Mobile (umts, available)

Configure the nameserver to use 8.8.8.8

echo "nameserver 8.8.8.8" > /etc/resolv.conf

Make your default gateway the modem:

route add default gw 172.16.0.1 dev usb0

Verify the connection is established:

root@focal-newport:~# ping -I usb0 www.google.com
PING www.google.com (216.58.201.228) from 172.16.0.6 usb0: 56(84) bytes of data.
64 bytes from par10s33-in-f4.1e100.net (216.58.201.228): icmp_seq=1 ttl=110 time=639 ms
64 bytes from par10s33-in-f4.1e100.net (216.58.201.228): icmp_seq=2 ttl=110 time=641 ms
Last modified 10 months ago Last modified on 06/16/2023 06:59:34 PM

Attachments (11)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.