1.发送端连接到接收端后,发送端每隔1s发送固定数据
2.每个发送端发送数据不同,如1,2,3……
3.连接数量宏定义已修改为9
4.使用了BLE5.0的特性
5.使用历程gattc_multi_connect和gatts_server就可以连接成功,查看它没开BLE5.0,但感觉不是这个导致的
6.有没有遇到这种情况的朋友?报的错误也没找到是什么含义
【已解决】ESP32-S3 蓝牙最大连接数量测试,目前只能连接4个,连接第5个报错
【已解决】ESP32-S3 蓝牙最大连接数量测试,目前只能连接4个,连接第5个报错
- Attachments
-
- 2.png (32.3 KiB) Viewed 2529 times
-
- 1.png (60.46 KiB) Viewed 2529 times
Last edited by llzzdd on Wed Oct 16, 2024 1:31 am, edited 3 times in total.
Re: ESP32-S3 蓝牙最大连接数量测试,目前只能连接4个,连接第5个报错
1.尝试用历程来修改,看是否是因为BLE5.0的原因导致连接不上第5个,
2.在gattc_multi_connect的历程中使能BLE5.0
3.扫描参数修改为ext_scan_params
static esp_ble_ext_scan_params_t ext_scan_params = {
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
.filter_policy = BLE_SCAN_FILTER_ALLOW_ALL,
.scan_duplicate = BLE_SCAN_DUPLICATE_DISABLE,
.cfg_mask = ESP_BLE_GAP_EXT_SCAN_CFG_UNCODE_MASK,
.uncoded_cfg = {BLE_SCAN_TYPE_ACTIVE, 160, 80}, // 400ms 20ms : 640, 32 100ms 50ms : 160, 80
.coded_cfg = {BLE_SCAN_TYPE_ACTIVE, 40, 40},
};
const esp_ble_gap_conn_params_t phy_1m_conn_params = {
.scan_interval = 0xa0, // 100ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10.24 seconds
.scan_window = 0x50, // 50ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10240 msec
.interval_min = 0x06, // 7.5ms connIntervalmin = Conn_Interval_Min * 1.25 ms Conn_Interval_Min range: 0x0006 to 0x0C80
.interval_max = 0x0c, // 15ms connIntervalmax = Conn_Interval_Max * 1.25 ms Conn_Interval_Max range: 0x0006 to 0x0C80
.latency = 0,
.supervision_timeout = 100,
.min_ce_len = 0,
.max_ce_len = 0,
};
4.然后也是,连接第四个后,再连接第5个报错
2024-10-15 10:08:54 W (355039) BT_HCI: btu_hcif_hdl_command_status,opcode:0x2043,status:0x3b
2024-10-15 10:08:54 W (355039) BT_APPL: gattc_conn_cb: if=1 st=0 id=1025 rsn=0x100
2024-10-15 10:08:54 W (355049) BT_APPL: gattc_conn_cb: if=2 st=0 id=1026 rsn=0x100
2024-10-15 10:08:54 W (355049) BT_APPL: gattc_conn_cb: if=3 st=0 id=1027 rsn=0x100
2024-10-15 10:08:54 E (355059) GATTC_MULTIPLE_DEMO: connect device failed, status 133
有没有技术人员可以回复下这是什么问题 ?
2.在gattc_multi_connect的历程中使能BLE5.0
3.扫描参数修改为ext_scan_params
static esp_ble_ext_scan_params_t ext_scan_params = {
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
.filter_policy = BLE_SCAN_FILTER_ALLOW_ALL,
.scan_duplicate = BLE_SCAN_DUPLICATE_DISABLE,
.cfg_mask = ESP_BLE_GAP_EXT_SCAN_CFG_UNCODE_MASK,
.uncoded_cfg = {BLE_SCAN_TYPE_ACTIVE, 160, 80}, // 400ms 20ms : 640, 32 100ms 50ms : 160, 80
.coded_cfg = {BLE_SCAN_TYPE_ACTIVE, 40, 40},
};
const esp_ble_gap_conn_params_t phy_1m_conn_params = {
.scan_interval = 0xa0, // 100ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10.24 seconds
.scan_window = 0x50, // 50ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10240 msec
.interval_min = 0x06, // 7.5ms connIntervalmin = Conn_Interval_Min * 1.25 ms Conn_Interval_Min range: 0x0006 to 0x0C80
.interval_max = 0x0c, // 15ms connIntervalmax = Conn_Interval_Max * 1.25 ms Conn_Interval_Max range: 0x0006 to 0x0C80
.latency = 0,
.supervision_timeout = 100,
.min_ce_len = 0,
.max_ce_len = 0,
};
4.然后也是,连接第四个后,再连接第5个报错
2024-10-15 10:08:54 W (355039) BT_HCI: btu_hcif_hdl_command_status,opcode:0x2043,status:0x3b
2024-10-15 10:08:54 W (355039) BT_APPL: gattc_conn_cb: if=1 st=0 id=1025 rsn=0x100
2024-10-15 10:08:54 W (355049) BT_APPL: gattc_conn_cb: if=2 st=0 id=1026 rsn=0x100
2024-10-15 10:08:54 W (355049) BT_APPL: gattc_conn_cb: if=3 st=0 id=1027 rsn=0x100
2024-10-15 10:08:54 E (355059) GATTC_MULTIPLE_DEMO: connect device failed, status 133
有没有技术人员可以回复下这是什么问题 ?
-
- Posts: 2
- Joined: Wed Aug 23, 2023 2:53 am
Re: 【求助】ESP32-S3 蓝牙最大连接数量测试,目前只能连接4个,连接第5个报错
广播和扫描也算连接数,或许还有其他功能也算在里面,可以关掉不用的蓝牙功能再看看
Re: 【求助】ESP32-S3 蓝牙最大连接数量测试,目前只能连接4个,连接第5个报错
【已解决】尝试增大了连接间隔,然后就可以连接上了
// const esp_ble_gap_conn_params_t phy_1m_conn_params = {
// .scan_interval = 0xa0, // 100ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10.24 seconds
// .scan_window = 0x50, // 50ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10240 msec
// .interval_min = 0x06, // 7.5ms connIntervalmin = Conn_Interval_Min * 1.25 ms Conn_Interval_Min range: 0x0006 to 0x0C80
// .interval_max = 0x0c, // 15ms connIntervalmax = Conn_Interval_Max * 1.25 ms Conn_Interval_Max range: 0x0006 to 0x0C80
// .latency = 0,
// .supervision_timeout = 100,
// .min_ce_len = 0,
// .max_ce_len = 0,
// };
const esp_ble_gap_conn_params_t phy_1m_conn_params = {
.scan_interval = 0xa0, // 100ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10.24 seconds
.scan_window = 0x50, // 50ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10240 msec
.interval_min = 0x0c, // 7.5ms connIntervalmin = Conn_Interval_Min * 1.25 ms Conn_Interval_Min range: 0x0006 to 0x0C80
.interval_max = 0x18, // 15ms connIntervalmax = Conn_Interval_Max * 1.25 ms Conn_Interval_Max range: 0x0006 to 0x0C80
.latency = 0,
.supervision_timeout = 100,
.min_ce_len = 0,
.max_ce_len = 0,
};
// const esp_ble_gap_conn_params_t phy_1m_conn_params = {
// .scan_interval = 0xa0, // 100ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10.24 seconds
// .scan_window = 0x50, // 50ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10240 msec
// .interval_min = 0x06, // 7.5ms connIntervalmin = Conn_Interval_Min * 1.25 ms Conn_Interval_Min range: 0x0006 to 0x0C80
// .interval_max = 0x0c, // 15ms connIntervalmax = Conn_Interval_Max * 1.25 ms Conn_Interval_Max range: 0x0006 to 0x0C80
// .latency = 0,
// .supervision_timeout = 100,
// .min_ce_len = 0,
// .max_ce_len = 0,
// };
const esp_ble_gap_conn_params_t phy_1m_conn_params = {
.scan_interval = 0xa0, // 100ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10.24 seconds
.scan_window = 0x50, // 50ms Range: 0x0004 to 0x4000 Default: 0x0010 (10 ms) Time = N * 0.625 msec Time Range: 2.5 msec to 10240 msec
.interval_min = 0x0c, // 7.5ms connIntervalmin = Conn_Interval_Min * 1.25 ms Conn_Interval_Min range: 0x0006 to 0x0C80
.interval_max = 0x18, // 15ms connIntervalmax = Conn_Interval_Max * 1.25 ms Conn_Interval_Max range: 0x0006 to 0x0C80
.latency = 0,
.supervision_timeout = 100,
.min_ce_len = 0,
.max_ce_len = 0,
};
Who is online
Users browsing this forum: No registered users and 17 guests