Skip to content

Commit

Permalink
Pi5 does not have external wifi adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Nov 7, 2024
1 parent de3bbab commit 8462fe3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/boot/FPPINIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -1278,6 +1293,7 @@ int main(int argc, char* argv[]) {
printf("FPP - Directories created\n");
checkSSHKeys();
handleBootPartition();
checkPi5Wifi();
checkHostName();
checkFSTAB();
setupApache();
Expand Down

0 comments on commit 8462fe3

Please sign in to comment.