How to make buildin wifi work on NanoPi NEO4 ?

  • Since there is no image for the NEO4 I installed the NanoPi M4.
    On my first tests everything except of wifi is working fine.

    Looking at dmesg I found that brcm_fw crashes :(

    To verify that wifi on my NEO4 is working, I installed DietPi 8.11.2 instead of LibreElec.

    Of course the brcmf_* files are different. But with DietPi Wifi works as expected.

    How to make wifi work with LibereElec?

  • Create /storage/.config/firmware/brcm and put the firmware files from the DietPi image in the folder and reboot; they will be overlaid onto the /usr/lib/firmware/brcm location and used instead of the embedded files. If that fixes things, great. If not, I would try repeating things with an LE11 nightly image which has newer kernel and drivers (Linux 6.0) to see if that changes anything.

  • 1.

    As suggested I integrated the dietpi firmware. But nothing changed.

    2.
    I installed LE11. And wow. Wifi is working as expected.
    But I loose Bluetooth (no device found) :(

    And I'm not able to to find a PVR-Client.
    Found this thread and followed the link. But still no PVR Client. :(

  • Run "dmesg | paste" and share the URL so we can see the full boot log. Also, ensure you are using the rk3399-nanopi-neo4.dtb device tree which should be in /usr/share/bootloader on the current image; do "mount -o remount,rw /flash" to make /flash writeable and copy the dtb file and edit extlinux.conf to use it not the M4 device tree.

  • Ok, I did some more investigation.
    First I noticed that I have used nightly 20220617 accidently.
    So I figured I might try newer images first ... But uups some of them did not even boot!


    I tried different versions to isolate the problem. And I found different behaviours.

    • Images unitl 2022-09-01 are booting fine.
    • Image from 2022-09-02 unti 2022-09-14 not tested yet.
    • With Image 2022-09-15 and 2022-10-01 the system boots up until the LE logo appears.
    • Image 2022-11-01 and 2022-11-30 did not even start booting ....


    In Image 2022-09-01 I changed the bootloader as shown. Bluetooth shines through its absence.
    Here is dmesg output ...
    And PVR Client's are installable now.

  • fow0ryl Thanks for you investigations. As nobody here is having this board and I'm not having any those issues with any of my RK3399 boards: Can you attach uart and paste the log from the latest nightly somewhere? Please remove quiet from the command line in extlinux.conf before.

  • Hm,
    never used the serial port and a TTL-USB adapter for debugging before .....
    After a bit of trial and error I got the first usable output from a running installation.
    Now its time for the real life :)


    I extracted the rk3399-nanopi-neo4.dtb and copied it to LIBRELEC partition, changed entry in extlinux.conf

    Boot failure with LE 11 2022-12-05 regardless of using ..m4.dtb or neo4.dtb

    Code
    U-Boot TPL 2022.10 (Dec 05 2022 - 22:11:21)
    sdram_init: LPDDR3 - 933MHz failed!
    rk3399_dmc_init DRAM init failed -22
    Missing DTB

    Boot ok with LE 11 2022-09-01

    Edited 2 times, last by fow0ryl (December 7, 2022 at 12:01 AM).

  • Thanks for checking.

    It looks a lot like we are currently only supporting NanoPi M4 https://github.com/LibreELEC/Libr…elper#L306-L309, but not NanoPi NEO4.

    That's likely also the reason, why wifi isn't correctly working with M4-devicetree for you.

    It might have worked before, since we did use RK's vendor DDR initialisation and kernel side DT-differences are minimal. However, I'm fine to add support for your board if you open a pull request - it's supported both upstream kernel and upstream u-boot. Hint: it's rk3399-nanopi-neo4.dtb as kernel device tree and nanopi-neo4-rk3399_defconfig as u-boot config. Please build before and check if it works correctly..

  • Quote

    it's rk3399-nanopi-neo4.dtb as kernel device tree and nanopi-neo4-rk3399_defconfig as u-boot config. Please build before and check if it works correctly..

    Sorry, but I did not understand any word ...