Bluetooth wifi coexistence problem

lewishe
Posts: 2
Joined: Thu Sep 27, 2018 9:17 am

Bluetooth wifi coexistence problem

Postby lewishe » Thu Sep 27, 2018 10:54 am

I added the wifi startup code to the play_bt_music_example in the original adf, but I didn't operate the wifi. When I connected the Bluetooth to start playing, after waiting for 5 seconds, the cpu was reset by wdt, when I removed the wifi-related function. Everything is normal, here is the error message:

Code: Select all



I (53310) wifi: bcn_timout,ap_probe_send_start
I (55820) wifi: ap_probe_send over, resett wifi status to disassoc
I (55820) wifi: state: run -> init (1)
I (55820) wifi: pm stop, total sleep time: 0/51217950

I (55820) wifi: n:6 0, o:6 1, ap:255 255, sta:6 1, prof:1
W (55830) PERIPH_WIFI: Wi-Fi disconnected from SSID xinyuan, auto-reconnect enabled, reconnect after 30000 ms
I (55840) BLUETOOTH_EXAMPLE:  [10] heap_caps_get_free_size : 4181884
E (58530) BT: Pkt dropped

E (65800) BT: Pkt dropped

E (71460) BT: Pkt dropped

E (78380) BT: Pkt dropped

E (85650) BT: Pkt dropped

ASSERT_PARAM(8192 0), in rwbt.c at line 265
Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0)
Register dump:
PC      : 0x400883f6  PS      : 0x00060034  A0      : 0x8008b38c  A1      : 0x3ffc05b0
0x400883f6: r_assert_param at ??:?

A2      : 0x00000001  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x60008054
A6      : 0x3ffc1028  A7      : 0x60008050  A8      : 0x800883f1  A9      : 0x3ffc0590
A10     : 0x00000004  A11     : 0x00000000  A12     : 0x6000804c  A13     : 0xffffffff
A14     : 0x00000000  A15     : 0xfffffffc  SAR     : 0x00000004  EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000  LBEG    : 0x40088329  LEND    : 0x40088330  LCOUNT  : 0x00000000
0x40088329: r_assert_param at ??:?

0x40088330: r_assert_param at ??:?


Backtrace: 0x400883f6:0x3ffc05b0 0x4008b389:0x3ffc05d0 0x4008b623:0x3ffc05f0 0x400860e9:0x3ffc0610 0x400d20cf:0x00000000
0x400883f6: r_assert_param at ??:?

0x4008b389: r_rwbt_isr at ??:?

0x4008b623: r_rwbtdm_isr_wrapper at intc.c:?

0x400860e9: _xt_lowint1 at D:/ESP32/esp-adf/esp-idf/components/freertos/xtensa_vectors.S:1105

0x400d20cf: esp_vApplicationIdleHook at D:/ESP32/esp-adf/esp-idf/components/esp32/freertos_hooks.c:85


Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0xf7,wp_drv:0xfe91fed3
mode:SLOW_RD, clock div:1
cmd len -1
ets_main.c 371
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:5864
load:0x40078000,len:0
ho 12 tail 0 room 4
load:0x40078000,len:15536
entry 0x40078ff4

I checked the adf getting started guide, I have already opened the PSRAM support relatively, I believe this is not a problem of insufficient memory, it should be related to the opening of wifi, when I turn on wifi, Bluetooth connection, wifi will be disconnected.

ESP_Tianhao
Posts: 28
Joined: Thu Jan 05, 2017 10:46 am

Re: Bluetooth wifi coexistence problem

Postby ESP_Tianhao » Mon Oct 22, 2018 9:53 am

lewishe wrote:I added the wifi startup code to the play_bt_music_example in the original adf, but I didn't operate the wifi. When I connected the Bluetooth to start playing, after waiting for 5 seconds, the cpu was reset by wdt, when I removed the wifi-related function. Everything is normal, here is the error message:

Code: Select all



I (53310) wifi: bcn_timout,ap_probe_send_start
I (55820) wifi: ap_probe_send over, resett wifi status to disassoc
I (55820) wifi: state: run -> init (1)
I (55820) wifi: pm stop, total sleep time: 0/51217950

I (55820) wifi: n:6 0, o:6 1, ap:255 255, sta:6 1, prof:1
W (55830) PERIPH_WIFI: Wi-Fi disconnected from SSID xinyuan, auto-reconnect enabled, reconnect after 30000 ms
I (55840) BLUETOOTH_EXAMPLE:  [10] heap_caps_get_free_size : 4181884
E (58530) BT: Pkt dropped

E (65800) BT: Pkt dropped

E (71460) BT: Pkt dropped

E (78380) BT: Pkt dropped

E (85650) BT: Pkt dropped

ASSERT_PARAM(8192 0), in rwbt.c at line 265
Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0)
Register dump:
PC      : 0x400883f6  PS      : 0x00060034  A0      : 0x8008b38c  A1      : 0x3ffc05b0
0x400883f6: r_assert_param at ??:?

