From 7358a81d111d52053acb1f42b8a024168be883df Mon Sep 17 00:00:00 2001 From: awalol Date: Tue, 5 May 2026 21:14:29 +0800 Subject: [PATCH] fix: DSE Profile Save. Thanks @fuhuasxflwb --- src/bt.cpp | 9 ++++++++- src/main.cpp | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/bt.cpp b/src/bt.cpp index 3c4e180..c390927 100644 --- a/src/bt.cpp +++ b/src/bt.cpp @@ -480,7 +480,14 @@ vector get_feature_data(uint8_t reportId, uint16_t len) { if (feature_data.contains(reportId)) { ret = feature_data[reportId]; } - if (!feature_data.contains(reportId) || reportId == 0x81) { + if (!feature_data.contains(reportId) || + // Get Test Command Result + reportId == 0x81 || + // DSE: Set Profile Save? + reportId == 0x63 || + reportId == 0x65 || + reportId == 0x64 + ) { if (hid_control_cid != 0) { uint8_t get_feature[] = {0x43, reportId}; l2cap_send(hid_control_cid, get_feature, sizeof(get_feature)); diff --git a/src/main.cpp b/src/main.cpp index 7ad248b..cd46262 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -154,7 +154,11 @@ void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t rep } } } - if (report_id == 0x80) { + if (report_id == 0x80 || + // DSE: Write Profile Block + report_id == 0x60 || + report_id == 0x62 || + report_id == 0x61) { set_feature_data(report_id,const_cast(buffer),bufsize); return; }