espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
630 stars 145 forks source link

Under SoftAP mode, when station disconnected from SoftAP, the station mac address in the App Event response is incorrect #278

Open zhou88mang opened 8 months ago

zhou88mang commented 8 months ago

when i start softap ,and use my phone to connect to esp32, the log as follow wlan ap_start dbbz 12345678 [1062.498237] esp32 softAP started [1062.498362] SoftAp : dbbz start success [1153.280249] ap3 new lease, IP: 192.168.100.100, MAC: 42:6F:C1:66:95:DC [1153.280520] station has connected, IP:192.168.100.100, MAC: 42:6F:C1:66:95:DC the mac adress of my phone is 42:6F:C1:66:95:DC

when i closed wifi of my phone , the log as follow [1166.941242] 1970-01-01 00:19:26 > App EVENT: SoftAP mode: Disconnect MAC[bc:a7:40:3f:00:00] [1166.941567] ap mode : a station: bc:a7:40:3f:00:00 has disc

i do not konow whereMAC[bc:a7:40:3f:00:00] comes from. And the sourcecode i used is esp-hosted-release-fg-v0.0.5

mantriyogesh commented 8 months ago

As I understand, that the mac address is not correct on the disconnect event. Give us time to fix this (will reproduce this on master and give you a fix on master)

zhou88mang commented 8 months ago

As I understand, that the mac address is not correct on the disconnect event. Give us time to fix this (will reproduce this on master and give you a fix on master)

ok, thanks!

zhou88mang commented 7 months ago

Is there any progress ??

zhou88mang commented 7 months ago

As I understand, that the mac address is not correct on the disconnect event. Give us time to fix this (will reproduce this on master and give you a fix on master)

any progress ??

mantriyogesh commented 7 months ago

Hello @zhou88mang ,

We were off track on this. I will check today and let you know..

mantriyogesh commented 7 months ago

Hello @zhou88mang ,

I tried myself with the ESP softAP.

