Page 1 of 1

Can't Run ESPNow and Station/SoftAP Simultaneously

Posted: Sat Nov 30, 2019 3:36 pm
by physiii
First I made sure ESPNow is using the same channel as the wifi access point. I run the wifi station from within the ESPNow example shown here: Line 374.

However, as soon as I set the wifi mode (line 378) with esp_wifi_set_mode(ESPNOW_WIFI_MODE), I lose connection to the access point.

Code: Select all

I (917) wifi: connected with TestAP, aid = 5, channel 9, BW20, bssid = 40:16:7e:a2:92:b0, security type: 3, phy: bgn, rssi: -51
I (927) wifi: pm start, type: 1

I (977) wifi: AP's beacon interval = 102400 us, DTIM period = 3
I (1577) esp_netif_handlers: sta ip: 192.168.1.48, mask: 255.255.255.0, gw: 192.168.1.1
I (1577) espnow_example: got ip:192.168.1.48
I (5757) wifi: state: run -> init (0)
I (5757) wifi: pm stop, total sleep time: 4093827 us / 4832006 us

I (5757) wifi: new:<9,0>, old:<9,0>, ap:<255,255>, sta:<9,0>, prof:1
I (5757) wifi: mode : softAP (cc:50:e3:82:ec:99)
I (5767) wifi: Total power save buffer number: 16
I (5767) wifi: Init max length of beacon: 752/752
I (5767) wifi: Init max length of beacon: 752/752
I (5777) ESPNOW: espnow [version: 1.0] init
I (5777) espnow_example: retry to connect to the AP
I (5787) espnow_example: connect to the AP fail
I (10797) espnow_example: Start sending broadcast data
I (10797) espnow_example: Receive 1268th unicast data from: cc:50:e3:82:ec:8c, len: 200
I (10797) espnow_example: Receive 1269th unicast data from: cc:50:e3:82:ec:8c, len: 200
I (10807) espnow_example: Receive 1270th unicast data from: cc:50:e3:82:ec:8c, len: 200
How can I run espnow mode simultaneously with wifi station or sofAP modes?

Re: Can't Run ESPNow and Station/SoftAP Simultaneously

Posted: Sat Nov 30, 2019 10:52 pm
by WiFive