File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,6 +81,17 @@ bool CommandReceiver::init_wifi()
8181 if (pm_result != 0 )
8282 LOG_WARNING (" cyw43_wifi_pm(CYW43_NONE_PM) failed: %d" , pm_result);
8383
84+ /*
85+ * Requires https://github.com/georgerobotics/cyw43-driver/pull/151 (branch pr-151).
86+ * Must run AFTER enable_sta_mode/ enable_ap_mode
87+ */
88+ const int roam_result = cyw43_wifi_set_roam_enabled (&cyw43_state, false );
89+ if (roam_result != 0 )
90+ LOG_WARNING (" cyw43_wifi_set_roam_enabled(false) failed: %d" , roam_result);
91+ const int interference_result = cyw43_wifi_set_interference_mode (&cyw43_state, CYW43_IFMODE_NONE );
92+ if (interference_result != 0 )
93+ LOG_WARNING (" cyw43_wifi_set_interference_mode(NONE) failed: %d" , interference_result);
94+
8495 m_wifi_initialized = true ;
8596 return true ;
8697}
Original file line number Diff line number Diff line change @@ -107,6 +107,20 @@ bool CommandSender::init_wifi()
107107 if (pm_result != 0 )
108108 LOG_WARNING (" cyw43_wifi_pm(CYW43_NONE_PM) failed: %d" , pm_result);
109109
110+ /*
111+ * Requires https://github.com/georgerobotics/cyw43-driver/pull/151 (branch pr-151).
112+ * Must run AFTER enable_sta_mode: radio bring-up (country load + WLC_UP) happens inside
113+ * it and re-applies PHY defaults over anything set while the radio was still down.
114+ * Interference mitigation is radio-wide (AP+STA) even though the ioctl targets the STA
115+ * interface; the default auto mode desenses the receiver when it detects noise.
116+ */
117+ const int roam_result = cyw43_wifi_set_roam_enabled (&cyw43_state, false );
118+ if (roam_result != 0 )
119+ LOG_WARNING (" cyw43_wifi_set_roam_enabled(false) failed: %d" , roam_result);
120+ const int interference_result = cyw43_wifi_set_interference_mode (&cyw43_state, CYW43_IFMODE_NONE );
121+ if (interference_result != 0 )
122+ LOG_WARNING (" cyw43_wifi_set_interference_mode(NONE) failed: %d" , interference_result);
123+
110124 const ip4_addr_t station_address{
111125 .addr = lwip_htonl (CYW43_DEFAULT_IP_STA_ADDRESS )};
112126 const ip4_addr_t station_netmask{
You can’t perform that action at this time.
0 commit comments