esp 使用几次后蓝牙搜索不到问题?

yunji_2.4G
Posts: 9
Joined: Fri Sep 20, 2019 7:41 am

esp 使用几次后蓝牙搜索不到问题?

Postby yunji_2.4G » Tue May 19, 2020 5:14 am

我公司使用esp32作为蓝牙设备,现在发现的问题如下:
1、生产完毕后蓝牙搜索不到。这种情况没有进行过其他软件方面的检测,硬件方面检测和处理后仍然搜不到;
2、用户使用几次后,蓝牙搜索不到。
2.1 退回公司后,发现Android搜索不到,苹果lightblue可以搜索到连接不了。
2.2 重新烧写ble_spp_server测试:Android搜索不到,苹果lightblue可以搜索到连接不了。
2.3 重新烧写gatt_server_service_table测试:Android搜索不到,苹果lightblue可以搜索到连接不了。
2.4 重新烧写ble_spp_client测试:esp32可以搜索到其他外围设备
2.5 WiFi AP可以使用,蓝牙打印信息正常,为报错。

请问,这是什么原因?如何避免?现在大概1%出现几率

Weijian-Espressif
Posts: 29
Joined: Wed Aug 09, 2017 6:16 am

Re: esp 使用几次后蓝牙搜索不到问题?

Postby Weijian-Espressif » Tue May 19, 2020 8:07 am

Hi,
1. 请提供你们使用的 IDF 版本信息和 gatt_server_service_table example 的测试 log 信息.
2. 在 gatt_server_service_table example 中将 adv_params 参数中 adv_type 设置为 ADV_TYPE_NONCONN_IND, 重新烧录后测试 Android 手机是否能搜索到设备广播
static esp_ble_adv_params_t adv_params = {
.adv_int_min = 0x20,
.adv_int_max = 0x40,
.adv_type = ADV_TYPE_NONCONN_IND,
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
.channel_map = ADV_CHNL_ALL,
.adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
};

yunji_2.4G
Posts: 9
Joined: Fri Sep 20, 2019 7:41 am

Re: esp 使用几次后蓝牙搜索不到问题?

Postby yunji_2.4G » Thu May 21, 2020 8:44 am

感谢您的回复,以下是我测试结果和打印信息,

