-
Notifications
You must be signed in to change notification settings - Fork 33
att over br modify patch #458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from 3 commits
3530ca4
8fee435
2f1eecf
72f845e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -409,10 +409,12 @@ static struct bt_sdp_record* gatt_sdp_create_record(struct bt_gatt_service* srv) | |||||||||
|
|
||||||||||
| gatt_record->srv = srv; | ||||||||||
| gatt_record->record = record; | ||||||||||
| break; | ||||||||||
| return record; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| return record; | ||||||||||
| free(attrs); | ||||||||||
| free(record); | ||||||||||
| return NULL; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| static void gatt_sdp_delete_record(struct bt_sdp_record* record) | ||||||||||
|
|
@@ -789,6 +791,7 @@ static bt_status_t do_gatts_disconnect(bt_controller_id_t id, bt_address_t* bd_a | |||||||||
| } | ||||||||||
|
|
||||||||||
| err = bt_att_br_disconnect(conn); | ||||||||||
| bt_conn_unref(conn); | ||||||||||
liuX10 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| if (err) { | ||||||||||
| BT_LOGE("%s, disconnect fail err:%d", __func__, err); | ||||||||||
| return BT_STATUS_FAIL; | ||||||||||
|
|
@@ -810,13 +813,16 @@ static void zblue_gatts_connected_callback(struct bt_conn* conn) | |||||||||
| bt_conn_get_info(conn, &info); | ||||||||||
| bt_addr_set(&addr, info.br.dst->val); | ||||||||||
|
|
||||||||||
| slot = bt_conn_find(&addr, BT_TRANSPORT_BREDR); | ||||||||||
| slot = bt_conn_add(&addr, BT_TRANSPORT_BREDR); | ||||||||||
| if (!slot) { | ||||||||||
| BT_LOGE("%s, conn slot null", __func__); | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. br conn |
||||||||||
| return; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| slot->conn = conn; | ||||||||||
| if (!slot->role) { | ||||||||||
| slot->role |= GATT_ROLE_SERVER; | ||||||||||
liuX10 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| } | ||||||||||
|
Comment on lines
+823
to
+825
|
||||||||||
| if (!slot->role) { | |
| slot->role |= GATT_ROLE_SERVER; | |
| } | |
| slot->role |= GATT_ROLE_SERVER; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is att over br, we have no gattc role to initial
liuX10 marked this conversation as resolved.
Show resolved
Hide resolved
liuX10 marked this conversation as resolved.
Show resolved
Hide resolved
liuX10 marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no le conn, find bredr conn
liuX10 marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this behavior is expected for BREDR, the LOG level here should not be set to warning; INFO is preferable.
liuX10 marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For BR/EDR-only operation, get_le_conn_from_addr() being NULL is expected; logging it as a warning can spam logs for frequent indications. Consider lowering this to debug, or only warning after both LE and BR lookups fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest add err log