Changes between Initial Version and Version 1 of wireless/modem/AMITMDG


Ignore:
Timestamp:
06/24/2021 01:28:20 AM (3 years ago)
Author:
Cale Collins
Comment:

first draft, no pics

Legend:

Unmodified
Added
Removed
Modified
  • wireless/modem/AMITMDG

    v1 v1  
     1= Amit MDG100
     2
     3MDG100-0TU01 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. It also has a hinge-up nano- SIM slot to offer a wide range usage for board without or with a SIM socket. The device offers OS-ready NIC interface (Windows / Linux / FreeBSD) and offer a friendly web-based GUI for parameter setting and status checking.  Best of all it's PTCRB certified! 
     4
     5[[[ mdg.100 png]]]
     6
     7= Materials
     8
     9To follow this wiki you will need the following materials:
     10* AMIT MDG100 Modem [http://www.amitwireless.com/productDetail.php?cate=964 AMIT MDG100 Page]
     11* A SIM card (a Hologram SIM is used in the examples) [https://www.hologram.io/ Hologram Page]
     12* At least 1 antenna (In the example Pulse W3907XXXX was used) [https://productfinder.pulseeng.com/product/W3907B0100 Pulse Page]
     13* A Gateworks single board computer (SBC)
     14
     15= Hardware setup
     16
     17Install the SIM on the backside of the modem, the bracket slides then opens like a book.  Pads on the SIM face contacts on the carrier, close then slide to lock in place.  Attach your antennas, the modem PCB is labeled next to the U.FL connectors, look for the box labeled "CON1" (a jewelers loop may be required to read). 
     18
     19Connect the board to your Gateworks SBC, preferably in a modem designated slot.
     20
     21Configure your SBC with the latest Ubuntu image (in the example Newport-Focal was used). 
     22
     23= Software configuration
     24
     25The 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. 
     26
     27== Gain Access to the Amit webUI
     28
     29Install nftables:
     30{{{#!bash
     31apt-get update
     32apt install nftables -y
     33}}}
     34Enable port forwarding:
     35{{{#!bash
     36systemctl enable nftables.service
     37systemctl start nftables.service
     38sysctl net.ipv4.ip_forward
     39sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf
     40}}}
     41Verify port forwarding is now enabled:
     42{{{#!bash
     43sysctl -p
     44}}}
     45Configure nftables to pass traffic from modem webUI to Gateworks SBC port so it can be interfaced with on a desktop:
     46{{{#!bash
     47nft flush ruleset
     48nft add table nat
     49nft 'add chain nat postrouting { type nat hook postrouting priority 100 ; }'
     50nft 'add chain nat prerouting { type nat hook prerouting priority -100; }'
     51nft 'add rule nat prerouting iif eth0 tcp dport { 0-9000 } dnat 172.16.0.1'
     52nft add rule nat postrouting masquerade
     53}}}
     54Bring the modem interface up:
     55{{{#!bash
     56ifconfig usb0 up
     57dhclient usb0
     58}}}
     59
     60== Configure the modem using the WebUI
     61
     62Acquire 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".
     63
     64To enable AT/NEMA select administrator>manager, "at/nema", tick the enable box then save.
     65
     66[atnema.png]
     67
     68Set mode to NAT, setup>network>device-mode use the drop-down then select NAT then save.
     69
     70[nat.png]
     71
     72Configure cellular options (setup>network>cellular):
     73* sim select - internal
     74* apn - manual
     75* manual apn - "hologram" (or your apn)
     76* authentication - auto
     77* ip type - ipv4
     78* ip modem - dynamic ip
     79
     80
     81[cellular.png]
     82
     83Save and logout. 
     84
     85== Get a connection
     86
     87Configure the driver:
     88{{{#!bash
     89modprobe option
     90echo 0x5c6 0x90b3 > /sys/bus/usb-serial/drivers/option1/new_id
     91}}}
     92Use modem manager to establish a connection:
     93{{{#!bash
     94mmcli -m 0 --enable
     95}}}
     96This should return "successfully enabled the modem"
     97{{{#!bash
     98mmcli -m 0 --simple-connect="apn=hologram"
     99}}}
     100This should return "successfully connected the modem"
     101
     102If 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
     103{{{#!bash
     104mmcli --modem 0 --3gpp-scan --timeout=300
     105}}}
     106For example this will return:
     107{{{
     108---------------------
     1093GPP scan | networks: 310410 - AT&T (umts, available)
     110          |           311490 - 311 490 (lte, forbidden)
     111          |           310260 - T-Mobile (lte, available)
     112          |           313100 - FirstNet (lte, forbidden)
     113          |           310410 - AT&T (lte, current)
     114          |           311480 - Verizon (lte, available)
     115          |           310260 - T-Mobile (umts, available)
     116}}}
     117Configure the nameserver to use 8.8.8.8
     118{{{#!bash
     119echo "nameserver 8.8.8.8" > /etc/resolv.conf
     120}}}
     121Make your default gateway the modem:
     122{{{#!bash
     123route add default gw 172.16.0.1 dev usb0
     124}}}
     125Verify the connection is established:
     126{{{
     127root@focal-newport:~# ping -I usb0 www.google.com
     128PING www.google.com (216.58.201.228) from 172.16.0.6 usb0: 56(84) bytes of data.
     12964 bytes from par10s33-in-f4.1e100.net (216.58.201.228): icmp_seq=1 ttl=110 time=639 ms
     13064 bytes from par10s33-in-f4.1e100.net (216.58.201.228): icmp_seq=2 ttl=110 time=641 ms
     131}}}