Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
QJ_500-7c
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
时昊
QJ_500-7c
Commits
f0bdf8cc
Commit
f0bdf8cc
authored
Sep 01, 2025
by
王金亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:变更点2:修改安卓系统手机先连接BLE蓝牙后连接经典蓝牙后无法连接问题
parent
57faad75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
gatts_table_creat_demo.c
qianjiang/main/gatts_table_creat_demo.c
+10
-2
No files found.
qianjiang/main/gatts_table_creat_demo.c
View file @
f0bdf8cc
...
...
@@ -256,7 +256,7 @@ 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
,
.
own_addr_type
=
BLE_ADDR_TYPE_
RANDOM
,
.
channel_map
=
ADV_CHNL_ALL
,
.
adv_filter_policy
=
ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY
,
};
...
...
@@ -666,7 +666,7 @@ static void gatts_profile_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_
{
switch
(
event
)
{
case
ESP_GATTS_REG_EVT
:{
//
esp_ble_gap_set_rand_addr(rand_addr);
esp_ble_gap_set_rand_addr
(
rand_addr
);
esp_err_t
set_dev_name_ret
=
esp_ble_gap_set_device_name
((
const
char
*
)
BT_Device_Name
);
if
(
set_dev_name_ret
){
ESP_LOGE
(
GATTS_TABLE_TAG
,
"set device name failed, error code = %x"
,
set_dev_name_ret
);
...
...
@@ -908,6 +908,14 @@ void Get_Mac_Init(void )
char
temp
[
10
]
=
{
0
};
char
temp1
[
20
]
=
{
0
};
esp_read_mac
(
ble_mac
,
ESP_MAC_BT
);
for
(
i
=
1
;
i
<
6
;
i
++
)
{
if
(
ble_mac
[
i
])
{
rand_addr
[
i
]
=
ble_mac
[
i
]
;
}
}
// printf("%d\n",temp);
for
(
i
=
6
;
i
>
0
;
i
--
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment