💾 Archived View for koyu.space › vydyck › tech › networking › index.gmi captured on 2023-11-04 at 11:52:14. Gemini links have been rewritten to link to archived content
View Raw
More Information
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
Various networking experiments
Build your own linux based broadband4g/wifi/mifi router
something like this
https://tweakers.net/pricewatch/430455/tp-link-4g-mi-fi-hotspot-met-display-m7350-v1-v2-of-v3.html
Components:
- 9Single Board Computer like raspberry pi, orange pi, ... preferably with all necessary interfaces onboard (not many have this)
- wifi interface that supports Master mode, eg with hostapd (there are quite a few) and if possible supports bridging (not many can do this).
- 3g/4g/5g interface In case of usb device there are some extra challenges (configure modeswitch)
- ethernet (optional but useful for debugging, or bridging to an existing lan)
- powersource (small usb powerbank to keep it portable, or actual battery)
- very option: small screen. but you'll rather configure this thing via ssh or webinterface if you fancy.
Software
- arm based linux, probably. Intel compute stick or equivalent also possible but will use more power.
- hostapd: enables Master (access point) mode on supported wifi chipsets
- bridge-utils: combine ethernet and wlan into a single bridge (optionally)
- usb-modeswitch: most usb 345G sticks act like a usb cdrom device containing the windows drivers for it, and some tool to switch the stick into "modem mode". usb-modeswitch is the tool to force this device mode switch. Not needed if the stick is already present before powering up the board.
- wvdial: 3/4/5G sticks are basically dialup modems, and the connection is still good old PPP. There is a special AT initstring to pass the apn.
- iptables: to create masquerading/forwarding rules for the ppp connection
- dnsmasq: not strictly necessary, but makes life easier. Hand out ip/dns/gateway on the wifi and/or bridge or ethernet interface.
Optional extra Software
- privoxy: removes tracking and some malicious adds from webpages. Somewhat of an alternative to the iptables masquerading rules
- privoxy+tor: similar, and automatically route webtraffic through tor. Run on different port when you want both.
- pi-hole: since our device acts a dnsserver, this should work
- darkstat: keep track of traffick and consumption (has webinterface)
- iptraf-ng, bwm-ng, nethogs, tcpdump,... and other network monitoring/debugging tools
- fileserver, mailserver, webserver, printserver, other nonsense
Proof Of Concept 1 : orangepizero
- orangepizero sbc is pretty small, and with the standard case and extra usb ports can have both the modem and a better wifi stick on usb. If has builtin wifi that even supports mastermode, but it freezes often and is generally known as unreliable
- onboard wifi: works, but not well
- usbwifi: some asus stick, seems to support mastermode, but not bridge. Disconnects frequently. Using a big ass Alfa usb adapter is much more reliable.
- qualcomm 3.5g (7.5 mbits?) typical usb cellullar modem stick. Requires modeswitch, and emulates an analog usbmodem so you send some mostly ignored AT commands (one of those can be used to specify the apn though). Seems to fall back to some speed much lower than the 7mbit (more like 2mbit) which is more like "smallband" speed. Runs VERY hot when working.
- running armbian, has all the requirements via apt-get
- wvdial.conf:
- modeswitch config:
- /etc/network/interfaces.d/ppp0:
- /etc/network/interfaces.d/br0 if bridge:
- /etc/network/interfaces.d/wlan0:
- /etc/wvdial.conf:
for mobile vikings:
telnr *99# apn web.be (via AT init strings) user/pass web
- /etc/hostapd.conf
- iptables rule:
Poc2 : raspberry pi 4
- good wifi chipset (but still no promisc/bridge )
- still need usb cellullar modem
- waay overpowered for this, and only solves the wifi problem.
Need a proper 4g dongle
- Huawei 3372 varieties seem popular
- Huawei 3372s
- Huawei 3372H
There are some complaints about this variety. No direct access to the cellullar modem.
=> https://unix.stackexchange.com/questions/213663/huawei-e3372s-linux-rasbian-incoming-connections-problem
" De E3372h-153 werkt onder linux. De E3372s is een ander product met andere software. E3372 wordt vaak zonder aanduiding h of s aangeboden, dus pas op. Nog geen uitgebreide ervaring met snelheid en dekking. Openwrt heeft nodig kernel module usb-net-cdcether en de usb-modeswitch software. OpenSUSE herkent hem direct."
Huawei E3372s (unlike most of the older sticks which use dialing like wvdial) uses CDC_ETH driver system which creates an ethernet-like device to the system (ETH1 in this case) and should work in this case flawlessly.
cheap, uses usb_gadget instead of usbmodem, usbeter. It runs linux internally, and also uses/exposes ADB with "some work". Costs around 30$. Available as "solder" type, miniPCIe and usb (with miniPCIe adapter)
DON'T build you own mifi router: use a "wingle"
A "Wingle" is like a mifi router, but requires power via usb and has no configuration screen. These are standalone wifi access points and have a builtin 4g modem (and this sim slot) to connect to the internet. They to be powered via usb since they do not have their own battery and also do not have configuration screen. So you plug them into a usbcharger or powerbank, and basically they become pretty much the same thing as a mifi router. When plugged into a usb dataport there is a way to access their "user interface" over usb and configure them, but that seems to require windows. Some of these can also act as a plain 3/4g dongle when plugged into a pc usb port.
Huawei 8372: wifi + 4g, "150mbit" on wifi. Expensive (~ 70 eur, price of a mifi router with battery) but mostly positive reviews.