diff --git a/arch/esp32/base.ini b/arch/esp32/base.ini
index 187f8b0e1..df6c2110e 100644
--- a/arch/esp32/base.ini
+++ b/arch/esp32/base.ini
@@ -1,7 +1,7 @@
; Common settings for ESP targes, mixin with extends = esp32_base
[esp32_abstract]
extends = arduino_base
-platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.13/platform-espressif32.zip
+platform = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.20/platform-espressif32.zip
build_src_filter =
${arduino_base.build_src_filter} - - - - -
diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini
index 9ac788f36..f0c9237ec 100644
--- a/arch/esp32/esp32.ini
+++ b/arch/esp32/esp32.ini
@@ -3,4 +3,4 @@ extends = esp32_abstract
custom_esp32_kind = esp32
platform_packages =
- platformio/framework-arduinoespressif32-libs@https://github.com/mskvortsov/meshtastic-esp32-arduino-libs/releases/download/20250327/esp32-arduino-libs.zip
+ platformio/framework-arduinoespressif32-libs@https://github.com/mskvortsov/meshtastic-esp32-arduino-libs/releases/download/20250328/esp32-arduino-libs.zip
diff --git a/patches/config.yaml b/patches/config.yaml
index 9bfb04d2b..9b4bf75e3 100644
--- a/patches/config.yaml
+++ b/patches/config.yaml
@@ -8,3 +8,4 @@ patches:
# - seeed-sensecap-indicator-tft
- name: NonBlockingRTTTL
- name: SdFat
+ - name: libpax
diff --git a/patches/libpax.patch b/patches/libpax.patch
new file mode 100644
index 000000000..cae629e3c
--- /dev/null
+++ b/patches/libpax.patch
@@ -0,0 +1,52 @@
+diff --git a/libpax_api.h b/libpax_api.h
+index 0cafbd7..096332e 100644
+--- a/libpax_api.h
++++ b/libpax_api.h
+@@ -8,20 +8,20 @@
+ // #define LIBPAX_WIFI // enables WiFi sniffing features in build
+ // #define LIBPAX_BLE // enables BLE sniffing features in build
+
+-#define WIFI_CHANNEL_ALL 0b1111111111111
+-#define WIFI_CHANNEL_1 0b0000000000001
+-#define WIFI_CHANNEL_2 0b0000000000010
+-#define WIFI_CHANNEL_3 0b0000000000100
+-#define WIFI_CHANNEL_4 0b0000000001000
+-#define WIFI_CHANNEL_5 0b0000000010000
+-#define WIFI_CHANNEL_6 0b0000000100000
+-#define WIFI_CHANNEL_7 0b0000001000000
+-#define WIFI_CHANNEL_8 0b0000010000000
+-#define WIFI_CHANNEL_9 0b0000100000000
+-#define WIFI_CHANNEL_10 0b0001000000000
+-#define WIFI_CHANNEL_11 0b0010000000000
+-#define WIFI_CHANNEL_12 0b0100000000000
+-#define WIFI_CHANNEL_13 0b1000000000000
++#define _WIFI_CHANNEL_ALL 0b1111111111111
++#define _WIFI_CHANNEL_1 0b0000000000001
++#define _WIFI_CHANNEL_2 0b0000000000010
++#define _WIFI_CHANNEL_3 0b0000000000100
++#define _WIFI_CHANNEL_4 0b0000000001000
++#define _WIFI_CHANNEL_5 0b0000000010000
++#define _WIFI_CHANNEL_6 0b0000000100000
++#define _WIFI_CHANNEL_7 0b0000001000000
++#define _WIFI_CHANNEL_8 0b0000010000000
++#define _WIFI_CHANNEL_9 0b0000100000000
++#define _WIFI_CHANNEL_10 0b0001000000000
++#define _WIFI_CHANNEL_11 0b0010000000000
++#define _WIFI_CHANNEL_12 0b0100000000000
++#define _WIFI_CHANNEL_13 0b1000000000000
+
+ #define LIBPAX_ERROR_WIFI_NOT_AVAILABLE 0b00000001
+ #define LIBPAX_ERROR_BLE_NOT_AVAILABLE 0b00000010
+diff --git a/wifiscan.cpp b/wifiscan.cpp
+index 1035ba9..bdf283e 100644
+--- a/wifiscan.cpp
++++ b/wifiscan.cpp
+@@ -36,7 +36,7 @@ Which in turn is based of Ćukasz Marcin Podkalicki's ESP32/016 WiFi Sniffer
+ TimerHandle_t WifiChanTimer;
+ int initialized_wifi = 0;
+ int wifi_rssi_threshold = 0;
+-uint16_t channels_map = WIFI_CHANNEL_ALL;
++uint16_t channels_map = _WIFI_CHANNEL_ALL;
+ static wifi_country_t country;
+
+ void wifi_noop_sniffer(void* buff, wifi_promiscuous_pkt_type_t type) {}
diff --git a/src/modules/esp32/PaxcounterModule.cpp b/src/modules/esp32/PaxcounterModule.cpp
index b27586771..b166f5b4d 100644
--- a/src/modules/esp32/PaxcounterModule.cpp
+++ b/src/modules/esp32/PaxcounterModule.cpp
@@ -87,7 +87,7 @@ int32_t PaxcounterModule::runOnce()
configuration.blecounter = 1;
configuration.blescantime = 0; // infinite
configuration.wificounter = 1;
- configuration.wifi_channel_map = WIFI_CHANNEL_ALL;
+ configuration.wifi_channel_map = _WIFI_CHANNEL_ALL;
configuration.wifi_channel_switch_interval = 50;
configuration.wifi_rssi_threshold = Default::getConfiguredOrDefault(moduleConfig.paxcounter.wifi_threshold, -80);
configuration.ble_rssi_threshold = Default::getConfiguredOrDefault(moduleConfig.paxcounter.ble_threshold, -80);