A2      : 0x00000001  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x60008054
A6      : 0x3ffc1028  A7      : 0x60008050  A8      : 0x800883f1  A9      : 0x3ffc0590
A10     : 0x00000004  A11     : 0x00000000  A12     : 0x6000804c  A13     : 0xffffffff
A14     : 0x00000000  A15     : 0xfffffffc  SAR     : 0x00000004  EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000  LBEG    : 0x40088329  LEND    : 0x40088330  LCOUNT  : 0x00000000
0x40088329: r_assert_param at ??:?

0x40088330: r_assert_param at ??:?


Backtrace: 0x400883f6:0x3ffc05b0 0x4008b389:0x3ffc05d0 0x4008b623:0x3ffc05f0 0x400860e9:0x3ffc0610 0x400d20cf:0x00000000
0x400883f6: r_assert_param at ??:?

0x4008b389: r_rwbt_isr at ??:?

0x4008b623: r_rwbtdm_isr_wrapper at intc.c:?

0x400860e9: _xt_lowint1 at D:/ESP32/esp-adf/esp-idf/components/freertos/xtensa_vectors.S:1105

0x400d20cf: esp_vApplicationIdleHook at D:/ESP32/esp-adf/esp-idf/components/esp32/freertos_hooks.c:85


Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0xf7,wp_drv:0xfe91fed3
mode:SLOW_RD, clock div:1
cmd len -1
ets_main.c 371
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:5864
load:0x40078000,len:0
ho 12 tail 0 room 4
load:0x40078000,len:15536
entry 0x40078ff4

I checked the adf getting started guide, I have already opened the PSRAM support relatively, I believe this is not a problem of insufficient memory, it should be related to the opening of wifi, when I turn on wifi, Bluetooth connection, wifi will be disconnected.

Hi, lewishe
From the error, It seems the IDF version which you used is very old. Could your tell me your IDF version and the complete log? Besides, could you check if the submodule is updated? Thanks.

chegewara
Posts: 2362
Joined: Wed Jun 14, 2017 9:00 pm

Re: Bluetooth wifi coexistence problem

Postby chegewara » Mon Oct 22, 2018 5:01 pm

Still this can be related to lack of heap. Try this to see how much heap you have and if you are using spiram at all:

Code: Select all

	heap_caps_print_heap_info(MALLOC_CAP_INTERNAL);
	heap_caps_print_heap_info(MALLOC_CAP_SPIRAM);
About 2 weeks ago ive got similar issue with ble + wifi coex (dont remember exact logs) and i fixed it with better handling heap usage.

User avatar
redradist
Posts: 30
Joined: Sat Apr 11, 2020 8:33 am

Re: Bluetooth wifi coexistence problem

Postby redradist » Thu Oct 08, 2020 9:00 am

Guys, do you have succeed ?

Does bluetooth and wifi work at the same time ?

jason.mao
Posts: 98
Joined: Mon Nov 19, 2018 2:05 am

Re: Bluetooth wifi coexistence problem

Postby jason.mao » Fri Oct 09, 2020 12:11 pm

Hi all,

ADF have already provide a coexistence example as

Code: Select all

https://github.com/espressif/esp-adf/tree/master/examples/advanced_examples/wifi_bt_ble_coex

User avatar
redradist
Posts: 30
Joined: Sat Apr 11, 2020 8:33 am

Re: Bluetooth wifi coexistence problem

Postby redradist » Sat Oct 10, 2020 7:50 am

jason.mao wrote:
Fri Oct 09, 2020 12:11 pm
Hi all,

ADF have already provide a coexistence example as

Code: Select all

