Skip to content

Commit 4b9dc61

Browse files
authored
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.
1 parent a2d7c0d commit 4b9dc61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/WiFi/src/WiFiGeneric.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class WiFiGenericClass
172172
bool setTxPower(wifi_power_t power);
173173
wifi_power_t getTxPower();
174174

175-
bool initiateFTM(uint8_t frm_count=16, uint16_t burst_period=2, uint8_t channel=0, const uint8_t * mac=NULL);
175+
bool initiateFTM(uint8_t frm_count=16, uint16_t burst_period=2, uint8_t channel=1, const uint8_t * mac=NULL);
176176

177177
static const char * getHostname();
178178
static bool setHostname(const char * hostname);

0 commit comments

Comments
 (0)