File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ void sendMSPViaEspnow(mspPacket_t *packet);
7272// otherwise we get errors about invalid peer:
7373// https://rntlab.com/question/espnow-peer-interface-is-invalid/
7474esp_now_peer_info_t peerInfo;
75+ esp_now_peer_info_t bindingInfo;
7576#endif
7677
7778void RebootIntoWifi (wifi_service_t service = WIFI_SERVICE_UPDATE)
@@ -412,6 +413,14 @@ void setup()
412413 DBGLN (" ESP-NOW failed to add peer" );
413414 return ;
414415 }
416+ memcpy (bindingInfo.peer_addr , bindingAddress, 6 );
417+ bindingInfo.channel = 0 ;
418+ bindingInfo.encrypt = false ;
419+ if (esp_now_add_peer (&bindingInfo) != ESP_OK)
420+ {
421+ DBGLN (" ESP-NOW failed to add binding peer" );
422+ return ;
423+ }
415424 #endif
416425
417426 esp_now_register_recv_cb (OnDataRecv);
You can’t perform that action at this time.
0 commit comments