Linux commands fired and output ### Build and start softAP #### Terminal 1 ``` ym2@rpi2:~/h6/esp_hosted_fg/host/linux/host_control/c_support $ make gcc -C -Wall --sysroot= -I/home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/protobuf-c -I/home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/include -I/home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/include -I/home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/include -I/home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../virtual_serial_if/include -I/home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../components/include -I/home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../port/include -I. /home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/protobuf-c/protobuf-c/protobuf-c.c /home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../../common/esp_hosted_config.pb-c.c /home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/ctrl_core.c /home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../control_lib/src/ctrl_api.c /home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../virtual_serial_if/src/serial_if.c /home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../../components/src/esp_queue.c /home/ym2/h6/esp_hosted_fg/host/linux/host_control/c_support/../../port/src/platform_wrapper.c ./test_utils.c -lpthread -lrt test.c -o test.out perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_TERMINAL = "iTerm2", LC_CTYPE = "UTF-8", LANG = "en_GB.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("en_GB.UTF-8"). ym2@rpi2:~/h6/esp_hosted_fg/host/linux/host_control/c_support $ sudo ./test.out softap_start Enable heartbeat with duration 20 Heartbeat operation successful esp32 softAP started ethap0 interface down MAC address 10:97:bd:f0:e1:d5 set to ethap0 interface ethap0 interface up Requested operation complete Sleeping for some time just to showcase heartbeat ^C Clean-up and exit Disable Heartbeat Heartbeat operation successful ym2@rpi2:~/h6/esp_hosted_fg/host/linux/host_control/c_support $ ym2@rpi2:~/h6/esp_hosted_fg/host/linux/host_control/c_support $ sudo ./test.out softap_start Enable heartbeat with duration 20 Heartbeat operation successful esp32 softAP started ethap0 interface down MAC address 10:97:bd:f0:e1:d5 set to ethap0 interface ethap0 interface up Requested operation complete Sleeping for some time just to showcase heartbeat ^C Clean-up and exit Disable Heartbeat Heartbeat operation successful ``` ### Start DHCP server on Linux ethap0 ``` ym2@rpi2:~/h6/esp_hosted_fg/host/linux/host_control/c_support $ sudo dnsmasq --no-daemon --no-resolv --no-poll --dhcp-script=/system/bin/dhcp_announce --dhcp-range=192.168.4.1,192.168.4.20,1h dnsmasq: started, version 2.89 cachesize 150 dnsmasq: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset nftset auth cryptohash DNSSEC loop-detect inotify dumpfile dnsmasq: warning: no upstream servers configured dnsmasq-dhcp: DHCP, IP range 192.168.4.1 -- 192.168.4.20, lease time 1h dnsmasq: read /etc/hosts - 7 names dnsmasq-dhcp: DHCPDISCOVER(ethap0) be:bd:5d:41:8d:48 dnsmasq-dhcp: DHCPOFFER(ethap0) 192.168.4.7 be:bd:5d:41:8d:48 dnsmasq-dhcp: DHCPDISCOVER(ethap0) be:bd:5d:41:8d:48 dnsmasq-dhcp: DHCPOFFER(ethap0) 192.168.4.7 be:bd:5d:41:8d:48 dnsmasq-dhcp: DHCPDISCOVER(ethap0) be:bd:5d:41:8d:48 dnsmasq-dhcp: DHCPOFFER(ethap0) 192.168.4.7 be:bd:5d:41:8d:48 dnsmasq-dhcp: DHCPREQUEST(ethap0) 192.168.4.7 be:bd:5d:41:8d:48 dnsmasq-dhcp: DHCPACK(ethap0) 192.168.4.7 be:bd:5d:41:8d:48 Xiaomi-11i dnsmasq: failed to execute /system/bin/dhcp_announce: No such file or directory dnsmasq-dhcp: no address range available for DHCP request via wlan0 dnsmasq-dhcp: DHCPREQUEST(ethap0) 192.168.4.7 be:bd:5d:41:8d:48 dnsmasq-dhcp: DHCPACK(ethap0) 192.168.4.7 be:bd:5d:41:8d:48 Xiaomi-11i dnsmasq: failed to execute /system/bin/dhcp_announce: No such file or directory dnsmasq-dhcp: no address range available for DHCP request via wlan0 dnsmasq-dhcp: DHCPREQUEST(ethap0) 192.168.4.7 be:bd:5d:41:8d:48 dnsmasq-dhcp: DHCPACK(ethap0) 192.168.4.7 be:bd:5d:41:8d:48 Xiaomi-11i dnsmasq: failed to execute /system/bin/dhcp_announce: No such file or directory dnsmasq-dhcp: DHCPREQUEST(ethap0) 192.168.4.7 be:bd:5d:41:8d:48 dnsmasq-dhcp: DHCPACK(ethap0) 192.168.4.7 be:bd:5d:41:8d:48 Xiaomi-11i dnsmasq: failed to execute /system/bin/dhcp_announce: No such file or directory dnsmasq-dhcp: DHCPDISCOVER(ethap0) a4:cf:99:50:73:55 dnsmasq-dhcp: DHCPOFFER(ethap0) 192.168.4.13 a4:cf:99:50:73:55 dnsmasq-dhcp: DHCPDISCOVER(ethap0) a4:cf:99:50:73:55 dnsmasq-dhcp: DHCPOFFER(ethap0) 192.168.4.13 a4:cf:99:50:73:55 dnsmasq-dhcp: DHCPREQUEST(ethap0) 192.168.4.13 a4:cf:99:50:73:55 dnsmasq-dhcp: DHCPACK(ethap0) 192.168.4.13 a4:cf:99:50:73:55 Mantris-MBP dnsmasq: failed to execute /system/bin/dhcp_announce: No such file or directory dnsmasq-dhcp: no address range available for DHCP request via wlan0 dnsmasq-dhcp: no address range available for DHCP request via wlan0 dnsmasq-dhcp: no address range available for DHCP request via wlan0 dnsmasq-dhcp: no address range available for DHCP request via wlan0 ``` #### Terminal 2 ``` ym2@rpi2:~ $ ym2@rpi2:~ $ sudo ifconfig ethap0 192.168.4.5 ```
Unfold for ESP32C2 log ``` ESP-ROM:esp8684-api2-20220127 Build:Jan 27 2022 rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:1 load:0x3fcd5c80,len:0x16f0 load:0x403acb70,len:0xbac load:0x403aeb70,len:0x27d4 entry 0x403acb7a I (21) boot: ESP-IDF v5.3-dev-741-g03414a1550-dirty 2nd stage bootloader I (21) boot: compile time Dec 18 2023 11:36:42 I (22) boot: chip revision: v1.0 I (26) boot.esp32c2: MMU Page Size : 32K I (31) boot.esp32c2: SPI Speed : 60MHz I (35) boot.esp32c2: SPI Mode : DIO I (40) boot.esp32c2: SPI Flash Size : 2MB I (45) boot: Enabling RNG early entropy source... I (50) boot: Partition Table: I (54) boot: ## Label Usage Type ST Offset Length I (61) boot: 0 nvs WiFi data 01 02 00009000 00004000 I (69) boot: 1 otadata OTA data 01 00 0000d000 00002000 I (76) boot: 2 phy_init RF data 01 01 0000f000 00001000 I (84) boot: 3 ota_0 OTA app 00 10 00010000 000f0000 I (91) boot: 4 ota_1 OTA app 00 11 00100000 000f0000 I (98) boot: End of partition table I (103) esp_image: segment 0: paddr=00010020 vaddr=3c080020 size=266d0h (157392) map I (147) esp_image: segment 1: paddr=000366f8 vaddr=3fcb3cc0 size=01920h ( 6432) load I (149) esp_image: segment 2: paddr=00038020 vaddr=42000020 size=79ba8h (498600) map I (268) esp_image: segment 3: paddr=000b1bd0 vaddr=3fcb55e0 size=01508h ( 5384) load I (270) esp_image: segment 4: paddr=000b30e0 vaddr=40380000 size=13cb4h ( 81076) load I (300) boot: Loaded app from partition at offset 0x10000 I (300) boot: Disabling RNG early entropy source... I (312) cpu_start: Unicore app I (322) cpu_start: Pro cpu start user code I (322) cpu_start: cpu freq: 120000000 Hz I (322) cpu_start: Application information: I (325) cpu_start: Project name: network_adapter I (330) cpu_start: App version: 7e8610c-dirty I (336) cpu_start: Compile time: Dec 18 2023 11:36:38 I (342) cpu_start: ELF file SHA256: 506a92471... I (347) cpu_start: ESP-IDF: v5.3-dev-741-g03414a1550-dirty I (354) cpu_start: Min chip rev: v1.0 I (359) cpu_start: Max chip rev: v1.99 I (364) cpu_start: Chip rev: v1.0 I (369) heap_init: Initializing. RAM available for dynamic allocation: I (376) heap_init: At 3FCBB3A0 len 000217D0 (133 KiB): RAM I (382) heap_init: At 3FCDCB70 len 0000294C (10 KiB): RAM I (389) spi_flash: detected chip: generic I (393) spi_flash: flash io: dio W (396) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header. I (410) sleep: Configure to isolate all GPIO pins in sleep state I (416) sleep: Enable automatic switching of GPIO sleep configuration I (423) coexist: coex firmware version: a3b19de I (429) coexist: coexist rom version de8c800 I (434) main_task: Started on CPU0 I (434) main_task: Calling app_main() I (434) NETWORK_ADAPTER: ********************************************************************* I (444) NETWORK_ADAPTER: ESP-Hosted-FG Firmware version :: 0.0.5 I (454) NETWORK_ADAPTER: Transport used :: SPI only I (464) NETWORK_ADAPTER: ********************************************************************* I (474) NETWORK_ADAPTER: Supported features are: I (484) NETWORK_ADAPTER: - WLAN over SPI I (484) ESP_BT: - BT/BLE I (484) ESP_BT: - HCI Over SPI I (494) ESP_BT: - BLE only I (494) NETWORK_ADAPTER: capabilities: 0xe8 controller lib commit: [79ed4e8] controller rom commit: [3314f9d] I (514) phy_init: phy_version 280,ae9dde6,Nov 22 2023,15:10:11 I (544) phy: libbtbb version: ec1d983, Nov 22 2023, 15:10:24 I (544) NETWORK_ADAPTER: ESP Bluetooth MAC addr: 10:97:bd:f0:e1:d6 I (544) SPI_DRIVER: Using SPI interface I (544) gpio: GPIO[3]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (554) gpio: GPIO[4]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (564) SPI_DRIVER: SPI Ctrl:1 mode: 2, InitFreq: 10MHz, ReqFreq: 30MHz GPIOs: MOSI: 7, MISO: 2, CS: 10, CLK: 6 HS: 3 DR: 4 I (574) SPI_DRIVER: Hosted SPI queue size: Tx:6 Rx:6 I (584) gpio: GPIO[10]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (594) gpio: GPIO[10]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (604) pp: pp rom version: de8c800 I (604) net80211: net80211 rom version: de8c800 I (624) wifi:wifi driver task: 3fcd1c8c, prio:23, stack:6144, core=0 I (624) wifi:wifi firmware version: e7e5270 I (624) wifi:wifi certification version: v7.0 I (624) wifi:config NVS flash: disabled I (634) wifi:config nano formating: enabled I (634) wifi:Init data frame dynamic rx buffer num: 32 I (634) wifi:Init static rx mgmt buffer num: 5 I (644) wifi:Init management short buffer num: 32 I (644) wifi:Init dynamic tx buffer num: 32 I (654) wifi:Init static tx FG buffer num: 2 I (654) wifi:Init static rx buffer size: 1600 I (654) wifi:Init static rx buffer num: 10 I (664) wifi:Init dynamic rx buffer num: 32 I (664) wifi_init: rx ba win: 6 I (674) wifi_init: tcpip mbox: 32 I (674) wifi_init: udp mbox: 6 I (674) wifi_init: tcp mbox: 6 I (684) wifi_init: tcp tx win: 5760 I (684) wifi_init: tcp rx win: 5760 I (694) wifi_init: tcp mss: 1440 I (694) wifi_init: WiFi IRAM OP enabled I (694) wifi_init: WiFi RX IRAM OP enabled I (704) wifi:mode : null I (704) NETWORK_ADAPTER: Initial set up done I (714) slave_ctrl: event ESPInit I (714) main_task: Returned from app_main() I (20405574) slave_ctrl: HB timer started for 20 sec I (20405584) wifi:mode : sta (10:97:bd:f0:e1:d4) I (20405584) wifi:enable tsf I (20405584) slave_ctrl: station mode set I (20405584) slave_ctrl: Get station mac address I (20405584) slave_ctrl: mac [10:97:bd:f0:e1:d4] I (20407284) slave_ctrl: No AP available as SSID:'Ym2' I (20407284) slave_ctrl: Station not connected. reason: 201 I (20408974) slave_ctrl: No AP available as SSID:'Ym2' I (20408974) slave_ctrl: Station not connected. reason: 201 I (20410664) slave_ctrl: No AP available as SSID:'Ym2' I (20410664) slave_ctrl: Station not connected. reason: 201 I (20417264) slave_ctrl: Stop Heatbeat I (20417264) slave_ctrl: Stopping HB timer I (20420124) slave_ctrl: HB timer started for 20 sec I (20420124) slave_ctrl: station mode set I (20420124) slave_ctrl: Get station mac address I (20420124) slave_ctrl: mac [10:97:bd:f0:e1:d4] I (20421824) wifi:new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1 I (20422094) wifi:state: init -> auth (b0) I (20422104) wifi:state: auth -> assoc (0) I (20422114) wifi:state: assoc -> run (10) I (20422154) wifi:connected with Ym2, aid = 1, channel 6, BW20, bssid = ba:79:26:c4:0b:c4 I (20422154) wifi:security: WPA2-PSK, phy: bgn, rssi: -40 I (20422154) wifi:pm start, type: 1 I (20422154) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us I (20422164) wifi:set rx beacon pti, rx_bcn_pti: 14, bcn_timeout: 25000, mt_pti: 14, mt_time: 10000 I (20422174) slave_ctrl: connected to ap SSID:'Ym2', password:'12312341234' I (20422224) wifi:dp: 2, bi: 102400, li: 4, scale listen interval from 307200 us to 409600 us I (20422224) wifi:AP's beacon interval = 102400 us, DTIM period = 2 I (20424614) slave_ctrl: Stop Heatbeat I (20424614) slave_ctrl: Stopping HB timer W (20440454) wifi:idx:0 (ifx:0, ba:79:26:c4:0b:c4), tid:0, ssn:4, winSize:64 I (20450224) slave_ctrl: HB timer started for 20 sec I (20450234) wifi:state: run -> init (0) I (20450234) wifi:pm stop, total sleep time: lu us / lu us W (20450234) wifi:idx I (20450234) wifi:new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1 I (20450244) slave_ctrl: Disconnected from AP I (20450244) slave_ctrl: Station not connected. reason: 8 I (20453164) slave_ctrl: Stop Heatbeat I (20453164) slave_ctrl: Stopping HB timer I (20475964) slave_ctrl: HB timer started for 20 sec I (20475974) wifi:mode : softAP (10:97:bd:f0:e1:d5) I (20475974) wifi:Total power save buffer number: 16 I (20475974) wifi:Init max length of beacon: 752/752 I (20475974) wifi:Init max length of beacon: 752/752 I (20475984) slave_ctrl: softap mode set I (20475984) slave_ctrl: mac [10:97:bd:f0:e1:d5] E (20475994) wifi:HT40 Bandwidth is not supported for this configuration E (20475994) slave_ctrl: Failed to set bandwidth I (20485204) slave_ctrl: Stop Heatbeat I (20485204) slave_ctrl: Stopping HB timer I (20716274) slave_ctrl: HB timer started for 20 sec I (20716274) slave_ctrl: softap mode set I (20716274) slave_ctrl: mac [10:97:bd:f0:e1:d5] I (20716274) slave_ctrl: 10:97:bd:f0:e1:d5 W (20716284) wifi:Affected by the ESP-NOW encrypt num, set the max connection num to 2 I (20716564) wifi:Total power save buffer number: 16 I (20716564) slave_ctrl: ssid ESPWifi pwd ESPWifi@123 authmode 3 ssid_hidden 0 max_conn 4 channel 1 I (20716564) slave_ctrl: ESP32 SoftAP is avaliable I (20716574) slave_ctrl: softap stop handler stop I (20716574) NETWORK_ADAPTER: Get softap mac address I (20716584) NETWORK_ADAPTER: AP mac [10:97:bd:f0:e1:d5] I (20722744) slave_ctrl: Stop Heatbeat I (20722744) slave_ctrl: Stopping HB timer I (20762564) wifi:station: be:bd:5d:41:8d:48 join, AID=1, bgn, 20 I (20762594) slave_ctrl: station be:bd:5d:41:8d:48 join, AID=1 I (20780824) wifi:station: be:bd:5d:41:8d:48 leave, AID = 1, bss_flags is 658531, bss:0x3fcd9ac0 I (20780824) wifi:new:<1,0>, old:<1,0>, ap:<1,0>, sta:<255,255>, prof:1 I (20780824) slave_ctrl: station be:bd:5d:41:8d:48 leave, AID=1 I (20780834) slave_ctrl: mac [be:bd:5d:41:8d:48] I (20782304) wifi:station: be:bd:5d:41:8d:48 join, AID=1, bgn, 20 I (20782344) slave_ctrl: station be:bd:5d:41:8d:48 join, AID=1 I (20800394) wifi:station: be:bd:5d:41:8d:48 leave, AID = 1, bss_flags is 658531, bss:0x3fcd9ac0 I (20800394) wifi:new:<1,0>, old:<1,0>, ap:<1,0>, sta:<255,255>, prof:1 I (20800394) slave_ctrl: station be:bd:5d:41:8d:48 leave, AID=1 I (20800404) slave_ctrl: mac [be:bd:5d:41:8d:48] I (21002294) slave_ctrl: HB timer started for 20 sec I (21002304) slave_ctrl: softap mode set I (21002304) slave_ctrl: mac [10:97:bd:f0:e1:d5] I (21002304) slave_ctrl: 10:97:bd:f0:e1:d5 W (21002304) wifi:Affected by the ESP-NOW encrypt num, set the max connection num to 2 I (21002314) wifi:Total power save buffer number: 16 I (21002324) slave_ctrl: ssid ESPWifi pwd ESPWifi@123 authmode 3 ssid_hidden 0 max_conn 4 channel 1 I (21002334) slave_ctrl: ESP32 SoftAP is avaliable I (21002334) slave_ctrl: softap stop handler stop I (21002344) NETWORK_ADAPTER: Get softap mac address I (21002344) NETWORK_ADAPTER: AP mac [10:97:bd:f0:e1:d5] I (21005614) slave_ctrl: Stop Heatbeat I (21005614) slave_ctrl: Stopping HB timer I (21061144) wifi:station: be:bd:5d:41:8d:48 join, AID=1, bgn, 20 I (21061234) slave_ctrl: station be:bd:5d:41:8d:48 join, AID=1 W (21064654) wifi:idx:2 (ifx:1, be:bd:5d:41:8d:48), tid:0, ssn:16, winSize:64 I (21073424) wifi:station: be:bd:5d:41:8d:48 leave, AID = 1, bss_flags is 658547, bss:0x3fcd968c I (21073424) wifi:new:<1,0>, old:<1,0>, ap:<1,0>, sta:<255,255>, prof:1 W (21073424) wifi:idx I (21073424) slave_ctrl: station be:bd:5d:41:8d:48 leave, AID=1 I (21073434) slave_ctrl: mac [be:bd:5d:41:8d:48] I (21079344) wifi:station: be:bd:5d:41:8d:48 join, AID=1, bgn, 20 I (21079364) slave_ctrl: station be:bd:5d:41:8d:48 join, AID=1 W (21079754) wifi:idx:2 (ifx:1, be:bd:5d:41:8d:48), tid:0, ssn:18, winSize:64 I (21084084) wifi:station: be:bd:5d:41:8d:48 leave, AID = 1, bss_flags is 658547, bss:0x3fcd968c I (21084084) wifi:new:<1,0>, old:<1,0>, ap:<1,0>, sta:<255,255>, prof:1 W (21084084) wifi:idx I (21084084) slave_ctrl: station be:bd:5d:41:8d:48 leave, AID=1 I (21084094) slave_ctrl: mac [be:bd:5d:41:8d:48] I (21090034) wifi:station: be:bd:5d:41:8d:48 join, AID=1, bgn, 20 I (21090154) slave_ctrl: station be:bd:5d:41:8d:48 join, AID=1 W (21090624) wifi:idx:2 (ifx:1, be:bd:5d:41:8d:48), tid:0, ssn:16, winSize:64 I (21094104) wifi:station: be:bd:5d:41:8d:48 leave, AID = 1, bss_flags is 134243, bss:0x3fcd968c I (21094104) wifi:new:<1,0>, old:<1,0>, ap:<1,0>, sta:<255,255>, prof:1 W (21094114) wifi:idx I (21094114) slave_ctrl: station be:bd:5d:41:8d:48 leave, AID=1 I (21094124) slave_ctrl: mac [be:bd:5d:41:8d:48] I (21097804) wifi:station: be:bd:5d:41:8d:48 join, AID=1, bgn, 20 I (21097824) slave_ctrl: station be:bd:5d:41:8d:48 join, AID=1 W (21098124) wifi:idx:2 (ifx:1, be:bd:5d:41:8d:48), tid:0, ssn:16, winSize:64 I (21100404) wifi:station: be:bd:5d:41:8d:48 leave, AID = 1, bss_flags is 134243, bss:0x3fcd968c I (21100404) wifi:new:<1,0>, old:<1,0>, ap:<1,0>, sta:<255,255>, prof:1 W (21100414) wifi:idx I (21100414) slave_ctrl: station be:bd:5d:41:8d:48 leave, AID=1 I (21100424) slave_ctrl: mac [be:bd:5d:41:8d:48] I (21130184) wifi:station: a4:cf:99:50:73:55 join, AID=1, bgn, 20 I (21130204) slave_ctrl: station a4:cf:99:50:73:55 join, AID=1 W (21130254) wifi:idx:2 (ifx:1, a4:cf:99:50:73:55), tid:6, ssn:0, winSize:64 W (21136194) wifi:idx:3 (ifx:1, a4:cf:99:50:73:55), tid:0, ssn:2, winSize:64 I (21143294) wifi:station: a4:cf:99:50:73:55 leave, AID = 1, bss_flags is 134259, bss:0x3fcd968c I (21143294) wifi:new:<1,0>, old:<1,0>, ap:<1,0>, sta:<255,255>, prof:1 W (21143294) wifi:idx W (21143294) wifi:idx I (21143304) slave_ctrl: station a4:cf:99:50:73:55 leave, AID=1 I (21143304) slave_ctrl: mac [a4:cf:99:50:73:55] ```
ym2@rpi2:~/h6/esp_hosted_fg/host/linux/host_control/c_support $ sudo ./test.out softap_start
Enable heartbeat with duration 20
Heartbeat operation successful
esp32 softAP started
ethap0 interface down
MAC address 10:97:bd:f0:e1:d5 set to ethap0 interface
ethap0 interface up

