Tuesday, 12 September 2017

Ethernet to 4G Bridge using Raspberry PI and CDC Mobile Network Dongle


Here my notes on lessons learned

The old usb modem sticks present a storage device and serial device depending on the mode.
The newer devices present a CDC ethernet device with internal IP and web service. These are in my view easier to configure, since ppp wfdial configuration is not required.

Modeswitches are accomplished by device access through the device tree or usb node.

The utilities used for modeswitching


usb_modeswitch, sg_raw and eject utilities, as described on the arch linux site.

In my case I used a Huawei Modem E3737. Below the essence of my setup

OpenWRT Chaos Calmer 15.05. released: Mon, 16 Mar 2016 worked out of the box to do the modeswitch from ID 12d1:1f01 to 12d1:1442. The file /etc/usb-mode.json has the correct configuration strings to make this work.

Run
opkg update && opkg install usb-modeswitch

Before the reboot, usbmode -l displays the modem, after a reboot usbmode -l no longer displays anything, this was a bit confusing at first, when reading the howto guide on openwrt. However this makes sense since after the reboot the device ID to switch from is no longer found.

I then had to install the required packages
opkg update && opkg install kmod-usb-net-cdc-ether, udev, kmod-usb-net-rndis
 
Then a cat /sys/kernel/debug/usb/devices shows the correct driver Driver=cdc_ether. for the HUAWI USB Device.

Here the link to the site which helped me in calming the chaos in our wonderful inter-web library. How did people figure things out before the days of internet?

 
Now, if you type

ifconfig -a
you should see a new device there, in my case eth1. From there on it is simply going through the motion of configuring the correct gateways and IP ranges and plugging it all together.






Why there are so many different models on the market, anybody's guess is as good as mine :|

Below some links with useful information.

https://wiki.openwrt.org/doc/recipes/3gdongle

Serial Interface Modem Setup

https://josefsson.org/openwrt/dongle.html

http://b.minwi.com/2015/03/15/huawei-e303-3g-dongle-in-openwrt-barrierbreaker/


No comments:

Post a Comment

Chipmaster Gear Cutting

  Calculate all the possible gear combinations for the gear selector to cut a 15TPI thread: Imperial TPI C 5 24 20 Imperial TPI ...