From e80de929417da2d0114e617db4b2278d44075f15 Mon Sep 17 00:00:00 2001 From: Benjamin Staar Date: Tue, 26 Oct 2021 10:16:15 +0200 Subject: [PATCH] Solving *"wifi:channel=0 is invalid"* when using FTM example code When using the FTM examples I got an error in the FTM_Initiator.ino: *"wifi:channel=0 is invalid"* I solved it for myself by simply passing the channel argument to be 1 in *WiFi.initiateFTM*. However, a better fix would be to directly change the default channel here. --- libraries/WiFi/src/WiFiGeneric.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/WiFi/src/WiFiGeneric.h b/libraries/WiFi/src/WiFiGeneric.h index e3fd62689ad..7079c032993 100644 --- a/libraries/WiFi/src/WiFiGeneric.h +++ b/libraries/WiFi/src/WiFiGeneric.h @@ -172,7 +172,7 @@ class WiFiGenericClass bool setTxPower(wifi_power_t power); wifi_power_t getTxPower(); - bool initiateFTM(uint8_t frm_count=16, uint16_t burst_period=2, uint8_t channel=0, const uint8_t * mac=NULL); + bool initiateFTM(uint8_t frm_count=16, uint16_t burst_period=2, uint8_t channel=1, const uint8_t * mac=NULL); static const char * getHostname(); static bool setHostname(const char * hostname);