Solving *"wifi:channel=0 is invalid"* when using FTM example code (#5809)

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.
This commit is contained in:
Benjamin Staar
2021-11-04 15:08:50 +01:00
committed by GitHub
parent a2d7c0dcf6
commit 4b9dc61447

View File

@ -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);