After a little work I think I have installed both wifi dongle and huawei LTE dongle.
It's currently connected to my network with a static IP on the built in ethernet. It's a Raspberry Pi 2 B+. I'm planning to get a Pi 4, but it's currently not in stock anywhere (where I live) - so this will have to to until i get the Pi 4
What do I need to do now? Right now its connected to my home network and I gave it a static ip outside of the DHCP range. But I would like to take with me the raspberry pi and share the LTE's internet connection to anyone connected to wlan0.
How do I set that up?
I am able to connect to it with the wifi dongle, but is it correct that the LTE also should be DHCP client? How does it know that clients of WIFI should get internet thru LTE?
There could be a bunch of things going on, and screenshots can only tell us a little bit. But at first glance, it looks like your wifi and LTE interfaces are not associated with any firewall zones. If you want your LTE to be the internet connection, it should be assigned to the wan firewall zone. And the wifi interface would likely need to be associated with the lan zone.
Okey, I have added LTE to wan firewall and WIFI to lan zone.
But what about the LAN interface, what is it doing? I was default when I installed OpenWRT and the only thing I did was give it a static IP.
Will creating a eth0 and put it to WAN zone make a source for internet? Is it that smart that it will probe LTE and eth0 to see what gives internet? Right now I have disabled connection on the LTE device itself, it does not connect (and use up my plan )
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
First, the additional wifi network (wlan0) is a DHCP client. If that is supposed to be acting as a wifi AP, it will need to be associated with your lan (i.e. included in the bridge with your br-lan). Keep in mind that not all USB wifi adapters will work in AP mode, and you will also need to make sure that you have installed the packages with the appropriate drivers for that device.
Next, your LAN is set to function as an extension of your existing network, and therefore it isn't setup correctly to be a router on its own. You can change the IP address to something else, if you like, but remove the gateway definition.
Does your LTE device show up as eth1? It seems you have an IP address from that, which is good. It is already NAT'd (this isn't necessarily a problem, but a thing to be aware of -- if the LTE device can be put into bridge mode, that may be better).
Are you able to ping anything when you ssh into the router? A set of addresses to test would be:
the LTE modem itself (likely 192.168.8.1 -- but that is just a guess).
I don't quite understand the way you explain the setup. Here is a couple of facts:
I want clients to be able to connect to this device by connecting to the wireless network "My 4G" and get IP
Clients connected to "My 4G" should get internet thru a) the LTE usb modem on eth1 og b) the build int ethernet eth0.
While at home I will connect this device to my network on eth0 and eth0 will get IP from my home network.
I was thinking about link aggregation between LTE and eth0, but I could make do by simply use the web interface and bring the interfaces up or down depending on the situation.
The goal here is to have a small device that I can bring with me on family trips and we will be able to log on its wifi and connect to the internet with the LTE usb modem.
What do I need to to with wlan0 in order for it to give out IPs? How do I configure the br-lan?
can't really aggregate, traffic will go through any of the interfaces, but not both, at the same time, from the client.
wlan0 shouldn't really be needed, since there would already be a radio in the wireless section,
unless you want to be able to connect as a wireless client, too ?
Its not what I anticipated. I'm abit unsure on how the LTE E3372 Huawei modem works. Does that act as a DHCP?
The thing that I'm unsure of is the br-lan, I dont think I want it. Because now every wireless AND clients connecting thru eth0 will get a IP. I only want that for wifi clients. For eth0 I want a static IP so I can access it when I plug it into my home network.
If not by itself, then by ISP, there will always be a dynamic IP coming from it.
you might make things slightly better by removing the HiLink functionality, of your
LTE, if it's one of those actually using it.
Remove the wireless interface from the lan bridge:
uci delete wireless.default_radio0.network
uci set wireless.default_radio0.network='Wifi'
Modify the WiFi interface:
uci delete network.Wifi.device
uci set network.Wifi.proto='static'
uci set network.Wifi.ipaddr='192.168.254.1'
uci set network.Wifi.netmask='255.255.255.0'
Remove the default gateway and DNS servers on the lan interface. You should use those, provided via DHCP on the LTE interface.
uci set dhcp.Wifi=dhcp
uci set dhcp.Wifi.interface='Wifi'
uci set dhcp.Wifi.start='100'
uci set dhcp.Wifi.limit='150'
uci set dhcp.Wifi.leasetime='12h'
uci set dhcp.Wifi.ra_flags='none'