Newbie trying to make raspberry pi 400 into a router

Guys I found the problem on the pi and now I have internet on it! After that,it was easy to make the dumb AP and now the 1043ND able to give this way my Gigabit speed, stock firmware were capable to do this but with OpenWrt only about third of that Gigabit worked. But now I have Gigabit speed,this is without SQM though, will experiment with it on an another day :smiley: Maybe I won't need it, we rarely have buffering problems even if I play online.

At the interfaces on the WANs settings at the DHCP server tab I had to uncheck "Ignore interface" to get internet on the Pi. Now I just try to add that damn certificate to avoid the warnings in the browser when accessing luci via https grrrr
ignore interface

2 Likes

if you are able to can you please run this command if you get a chance;

dmesg | grep -C2 brcmfmac

Paste inside "Preformatted text </>"
grafik
Or screenshot would do... Thank you! :slight_smile:

( pr for your wifi function )

I'll check tomorrow. What is this for?

1 Like

dmesg is the tool to show your kernel log, brcmfmac the driver for your RPi's onboard wireless hardware. grep will search your kernel log for the brcmfmac related initialization messages, with two lines context (-C2) above/ below the brcmfmac messages.

E.g.:

$ dmesg | grep AR9285     
[    3.920409] ieee80211 phy0: Atheros AR9285 Rev:2 mem=0xffffc90000ce0000, irq=16

vs.

$ dmesg | grep -C2 AR9285
[    3.918547] ath: Regpair used: 0x37
[    3.920033] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    3.920409] ieee80211 phy0: Atheros AR9285 Rev:2 mem=0xffffc90000ce0000, irq=16
[    3.920614] br-lan: port 7(tap-br-lan1) entered blocking state
[    3.920619] br-lan: port 7(tap-br-lan1) entered forwarding state
1 Like

This should not be necessary, and may actually be problematic. This is the checkbox for the DHCP Server -- meaning that that your device is now serving DHCP to the WAN, which it should not do. I think your situation was just a coincidence. This should always be disabled on the upstream network.

You're excited about learning OpenWrt, and that is awesome. Fundamentally, I think you simply need to slow down a bit so you can really absorb all the stuff you're learning and doing. There are two factors -- there are lots of networking concepts in general that you're learning about, and there are also OpenWrt (and even 21.02) specific implementations, much like the differences between programming (or even spoken) languages. You're learning both at once which can be a bit overwhelming at times, and then you are both excited and possibly feeling a bit pressured to get it running quickly. If it is an option, get an old/used/cheap router that supports 21.02 to use purely as a dev/learning system. This can make a huge difference since you can break your config a million ways, reset/restart, and try again; all the while never actually bringing your connection down and keeping those living with you happy since their connection always works.

1 Like

This will print messages related to the wifi driver. I think @anon50098793 is interested if the wifi system in the 400 is the same as the 4B.

1 Like

BCM4345/9
It was tricky to type the symbols on the pi because the symbols are mixed up :smiley:

1 Like

I'm confused now. It should be checked for the dumb AP, if checked then DHCP is disabled but I want (?) DHCP for the main router so it should be unchecked for the pi. Or this is not the correct way?

As for the frustration part. I prepped, seemed simple but didn't calculate with the hiccups, I thought that it will be inputing few commands and done :smiley: I installed OpenWrt to the 1043ND back in may or so but basically left on the default settings for most things so yeah, I didn't play with it enough. But now I'm glad that I had many problems because now I totally remember to many commands without searching for them so it was a good lesson :smiley: But still I don't know much about network stuffs and that's not the pi or OpenWrt's fault, I should educate myself...

On a main router, you'd never run a DHCP server on the WAN network. That network gets its IP from the ISP, usually as a DHCP client.

1 Like

That's weird then and shouldn't keep the thing offline but I'll check again what happens if I disable it. If that will cause internet loss then what should I check next? Keep digging the interface settings? Maybe the UE300 is not the WAN even though that's the eth1?

By the way the AP guide says to use the main router for DHCP

  1. Use the main router for DHCP

You are using your Pi400 as a router, not a dumb AP. Therefore, you shouldn't be following any guides for dumb APs with respect to the configuration of that device.

More than likely, the on-board ethernet is eth0 and the UE300 should be eth1.

One of those two ethernet ports should be associated with the LAN -- in truth, it doesn't matter which one, but eth0 will be LAN by default. The LAN should have a static IP address (in one of the RFC1918 address ranges) and the DHCP server should (in most cases) be enabled for the devices on your LAN.

The WAN should be on the other port. Per your drawing, the UE300 connected to your ISP modem, so that should be eth1. This should (probably) be configured as a DHCP client, and the "Ignore interface" checkbox in the DHCP server should be checked. There are a few things that may change the way things are configured here -- if you are using a DSL connection, usually those need to use PPPoE instead of DHCP client. Sometimes that is true for fiber, although it depends on the provider. Most cable modem services will have you use DHCP client on your router. If your modem is a modem+router, this would introduce some other factors. Ideally, you want your modem to be in a bridge mode such that your ISP provided IP is presented to the WAN of your OpenWrt router (Pi400 in your case). If it is performing NAT, you need to make sure you don't have a network overlap with the Pi400 LAN and the LAN created by your modem+router.