static esp_ble_adv_params_t adv_params = {
.adv_int_min = 0x20,
.adv_int_max = 0x40,
.adv_type = ADV_TYPE_IND,
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
.channel_map = ADV_CHNL_ALL,
.adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
};
这种情况搜索不到蓝牙,打印信息如下:
rst:0x1 (POWERON_RESET),boot:0x12 (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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6184
load:0x40078000,len:10180
load:0x40080400,len:6640
entry 0x40080760
I (29) boot: ESP-IDF v3.2 2nd stage bootloader
I (29) boot: compile time 12:01:59
I (40) boot: Enabling RNG early entropy source...
I (40) boot: SPI Speed : 40MHz
I (40) boot: SPI Mode : DIO
I (44) boot: SPI Flash Size : 8MB
I (48) boot: Partition Table:
I (51) boot: ## Label Usage Type ST Offset Length
I (58) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (66) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (73) boot: 2 factory factory app 00 00 00010000 00100000
I (81) boot: End of partition table
I (85) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x22cc4 (142532) map
I (144) esp_image: segment 1: paddr=0x00032cec vaddr=0x3ffbdb60 size=0x02bb4 ( 11188) load
I (149) esp_image: segment 2: paddr=0x000358a8 vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at /Users/apple/esp/esp-who/esp-idf/components/freertos/xtensa_vectors.S:1779

I (151) esp_image: segment 3: paddr=0x00035cb0 vaddr=0x40080400 size=0x0a360 ( 41824) load
I (177) esp_image: segment 4: paddr=0x00040018 vaddr=0x400d0018 size=0x7d014 (512020) map
0x400d0018: _flash_cache_start at ??:?

I (357) esp_image: segment 5: paddr=0x000bd034 vaddr=0x4008a760 size=0x07be8 ( 31720) load
0x4008a760: phy_force_wifi_chan at ??:?

I (381) boot: Loaded app from partition at offset 0x10000
I (381) boot: Disabling RNG early entropy source...
I (381) cpu_start: Pro cpu up.
I (385) cpu_start: Starting app cpu, entry point is 0x40081024
0x40081024: call_start_cpu1 at /Users/apple/esp/esp-who/esp-idf/components/esp32/cpu_start.c:246

I (0) cpu_start: App cpu up.
I (395) heap_init: Initializing. RAM available for dynamic allocation:
I (402) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (408) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (414) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (420) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM
I (426) heap_init: At 3FFC97F0 len 00016810 (90 KiB): DRAM
I (433) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (439) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (445) heap_init: At 40092348 len 0000DCB8 (55 KiB): IRAM
I (452) cpu_start: Pro cpu start user code
I (134) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (221) BTDM_INIT: BT controller compile version [ae47c48]
I (221) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (291) phy: phy_version: 4008, c9ae59f, Jan 25 2019, 16:54:06, 0, 0
I (681) GATTS_TABLE_DEMO: create attribute table successfully, the number handle = 8

I (681) GATTS_TABLE_DEMO: SERVICE_START_EVT, status 0, service_handle 40
I (681) GATTS_TABLE_DEMO: advertising start successfully

---------------------------------------------------------------------------------------------------------
static esp_ble_adv_params_t adv_params = {
.adv_int_min = 0x20,
.adv_int_max = 0x40,
.adv_type = ADV_TYPE_NONCONN_IND,
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
.channel_map = ADV_CHNL_ALL,
.adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
};
这种情况,可以搜索到,但是无法连接,我们无法使用。打印信息如下
rst:0x1 (POWERON_RESET),boot:0x12 (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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6184
load:0x40078000,len:10180
load:0x40080400,len:6640
entry 0x40080760
I (29) boot: ESP-IDF v3.2 2nd stage bootloader
I (29) boot: compile time 12:01:59
I (40) boot: Enabling RNG early entropy source...
I (40) boot: SPI Speed : 40MHz
I (40) boot: SPI Mode : DIO
I (44) boot: SPI Flash Size : 8MB
I (48) boot: Partition Table:
I (51) boot: ## Label Usage Type ST Offset Length
I (58) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (66) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (73) boot: 2 factory factory app 00 00 00010000 00100000
I (81) boot: End of partition table
I (85) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x22cc4 (142532) map
I (144) esp_image: segment 1: paddr=0x00032cec vaddr=0x3ffbdb60 size=0x02bb4 ( 11188) load
I (149) esp_image: segment 2: paddr=0x000358a8 vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at /Users/apple/esp/esp-who/esp-idf/components/freertos/xtensa_vectors.S:1779

I (151) esp_image: segment 3: paddr=0x00035cb0 vaddr=0x40080400 size=0x0a360 ( 41824) load
I (177) esp_image: segment 4: paddr=0x00040018 vaddr=0x400d0018 size=0x7d014 (512020) map
0x400d0018: _flash_cache_start at ??:?

I (357) esp_image: segment 5: paddr=0x000bd034 vaddr=0x4008a760 size=0x07be8 ( 31720) load
0x4008a760: phy_force_wifi_chan at ??:?

I (381) boot: Loaded app from partition at offset 0x10000
I (381) boot: Disabling RNG early entropy source...
I (381) cpu_start: Pro cpu up.
I (385) cpu_start: Starting app cpu, entry point is 0x40081024
0x40081024: call_start_cpu1 at /Users/apple/esp/esp-who/esp-idf/components/esp32/cpu_start.c:246

I (0) cpu_start: App cpu up.
I (395) heap_init: Initializing. RAM available for dynamic allocation:
I (402) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (408) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (414) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (420) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM
I (426) heap_init: At 3FFC97F0 len 00016810 (90 KiB): DRAM
I (433) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (439) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (445) heap_init: At 40092348 len 0000DCB8 (55 KiB): IRAM
I (452) cpu_start: Pro cpu start user code
I (134) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (221) BTDM_INIT: BT controller compile version [ae47c48]
I (221) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (291) phy: phy_version: 4008, c9ae59f, Jan 25 2019, 16:54:06, 0, 0
I (681) GATTS_TABLE_DEMO: create attribute table successfully, the number handle = 8

I (681) GATTS_TABLE_DEMO: SERVICE_START_EVT, status 0, service_handle 40
I (691) GATTS_TABLE_DEMO: advertising start successfully

Weijian-Espressif
Posts: 29
Joined: Wed Aug 09, 2017 6:16 am

Re: esp 使用几次后蓝牙搜索不到问题?

Postby Weijian-Espressif » Thu May 21, 2020 9:38 am

Hi.
请提供你现在使用的 IDF 版本信息, 谢谢. 另外为了尽快解决您的问题, 请联系我们, 我们会安排资源协助您解决问题.

yunji_2.4G
Posts: 9
Joined: Fri Sep 20, 2019 7:41 am

Re: esp 使用几次后蓝牙搜索不到问题?

Postby yunji_2.4G » Fri May 22, 2020 1:59 am

boot: ESP-IDF v3.2 2nd stage bootloader

打印信息里的版本号不对吗?

yunji_2.4G
Posts: 9
Joined: Fri Sep 20, 2019 7:41 am

Re: esp 使用几次后蓝牙搜索不到问题?

Postby yunji_2.4G » Mon May 25, 2020 3:07 am

您好!请问如何联系贵公司。微信:15122994002

ESP_Alvin
Posts: 211
Joined: Thu May 17, 2018 2:26 am

Re: esp 使用几次后蓝牙搜索不到问题?

Postby ESP_Alvin » Mon May 25, 2020 3:23 am

Hi yunji_2.4G,

您可以发邮件至 sales@espressif.com,谢谢。

yunji_2.4G
Posts: 9
Joined: Fri Sep 20, 2019 7:41 am

Re: esp 使用几次后蓝牙搜索不到问题?

Postby yunji_2.4G » Mon May 25, 2020 3:28 am

非常感谢!

Who is online

Users browsing this forum: No registered users and 14 guests