geeekpi / cm4routerboard

Raspberry Pi Computer Module 4 internet extand board firmware and config files
MIT License
14 stars 1 forks source link

WAN port (on RTL8111E PCIe NIC) is non-functional using OpenWRT image #2

Open geerlingguy opened 2 years ago

geerlingguy commented 2 years ago

I flashed the image openwrt-bcm27xx-bcm2711-rpi-4-ext4-with_oled096_factory.img.gz with Etcher, and booted the Pi. In OpenWRT, I can't see the PORT1 interface (the WAN port, connected via the RTL8111E NIC on the Pi's PCIe bus).

LuCI is only showing me the PORT0 interface (the one connected directly to the NIC onboard the CM4):

Screen Shot 2022-01-13 at 12 59 46 PM

Are there any instructions for getting the WAN port / 2nd port working with this OpenWRT image? Or is it supposed to be working and detected out of the box?

yoyojacky commented 2 years ago

hi geerlingguy, could you please send me a picuture and show me how did you connect poe hat to the CM4 Router Board ?

geerlingguy commented 2 years ago

@yoyojacky - I believe that is in reference to the PoE image: https://github.com/geeekpi/cm4routerboard/issues/1

In my case, I booted up the 52Pi CM4 Router Board using the image in this repository, and OpenWRT only showed the LAN interface (PORT0), which is from the Pi's internal NIC.

I didn't see any way in OpenWRT to add the Realtek NIC on the PCIe bus as a WAN port, and I couldn't figure out how to install drivers for it.

On Raspberry Pi OS, I can download and install the drivers from the Realtek website.

yoyojacky commented 2 years ago

@yoyojacky - I believe that is in reference to the PoE image: #1

In my case, I booted up the 52Pi CM4 Router Board using the image in this repository, and OpenWRT only showed the LAN interface (PORT0), which is from the Pi's internal NIC.

I didn't see any way in OpenWRT to add the Realtek NIC on the PCIe bus as a WAN port, and I couldn't figure out how to install drivers for it.

On Raspberry Pi OS, I can download and install the drivers from the Realtek website.

Hi, geerlingguy, That's my bad, i missed one kmod which is based on Kernel module -> Network Devices -> kmod-rtl8169 to kernel, and I am going to rebuild the factory-image and upload it again. thanks for your tips..

geerlingguy commented 2 years ago

Thanks! Hopefully it will work; I'll be happy to test that new image once you have it ready!

yoyojacky commented 2 years ago

the kmod needs to be installed via recompile the openwrt image, i am working on it, and i will configure it and zipped it as new image and upload here, thanks, and i will test it before uploading.. once done ,you will be first to know... have a nice day~

Oorweeg commented 2 years ago

I have also literally just come across this exact same issue today, thanks @geerlingguy for getting there before me and starting this thread! Guess I just sit back and wait now. :)

yoyojacky commented 2 years ago

Hi timcoop3r, I am working on it, i will add rt8168 driver to kernel and rebuild the image, it is caused by one driver is missing.

yoyojacky commented 2 years ago

@geerlingguy @timcoop3r I have upload a new image and adding the rtl8168 driver to image, but the OLED issue still bothering me....

ChangeLog:

  1. Adding RTL8168 driver to kernel of Openwrt and enabled it in kernel.
  2. Adding dtoverlay=dwc2,dr_mode=host to /boot/config.txt file in the image.
  3. Adding dtoverlay=i2c-gpio,i2c_gpio_sda=2,i2c_gpio_scl=3,i2c_delay_us=2,bus=1 to /boot/config.txt file in the image.

TODO:

yoyojacky commented 2 years ago

image the rtl8168 driver works. the PCI NIC can be detected and perfermance here: b9be9623d5eaaa15594bb97a2d6f836 image

novaspirit commented 2 years ago

confirmed it is working!

image

geerlingguy commented 2 years ago

I forgot to post here too, but I can also see the new interface and set it up as I see fit:

Screen Shot 2022-01-24 at 11 07 38 PM

Now if #3 can get a fix, I think the image will be ready for full support of the board's features.

yoyojacky commented 2 years ago

Yes, I found that the latest version of openwrt mainline did not include luci-compat package, and I will test the new image and then post here. thanks for your tips~ have a nice day~

yoyojacky commented 2 years ago

confirmed it is working!

image

thanks nova, thanks for your tips ,and have a nice day~

nicolas314 commented 2 years ago

Hey @yoyojacky, see comment on issue #3 for a quick fix on oled (i2c-1/i2c-0). Also: the current openwrt image works fine but the kernel does not match an official openwrt branch. This prevents a number of default kmod-* packages from installing. Try running luci-app-nlbwmon for example. Thanks for all your efforts!

David-McGuire commented 2 years ago

Having the same Issue .. eth1 plugged into the Modem, Im not getting an IP Address. I have set this up using DHCP and sill nothing, Any thoughts

PixlRainbow commented 2 years ago

@David-McGuire it appears only the factory (non-OLED) image was updated with the new drivers, the OLED image is still missing WAN drivers. image

David-McGuire commented 2 years ago

@David-McGuire it appears only the factory (non-OLED) image was updated with the new drivers, the OLED image is still missing WAN drivers. image

I flashed the "bcm27xx-bcm2711-rpi-4-squashfs-factory.img.gz" and still see the same thing the br-lan still is the only interface that shows.

If I go to add the eth1 in the devise list it does not show up.

Am I missing something simple?

PixlRainbow commented 2 years ago

I flashed the "bcm27xx-bcm2711-rpi-4-squashfs-factory.img.gz"

You downloaded the factory image that is even older than the OLED image. There is a second factory image which is newer. Check the name shown in the commit I screenshotted.

David-McGuire commented 2 years ago

Thanks got it up and running now..

I flashed the "bcm27xx-bcm2711-rpi-4-squashfs-factory.img.gz"

You downloaded the factory image that is even older than the OLED image. There is a second factory image which is newer. Check the name shown in the commit I screenshotted.

barqfleet commented 2 years ago

Hi

I flashed the "bcm27xx-bcm2711-rpi-4-squashfs-factory.img.gz"

You downloaded the factory image that is even older than the OLED image. There is a second factory image which is newer. Check the name shown in the commit I screenshotted.

I've downloaded the said file, and flashed. ETH1 WAN works, but OLED page is broken. When I try to install the Luci-Compat - it gives error. When I try to force-overwrite - it breaks LUCI completely