Requested operation complete
Sleeping for some time just to showcase heartbeat
2023-12-18 17:43:26 >  App EVENT: SoftAP mode: Disconnect MAC[be:bd:5d:41:8d:48]
2023-12-18 17:43:34 >  App EVENT: Heartbeat event [0]

2023-12-18 17:43:50 >  App EVENT: SoftAP mode: Disconnect MAC[be:bd:5d:41:8d:48]
2023-12-18 17:43:51 >  App EVENT: SoftAP mode: Disconnect MAC[be:bd:5d:41:8d:48]
2023-12-18 17:43:54 >  App EVENT: Heartbeat event [1]
2023-12-18 17:43:55 >  App EVENT: SoftAP mode: Disconnect MAC[be:bd:5d:41:8d:48]
2023-12-18 17:44:03 >  App EVENT: SoftAP mode: Disconnect MAC[be:bd:5d:41:8d:48]
Disable Heartbeat
Heartbeat operation successful
ym2@rpi2:~/h6/esp_hosted_fg/host/linux/host_control/c_support $
mantriyogesh commented 7 months ago

have you tested on master? I do not see this issue on master..

mantriyogesh commented 7 months ago

There might be some race condition in the code. Give me some time..

mantriyogesh commented 6 months ago

Over base current master, https://github.com/espressif/esp-hosted/commit/301e94a179c3a9a33d2cb90f90213b34e5e9dd4a , Can you please apply patch GH_278.patch and re-flash ESP?