AsteroidOS / meta-smartwatch

OpenEmbedded layer that provides support for various smartwatches.
24 stars 18 forks source link

[hoki] wifi support #224

Open argosphil opened 1 year ago

argosphil commented 1 year ago

TL;DR: wifi appears to work with an externally-provided driver

I tried this driver: https://github.com/Dev-msm8953/vendor_qcom_opensource_wlan_prima, which builds after providing an empty include/linux/wakelock.h file in the kernel tree.

WiFi appears to work with it after some modifications (disable BT, try to get it to stop doing assoc and roaming in the driver, provide mac address in /lib/firmware, enable with echo 1 > /dev/wcnss_wlan, load the module, rfkill unblock 0, then start hostapd and wpa_supplicant, manually configure IP and route, ssh works)!

Now I should figure out which of these modifications are actually necessary, and whether a stock driver would be preferable.

MagneFire commented 1 year ago

Great work!

For what it's worth these wlan kernel driver might be more suited: https://github.com/Nhannh2791/Linux/tree/master/kernel/private/msm-fossil-cw-modules/wlan since it specifically for hoki. However, it's not an official source.

We might be able to use msm-wifi-enabler here as well since you needed to execute the same commands as listed here: https://github.com/AsteroidOS/meta-asteroid/blob/master/recipes-android/msm-wifi-enabler/msm-wifi-enabler/msm-wifi-enabler.service.

Does connmanctl work too (https://wiki.asteroidos.org/index.php/IP_Connection) as opposed to manually executing rfkill, hostapd and wpa_supplicant?

argosphil commented 1 year ago

Does connmanctl work too (https://wiki.asteroidos.org/index.php/IP_Connection) as opposed to manually executing rfkill, hostapd and wpa_supplicant?

Yes-ish. I just tried, and got this:

Error /net/connman/service/wifi_*_managed_psk: Input/output error

But then I tried again, and it worked. Will investigate.

gittrekt commented 2 months ago

Great work!

For what it's worth these wlan kernel driver might be more suited: https://github.com/Nhannh2791/Linux/tree/master/kernel/private/msm-fossil-cw-modules/wlan since it specifically for hoki. However, it's not an official source.

We might be able to use msm-wifi-enabler here as well since you needed to execute the same commands as listed here: https://github.com/AsteroidOS/meta-asteroid/blob/master/recipes-android/msm-wifi-enabler/msm-wifi-enabler/msm-wifi-enabler.service.

Does connmanctl work too (https://wiki.asteroidos.org/index.php/IP_Connection) as opposed to manually executing rfkill, hostapd and wpa_supplicant?

Hey, new to astroidos coming from postmarketos but I just got this device so doing a bit of reading on it so please excuse my lack of understanding. I also haven't a chance to setup a build environment yet so no testing done, just code reviewing.

Couldn't we just copy beluga for this? Basically you would just have to change the board platform in the same sense as adding an additional KBUILD_OPTIONS += BOARD_PLATFORM=msm8937

So in my theory by using Beluga wlan module as an example

EXTRA_OEMAKE = " KERNEL_SRC="${STAGING_KERNEL_DIR}" M="${S}" BOARD_PLATFORM=msm8937"

As we can see from the Android.mk all the following boards should be supported under pronto. # Build/Package options for 8916, 8974, 8226, 8610, 8909, 8952, 8937, 8953 targets