diff --git a/src/boot/FPPINIT.cpp b/src/boot/FPPINIT.cpp index 72dd7e481..533b58b47 100644 --- a/src/boot/FPPINIT.cpp +++ b/src/boot/FPPINIT.cpp @@ -927,6 +927,21 @@ static void detectNetworkModules() { // PutFileContents("/home/fpp/media/config/fpp-network-modules.conf", content); } } +static void checkPi5Wifi() { +#ifdef PLATFORM_PI + if (startsWith(GetFileContents("/proc/device-tree/model"), "Raspberry Pi 5")) { + // Pi5 does not have external wifi adapters, make sure we have them disabled + if (FileExists("/etc/modprobe.d/blacklist-native-wifi.conf")) { + unlink("/etc/modprobe.d/blacklist-native-wifi.conf"); + } + std::string v; + getRawSetting("wifiDrivers", v); + if (v != "Kernel") { + setRawSetting("wifiDrivers", "Kernel"); + } + } +#endif +} static void setupAudio() { if (!FileExists("/root/.libao")) { @@ -1278,6 +1293,7 @@ int main(int argc, char* argv[]) { printf("FPP - Directories created\n"); checkSSHKeys(); handleBootPartition(); + checkPi5Wifi(); checkHostName(); checkFSTAB(); setupApache();