https://github.com/espressif/esp-adf/tree/master/examples/advanced_examples/wifi_bt_ble_coex
It is nice, but there is no wifi_service in esp-idf ... (
And due to this I cannot figure out how to configure the same in esp-idf

User avatar
redradist
Posts: 30
Joined: Sat Apr 11, 2020 8:33 am

Re: Bluetooth wifi coexistence problem

Postby redradist » Sat Oct 10, 2020 11:32 am

jason.mao wrote:
Fri Oct 09, 2020 12:11 pm
Hi all,

ADF have already provide a coexistence example as

Code: Select all

https://github.com/espressif/esp-adf/tree/master/examples/advanced_examples/wifi_bt_ble_coex
With connection Ble and WiFi at the same time I got the following error:
```
LE connection complete. handle=0 role=1 paddrtype=1 addr=6d.77.b5.d5.54.40 local_rpa=0.0.0.0.0.0 peer_rpa=0.0.0.0.0.0 itvl=39 latency=0 spvn_tmo=500 mca=1
0x40 0x54 0xd5 0xb5 0x77 0x6d
connection established; status=0 handle=0 our_ota_addr_type=0 our_ota_addr=30:ae:a4:dd:9b:ee our_id_addr_type=0 our_id_addr=30:ae:a4:dd:9b:ee peer_ota_addr_type=1 peer_ota_addr=6d:77:b5:d5:54:40 peer_id_addr_type=1 peer_id_addr=6d:77:b5:d5:54:40 conn_itvl=39 conn_latency=0 supervision_timeout=500 encrypted=0 authenticated=0 bonded=0

ble_hs_hci_cmd_send: ogf=0x08 ocf=0x0007 len=0
0x07 0x20 0x00
Command complete: cmd_pkts=5 ogf=0x8 ocf=0x7 status=0
ble_hs_hci_cmd_send: ogf=0x08 ocf=0x0008 len=32
0x08 0x20 0x20 0x17 0x02 0x01 0x06 0x03 0x03 0x11 0x18 0x0c 0x09 0x73 0x74 0x75 0x66 0x66 0x2d 0x65 0x73 0x70 0x33 0x32 0x02 0x0a 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Command complete: cmd_pkts=5 ogf=0x8 ocf=0x8 status=0
GAP procedure initiated: advertise; disc_mode=2 adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=0 adv_itvl_max=0
ble_hs_hci_cmd_send: ogf=0x08 ocf=0x0006 len=15
0x06 0x20 0x0f 0x30 0x00 0x60 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x07 0x00
Command complete: cmd_pkts=5 ogf=0x8 ocf=0x6 status=0
ble_hs_hci_cmd_send: ogf=0x08 ocf=0x000a len=1
0x0a 0x20 0x01 0x01
Command complete: cmd_pkts=5 ogf=0x8 ocf=0xa status=0
ble_hs_hci_cmd_send: ogf=0x08 ocf=0x0016 len=2
0x16 0x20 0x02 0x00 0x00
Command Status: status=0 cmd_pkts=5 ocf=0x16 ogf=0x8
LE Remote Used Features. handle=0 feat=ff 00 00 00 00 00 00 00
LE Remote Connection Parameter Request. handle=0 min_itvl=6 max_itvl=6 latency=0 timeout=500
ble_hs_hci_cmd_send: ogf=0x08 ocf=0x0020 len=14
0x20 0x20 0x0e 0x00 0x00 0x06 0x00 0x06 0x00 0x00 0x00 0xf4 0x01 0x00 0x00 0x00 0x00
Command complete: cmd_pkts=5 ogf=0x8 ocf=0x20 status=0
ble_hs_hci_evt_acl_process(): conn_handle=0 pb=2 len=11 data=0x07 0x00 0x04 0x00 0x10 0x01 0x00 0xff 0xff 0x00 0x28
rxed att command: read group type req; conn=0 start_handle=0x0001 end_handle=0xffff
txed att command: read group type rsp; conn=0 length=6
host tx hci data; handle=0 length=24
ble_hs_hci_acl_tx(): 0x00 0x00 0x18 0x00 0x14 0x00 0x04 0x00 0x11 0x06 0x01 0x00 0x05 0x00 0x00 0x18 0x06 0x00 0x09 0x00 0x01 0x18 0x0a 0x00 0x0e 0x00 0x00 0x18
D (10445) CurrentSensor: count >= 1000: _voltage = 78mV


D (10449) NimBleGattChar: Connection handle: 0, Value handle: 24
GATT procedure initiated: notify; att_handle=24
txed att command: notify req; conn=0 handle=0x0018
host tx hci data; handle=0 length=15
ble_hs_hci_acl_tx(): 0x00 0x00 0x0f 0x00 0x0b 0x00 0x04 0x00 0x1b 0x18 0x00 0x4e 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Number of Completed Packets: num_handles=1
handle:0 pkts:1
ble_hs_hci_evt_acl_process(): conn_handle=0 pb=2 len=11 data=0x07 0x00 0x04 0x00 0x10 0x0f 0x00 0xff 0xff 0x00 0x28
rxed att command: read group type req; conn=0 start_handle=0x000f end_handle=0xffff
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.

Core 0 register dump:
PC : 0x4018fb33 PS : 0x00060530 A0 : 0x800e8b6b A1 : 0x3ffe2e80
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x3ffdbb90
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x800ebe80 A9 : 0x3ffe2e80
A10 : 0x3ffdbb90 A11 : 0x00000000 A12 : 0x3ffdbba8 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x00000008 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x4000c349 LEND : 0x4000c36b LCOUNT : 0xffffffff

Backtrace:0x4018fb30:0x3ffe2e80 0x400e8b68:0x3ffe2ea0 0x400ed82e:0x3ffe2ec0 0x400edc01:0x3ffe2f00 0x400ede12:0x3ffe2f30 0x400edefe:0x3ffe2f80 0x400eec33:0x3ffe2ff0 0x400e2645:0x3ffe3040 0x400e1b7e:0x3ffe3070 0x400e107d:0x3ffe30a0 0x400e108f:0x3ffe30c0 0x400ebc82:0x3ffe30e0 0x400d9712:0x3ffe3100 0x4008e741:0x3ffe3120
```

Who is online

Users browsing this forum: No registered users and 51 guests