openbouffalo / buildroot_bouffalo

Linux Image for the BL808 CPU by Bouffalo Lab
128 stars 34 forks source link

Add Wi-Fi support #81

Closed ivq closed 11 months ago

ivq commented 12 months ago

The PR is a little big. But I tried to keep all commits simple and straightforward.

Pavlos1 commented 12 months ago

Hi. Not a maintainer, but: do I need to flash this M0 firmware for this PR to work?

ivq commented 12 months ago

Hi. Not a maintainer, but: do I need to flash this M0 firmware for this PR to work?

No. The PR would do everything for you. It adds package blwnet_xram and the M0 firmware in binary form is provided by the package so bl_iot_sdk is not needed. The firmware only needs to reside in /lib/firmware in the rootfs.

Pavlos1 commented 12 months ago

Oh cool there's even wifi debug information on the other (M0) UART.

I wonder why it's not picking up any of my SSIDs then. It's setting the region to China but it seems that the channels should be more or less compatible with the Australian ones.

Also since this replaces the existing M0 firmware at runtime, it no longer runs the Mailbox / IRQ Forwarding thing. I'm curious what the consequences of this are for the rest of the system.

ivq commented 11 months ago

Oh cool there's even wifi debug information on the other (M0) UART.

I wonder why it's not picking up any of my SSIDs then. It's setting the region to China but it seems that the channels should be more or less compatible with the Australian ones.

The root cause should be that your router enabled MFP/WPA3 and the firmware is not compatible. This issue have been fixed. See https://github.com/openbouffalo/buildroot_bouffalo/pull/82.

Also since this replaces the existing M0 firmware at runtime, it no longer runs the Mailbox / IRQ Forwarding thing. I'm curious what the consequences of this are for the rest of the system.

D0 is using IRQ chip driver, so it no more depends on M0 forwarding IRQ.

Pavlos1 commented 11 months ago

Before #82 was merged I did get it to connect to pinephone's hotspot, so I can confirm that the issue is specific to my router.

However, even with the latest version of blwnet_xram it still won't connect or even find my router's SSID during the scan. And the router is explicitly configured to use WPA2.

Using a different wireless connection isn't a big issue for me, but if you would like any more information for the purposes of making these chips work with a wider set of routers then let me know.

Update: it was purely a range issue. The chip antenna on the Ox64 isn't very good..