TP-LINK WiFi nano router with mobile hotspot
David R. Lane (77) 766 posts |
I have a Pi-Top with R-Pi3 and TP-LINK router, model TL-WR702N v1.2, inside, so that when on the move I can access the internet via my Netgear mobile hotspot. I can ping external websites from the Pi-Top’s CLI or a task window successfully, but cannot get an external web page using its IP address in a browser. I see from earlier posts that some folk have succeeded, for example, Jon Abbott, Steffen Huber and Dave Higton. The TP-LINK seems to have the ‘right’ build (130314) according to the web site referred to by Dave Higton, and I have followed the instructions for installation given there including using Client mode. I have changed a lot of the IP addresses and one DHCP range for consistency with my home LAN, for example I use a subnet mask of 255.255.0.0. My ASUS pad running Android which has WiFi built in, but not access to the cellular network, accesses the internet well via the mobile hotspot both before and after the changes. It’s presumably getting an IP address from the DHCP server on the mobile hotspot, whereas I have a static address for the Pi-Top. I would really like to get this working so that I can use RISC OS on the move, and this is important for our OS. |
Jon Abbott (1421) 2651 posts |
A common problem with DHCP on RISCOS, is that it fails to set the DNS server and/or gateway. I suspect this is the issue in your case, type show Inet$* and see if the correct values are in Inet$Resolvers, Inet$IPaddr and Inet$Gateway As far as I can tell, DHCPExecute doesn’t handle the DHCP offer it gets from certain devices correctly. |
Chris Evans (457) 1614 posts |
Setting a gateway address upsets DHCP! |
Steve Pampling (1551) 8170 posts |
A couple of things:
|
Dave Higton (1515) 3526 posts |
I’d like to help, but your settings and mine are very different. I use fixed IP addressing based on the host name and the hosts file. I have an Obey file that I run when I’m setting the machine up with the nanorouter and hotspot – it changes the few things that are different, and doesn’t require the machine to be rebooted with different settings. I don’t use DHCP. Looking back at the file, I see that most of the differences between home and hotspot use have disappeared (as a result of changes I made to the home LAN); the remaining one is that the gateway is 192.168.16.1 at home, and 192.168.16.254 with the nanorouter and hotspot. My netmask is 255.255.255.0 in both cases. I believe that the gateway address is determined by the mobile phone. For me it’s just lucky that the IP address range is the same in both cases. The most surprising thing to me about your setup is that you use a netmask of 255.255.0.0 – it isn’t necessarily wrong, but it is highly unusual, so it needs to be questioned. |
David R. Lane (77) 766 posts |
@Jon The problem remains getting the pi-top to work with the mobile hotspot. Now that the mobile hotspot and wired router have the same IP address, if I give a computer a static address outside the DHCP range of either, then I should be able to keep the settings in the Network section of Configure and only need to change settings on the TP-LINK nano gadget when changing from wired router to the mobile hotspot or vice versa? I am assuming that the DHCP address ranges do not need to be the same on each router’hotspot or TP-LINK nano gadget, especially as DHCP is not being used. |
Steve Pampling (1551) 8170 posts |
As long as you don’t have two DHCP servers(sources) on the network at once. That said a few years ago the MS recommendation for dual/resilient DHCP installs was a 70/30 scope split with the same gateway details etc but one server only handed out the bottom 30% of IP’s and the other did the upper 70%. In your case with manually assigned and DHCP you’d just assign say 50% of the IP’s for the DHCP pool and then manually assign1 the others to problem devices NB. With two servers for the same subnet the first to offer (DORA) gives the device an IP. 1 I prefer the label manually assigned as a description as a static address could be from a reservation in DHCP or manually assigned. |
Dave Higton (1515) 3526 posts |
I really can’t understand how that can happen unless there is a firewall rule somewhere that prevents HTTP access in some way. Any ideas from anyone else? I don’t see how it can be caused by a DHCP problem. AFAIUI ping requires the gateway to be configured and working, just as much as does HTTP or anything else.
I don’t understand what you’re trying to do. If you are on a wired LAN, you ought not to have the nano router active at all; if you do, you will have an IP address clash for the gateway unless you change the nano router’s settings in some way so as to disable it. The gateway address (again AIUI) is in the mobile hotspot, not in the router; you may not be able to change it. |
David R. Lane (77) 766 posts |
@Dave H. I have a static address for the Pi-top, so not DHCP setting, in the RISC OS Configure Network settings. The TP-LINK gadget is set to Client mode with DHCP disabled. The IP addresses of the TP-LINK gadget and Pi-top are different, different from that of any router or the mobile hotspot and not in the range of any DHCP pool on routers or mobile hotspot. All, except one, have the same netmask, 255.255.255.0, and all IP addresses are of form 192.168.0.X. The one exception is the ‘smart’ phone that has IP addresses of form 192.168.43.X. The smart phone has “network prefix length” 24 which, I assume, means netmask 255.255.255.0 as 2 to power 24 is 256 cubed. Both the mobile hotspot (communicates with internet over the cellular network) and the smartphone acknowledge the presence of the Pi-top, or at least the TP-LINK gadget, showing that 1 computer is connected with the smartphone giving the MAC address of the TP-LINK gadget. Pinging an external website has sometimes succeeded and other times resulted in one, almost complete, line of packet return information (i.e. success) followed by a total crash: “Internal error, no tact for strap handlers …….abort on fear of death …” :-(( My feeling is that the mobile hotspot and smartphone are only in DHCP mode and so unable to deal properly with the TP-LINK gadget on static address. If so, I need to alter the settings on mobile hotspot and smartphone to deal with static addresses. My problem is that I am not very good at experimenting with devices due to the fear of screwing everything up. I know I can do factory reset and lose all my settings. :-(( |
Steve Pampling (1551) 8170 posts |
Yup. /24 masks the first 24 bits of the 32 bit (IPv4) IP address.
Ping to the known IP (91.203.57.172) or www.riscosopen.org? As Dave pointed out the ability to ping anything out there shows the IP and gateway setup is correct. If you can ping local but nothing beyond your gateway then the subnet mask is the issue but in this instance that seems OK so you’re on to the name resolve element which starts with a query to a listed DNS instance. Note that some ISP’s restrict access to their DNS servers to their subscribers so if you have that problem and want to switch between provided routes and always use the same DNS then use 8.8.8.8 or 8.8.4.4 as one entry in your DNS list. |
Dave Higton (1515) 3526 posts |
What are your “Name server” settings (primary, secondary and tertiary) when you use the wired lan, and when you use the nano router? |
Chris Evans (457) 1614 posts |
I’ve sometimes seen Ping working but browsing using ip address not, if the netmasks is inconsistent.. |
Steve Pampling (1551) 8170 posts |
That would only be possible if the mask of the device was defining a smaller subnet that formed part of the larger subnet defined by the gateway router. In general when people come to me with a “it won’t talk to things in another VLAN” type of query then the first suggestion is that the subnet mask needs looking at along with the gateway. Just occasionally though the supplied devices don’t work the way they should and manual intervention is required. It’s the exception not the norm. |
David R. Lane (77) 766 posts |
I have finally got both the TP-Link Nano gadget (acting as a WiFi adaptor, i.e. client mode) and the Netgear WNCE2001 adaptor working with my mobile hotspot (Netgear Aircard-F878). (See my post of 11/12/16 above.) |