mrswrigels wrote: Wed Jun 17, 2020 3:54 pm
Hi again BillA,
I was looking at some routers to do this with and realized that you had said if I connect my phone to the router to usb tether, I can't attach external antennas to boost the signal? So does this mean I'd just essentially just be turning on my iPhone 7 hotspot and and broadcasting signal through wifi on the router?
1. Purpose for tethering a phone to a router via USB or WiFi
The purpose for tethering a phone to a router via USB or WiFi, is to be able to use the phone's unlimited mobile data just like having an external cable/DSL/LTE modem connected to a router, with data speeds equal to the phone's mobile connection. Instead of a phone, an LTE modem in an external USB enclosure can also be tethered to the router, though it won't be able to bypass the carrier's restrictions easily (a phone will by it very nature).
While you cannot attach an external antenna to the phone, a booster is not recommended which doesn't seem to increase data speeds (works mostly for voice calls). The best way to improve the signal/speed is by placing the phone in a window area, as high up as possible like an attic, top floor, or outdoors in a housing.
2. Advantages of tethering a phone to a router via USB or WiFi
There are many advantages of tethering a phone to a router via USB or WiFi compared to just turning on the phone's WiFi Hotspot or using an internal modem in the router.
1. It can bypass the carrier's hotspot/tether data limit through the router's TTL/DNS settings.
2. It can bypass the carrier's imei restriction of a modem the legal way, especially useful for ATT's iPad/tablet/prepaid plans, and others. Note, that only a phone can bypass the imei restriction, a modem cannot.
3. The router can broadcast a stronger dual band WiFi-2G/5G signal simultaneously, while most phone hotspots cannot.
4. The router acts as a full featured router with its own DHCP server for both dynamic and static IPs, port forwarding, DMZ, and other advanced features.
5. You can use a cheap used phone which has a higher CAT#12-22 modem inside including a newer 5G phone (check the phone's specs for the CAT#). While you cannot attach an external antenna to the phone, you can usually get a better signal/speed than with a lower CAT# internal modem.
6. By extending the router's USB port instead of its ethernet port, you can mount a phone or modem remotely in or outdoors (in a plastic housing), allowing the router to be left inside the home for easy access for diagnostics and full WiFi access without the need for a second main router, along with better protection from the heat and cold. A single USB3 active extension cable can provide both power and data connection from the router to the phone or modem. If tethering via WiFi is used instead with a phone, then only a single power cable is required, data is transmitted via WiFi to the router. Here's more info about using a USB extension cable setup:
https://wirelessjoint.com/viewtopic.php?p=6586#p6586
3. Preferred method for tethering
The preferred method for tethering a phone to a router is via a USB cable, which is faster than WiFi and also charges the phone at the same time. It's actually quite simple to do it on a router which has a USB port and is flashable with OpenWRT firmware like GoldenOrb or WiFix. Here's a list of all such routers:
https://www.ofmodemsandmen.com/firmware16.html
https://www.ofmodemsandmen.com/upload/
https://drive.google.com/drive/folders/ ... bD7Y2WNETn
Use the failsafe bootloader method to flash the firmware:
https://wirelessjoint.com/viewtopic.php?p=6007#p6007
It works with most Androids which create a QMI/RNDIS interface when tethering is enabled. Haven't tested it with an iPhone, so just try it or you could tether via WiFi instead as described further down (5. Tethering a phone to a router via WiFi).
4. Tethering a phone to a router via USB
On the phone go to Settings > Cellular/Connections/Network > Mobile Networks > Access Point Names (APN)
Create a new APN profile by tapping "ADD" or the 3-dot-menu on the top right, then enter the following parameters:
Name: <enter your carrier's name>
APN: <enter your carrier's APN, make sure it's correct!>
MMSC: <you may leave it blank for tethering purposes only>
MMSC Proxy: <you may leave it blank for tethering purposes only>
Authentication Type: select "None"
APN Type: admin,default,DUN,supl
Note, there are no spaces between the words above, and "DUN" must be all capital letters.
APN Protocol: IPv4 (must be IPv4!)
APN Roaming Protocol: IPv4 (must be IPv4!)
Tap on the 3-dot-menu on the top right, then Save.
Select the new APN by tapping on the round selection button on the left of the new APN.
Restart the phone, turn off WiFi, and test the web by running the speed test below in the phone's browser.
http://www.bing.com/widget/t/speedtest
If unable to browse the web, then you must fix the APN profile before going any further.
On most Samsung phones (depending on carrier firmware), you can dial *#0808# and set it to "RNDIS+DM+Modem".
With this setting, once you activate USB Tethering on the phone, tethering will stay on even if you disconnect/reconnect the USB cable. You will only need to reactivate USB Tethering if you restart the phone.
If the above dialing command doesn't work, can do the same setting on any phone including different Android brands, by enabling Developer Options > USB Configuration > set RNDIS (USB ethernet). Search the web on "how to enable Developer Options".
Restart the phone, turn off WiFi, and connect it to the router's USB port via a USB charging/data cable.
On the phone go to Settings > Cellular/Connections/Network > Personal Hotspot/Mobile Tethering, and turn on USB Tethering. The location of the tethering menu may be slightly different on each phone model, so look around the menus to find it. If it's prompting whether to use both USB and WiFi/Bluetooth, choose USB only, and make sure to turn off WiFi on the phone.
On the router disable the internal modem, or better yet physically remove it, otherwise it could create a conflict with the tethered phone.
Go to Modem > Network Status > Prev/Next Modem > to select the tethered phone (usually "usb0/1")
Go to Modem > Connection Profile > fill in the proper APN for your carrier, then click SAVE&APPLY
Go to Network > Firewall > Custom TTL Settings > make sure that the settings checkbox is DISABLED, then click SAVE&APPLY
Go to Network > Firewall > Custom Rules > copy and paste the "iptable" lines below to the bottom of the rules window, then click RESTART FIREWALL.
Make sure to edit the TTL (65) at the end of each line with the one required for your carrier.
If it's using limited hotspot data, then you could try TTL values 64/65/66/117, click on Restart Firewall and test it again.
Code: Select all
iptables -t mangle -I POSTROUTING -o usb0 -j TTL --ttl-set 65
iptables -t mangle -I PREROUTING -i usb0 -j TTL --ttl-set 65
ip6tables -t mangle -A POSTROUTING -o usb0 -j HL --hl-set 65
ip6tables -t mangle -I PREROUTING -i usb0 -j HL --hl-set 65
iptables -t mangle -I POSTROUTING -o usb1 -j TTL --ttl-set 65
iptables -t mangle -I PREROUTING -i usb1 -j TTL --ttl-set 65
ip6tables -t mangle -A POSTROUTING -o usb1 -j HL --hl-set 65
ip6tables -t mangle -I PREROUTING -i usb1 -j HL --hl-set 65
Click Save&Apply.
To disable IPv6 and set a custom DNS in the router, go to:
Network > Interfaces > LAN > Edit > Common Configuration > General Setup tab > IPv6 Assignment Length > select "Disabled"
Network > Interfaces > LAN > Edit > Common Configuration > Advanced Settings tab > Use Builtin IPv6 Management > uncheck the box
Network > Interfaces > LAN > Edit > DHCP Server > IPv6 Settings tab > select "Disabled" on the first three items
Network > Interfaces > LAN > General Setup > Use Custom DNS Servers > set the DNS to 8.8.8.8/9.9.9.9
Click Save&Apply.
Finally, restart the router, wait 5 minutes to boot up fully, enable USB Tethering on the phone, then test the web.
Keep in mind, you have to manually turn on USB Tethering on the phone every time you re-power or connect it to the router, but nothing else needs to be done on the router after the initial setup. In order to turn on USB Tethering automatically whenever the phone is turned on, you can use an app like Automate, AutoInput, or Tasker from the PlayStore.
You can use a cheap used phone which has a CAT#12 or higher modem including a 5G phone (check the phone's specs for the CAT#). While you cannot add an external antenna to a phone, even without it you can usually get a better signal/speed than with a lower CAT# internal modem.
If everything has been done correctly, you should be able to use your phone's unlimited mobile data through the router along with all of its advanced features.
5. Tethering a phone to a router via WiFi
If the router is missing the proper USB phone drivers, you can tether the phone to the router via WiFi using the router's WiFi Hotspot feature (works on OpenWRT firmware like GoldenOrb or WiFix).
On the phone go to Settings > Cellular/Connections/Network > Mobile Networks > Access Point Names (APN)
Create a new APN profile by tapping "ADD" or the 3-dot-menu on the top right, then enter the following parameters:
Name: <enter your carrier's name>
APN: <enter your carrier's APN, make sure it's correct!>
MMSC: <you may leave it blank for tethering purposes only>
MMSC Proxy: <you may leave it blank for tethering purposes only>
Authentication Type: select "None"
APN Type: admin,default,DUN,supl
Note, there are no spaces between the words above, and "DUN" must be all capital letters.
APN Protocol: IPv4 (must be IPv4!)
APN Roaming Protocol: IPv4 (must be IPv4!)
Tap on the 3-dot-menu on the top right, then Save.
Select the new APN by tapping on the round selection button on the left of the new APN.
Restart the phone, turn off WiFi, and test the web by running the speed test below in the phone's browser.
http://www.bing.com/widget/t/speedtest
If unable to browse the web, then you must fix the APN profile before going any further.
Set up the phone's WiFi Hotspot by changing its default name and password, set the tether timeout to "Off" or "Always on", then turn on the hotspot and plug in a charger. If you're out of mobile hotspot data on your phone, you should still be able to turn it on in most cases, however sometimes the hotspot may be blocked by the carrier to even turn on, so try a different phone.
On the router disable the internal modem, or better yet physically remove it.
Go to Services > WiFi Hotspot Manager > click on Enable Hotspot Connection
Select the "WiFi Radio Frequency" (2G/5G) to match the WiFi Hotspot frequency on the phone.
Set "Connection Mode" to Automatic
Click on "In Range Refresh"
In the "Available Network List" at the bottom of the page click on "Add To List" and select the phone's WiFi Hotpot name.
In the "WiFi Hotspot Networks" window click on the phone's WiFi Hotspot name you have just added, enter the password, then Save&Apply. It should connect automatically from now on as soon as you turn on the phone's WiFi Hotspot.
Go to Network > Firewall > Custom Rules > copy and paste the "iptable" lines below to the bottom of the rules window, then click RESTART FIREWALL.
Make sure to edit the TTL (65) at the end of each line with the one required for your carrier.
If it's using limited hotspot data, then you could try TTL values 64/65/66/117, click on Restart Firewall and test it again.
Code: Select all
iptables -t mangle -I POSTROUTING -o wlan0 -j TTL --ttl-set 65
iptables -t mangle -I PREROUTING -i wlan0 -j TTL --ttl-set 65
ip6tables -t mangle -A POSTROUTING -o wlan0 -j HL --hl-set 65
ip6tables -t mangle -I PREROUTING -i wlan0 -j HL --hl-set 65
iptables -t mangle -I POSTROUTING -o wlan1 -j TTL --ttl-set 65
iptables -t mangle -I PREROUTING -i wlan1 -j TTL --ttl-set 65
ip6tables -t mangle -A POSTROUTING -o wlan1 -j HL --hl-set 65
ip6tables -t mangle -I PREROUTING -i wlan1 -j HL --hl-set 65
Click Save&Apply.
To disable IPv6 and set a custom DNS in the router, go to:
Network > Interfaces > LAN > Edit > Common Configuration > General Setup tab > IPv6 Assignment Length > select "Disabled"
Network > Interfaces > LAN > Edit > Common Configuration > Advanced Settings tab > Use Builtin IPv6 Management > uncheck the box
Network > Interfaces > LAN > Edit > DHCP Server > IPv6 Settings tab > select "Disabled" on the first three items
Network > Interfaces > LAN > General Setup > Use Custom DNS Servers > set the DNS to 8.8.8.8/9.9.9.9
Click Save&Apply.
Finally, reboot the router, wait 5 minutes to boot up fully, enable USB Tethering again, wait a minute, then test the web.
Keep in mind, you have to manually turn on the phone's WiFi Hotspot every time you re-power or connect it to the router, but nothing else needs to be done on the router after the initial setup. In order to turn on the phone's WiFi Hotspot automatically whenever the phone is re-powered, you can use an app like Automate, AutoInput, or Tasker from the PlayStore.
You can use a cheap used phone which has a CAT#12 or higher modem including a 5G phone (check the phone's specs for the CAT#). While you cannot add an external antenna to a phone, even without it you can usually get a better signal/speed than with a lower CAT# internal modem.
If everything has been done correctly, you should be able to use your phone's unlimited mobile data through the router along with all of its advanced features.