Yes, the guide is for the AP I set up for the 1043ND but DHCP is enabled if it's unchecked, the guide asked to check it for AP to disable DHCP. It clearly says "Disable DHCP for this interface" so if I check that box it is going to disable not enable DHCP. Or I just misunderstand the guide :smiley:

Use the main router for DHCP. Same page again, now the DHCP Server tab. Should be at the General Setup sub-tab. Ensure the Ignore interface checkbox is checked.

But now I know the problem, why it caused problem. ONT is not only modem, I have to ask my ISP to put it in bridge mode (unfortunately I can't do it locally, they have to do it remotely) and have to change the WAN to PPPoE to log in since it's FTTH PPPoE setup. Just realized this as you mentioned bridge mode. After this all my routing will be on the Pi :slight_smile: In theory this should solve things. That unsafe website warning is actually not bothering me that much so I gave up that certification thing :smiley: That wouldn't solve in iPadOS Safari anyway which I sometimes use to access LuCi

Sorry if I caused any confusion -- it hasn't been entirely clear which device you have been talking about.

If you are running an separate dumb AP (i.e. a different device from the router), DHCP should always be disabled on that. This means that you should follow the dumb AP documentation for that device, and "Ignore this interface" should be checked on that, too. On a dumb AP, you will connect LAN - LAN between the dumb AP and the router. This mean that the WAN port goes unused on the AP (although you can often make that port functionally another LAN port, if needed).

Regarding the "unsafe website" warning -- that is because the certificates that are part of the OpenWrt web server (https) are 'self signed.' On most platforms, you can tell the browser that it is okay and continue to the site. Many, but not all, browsers will remember that exception and you won't see it again unless you make certain types of changes to your OpenWrt config (such as changing the IP address, or resetting it).

thankyou :+1: ... suspect the 400 stuff may not make it into that PR... so these commands (if you learn putty or maybe install luci-app-ttyd) may be of use to you to probably get your wifi working if you even need to (most openwrt users don't use it)...


opkg update; opkg install curl
curl -sSL https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43456-sdio.bin > /lib/firmware/brcm/brcmfmac43456-sdio.bin
curl -sSL https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43456-sdio.clm_blob > /lib/firmware/brcm/brcmfmac43456-sdio.clm_blob
curl -sSL https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm/brcmfmac43456-sdio.txt > /lib/firmware/brcm/brcmfmac43456-sdio.txt
#then reboot
1 Like

For casual use there isn't much need for putty anymore, since Microsoft has ported the Linux CLI OpenSSH to be an included part of Windows.

Open a Command Prompt (non-Administrator) and ssh root@192.168.1.1. scp is also available.

2 Likes

I wasn't sure if Microsoft or Windows could be mentioned here but I use WinSCP to edit all my files and if you are familiar with any common text screen editor like Windows Notepad, you can configure a Linux server in no time once you've got the log-in credentials established and SSH is open for business.

No problem but yes, I don’t intend to use WiFi on it.

My ISP set the bridge mode for the ONT and the PPPoE connection is working on the pi as I checked with updating the package list and the ping test came back with 0% packet loss but the LAN is not working. First I thought that the AP the problem but I directly connected a laptop to the pi’s LAN and no internet and I would really need it because I have to work :smiley: what it could be the problem?

1 Like

as suggested earlier... if you use a brand new image... and boot with the usb3 wan nic inserted everything will work out of the box

( if the image has a driver for your usb-nic... for that you may wish to use https://asu.aparcar.org/ )


but to answer your question typical cantidates are;

  • wrong lan ip settings (adapter name in interface(now device) section etc.)
  • dhcp server disabled(conflict/invalid-settings etc.) on lan
  • firewall was edited to exclude lan

as you cannot get into LAN the only option (other than keyboard) instead of new image to attempt to fix is for point 2 (dhcp server problem) and that's to give your pc a static ip (192.168.1.12) and try to get in that way...


you are also welcome to use this image
https://rpi4.wulfy23.info/builds/devel/rpi-4_snapshot_3.5.99-3_r17795_extra/rpi4.64-snapshot-26907-3.5.99-3-r17795-ext4-fac.img.gz

which has drivers and will get you by until you have a day off to install an official build again...

Device can’t be anything other than br-lan, ignore interface is unchecked, br-lan also added at the firewall tab. Any option in luci to troubleshoot? Or maybe it didn’t like that I added the PPPoE interface first and then deleted the old wan dhcp one? Maybe everything is correctly setup and this caused the problem and a reset should solve it? But before I need to make sure that the settings are correct, what log should help you guys?

so lan IS working? just not 'internet-from-lan'?