Skip to content

Commit c5f3f42

Browse files
committed
Improve backward compatibility
Message IDs changed. Scan all re-introduced. Signed-off-by: Jens Rehhoff Thomsen <[email protected]>
1 parent 30072ef commit c5f3f42

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

app/src/message.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,13 @@ void message_handler(struct webusb_message *msg_ptr, uint16_t msg_length)
271271
msg_seq_no, msg_rc);
272272
break;
273273

274+
case MESSAGE_SUBTYPE_START_ALL_SCAN:
275+
LOG_DBG("START_ALL_SCAN (len %u)", msg_length);
276+
/* Currently not supported */
277+
message_send_return_code(MESSAGE_TYPE_RES, MESSAGE_SUBTYPE_START_ALL_SCAN,
278+
msg_seq_no, -1);
279+
break;
280+
274281
case MESSAGE_SUBTYPE_START_CSIS_SCAN:
275282
LOG_DBG("START_CSIS_SCAN (len %u)", msg_length);
276283
msg_rc = broadcast_assistant_start_scan(BROADCAST_ASSISTANT_SCAN_CSIS,

app/src/message.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ enum message_sub_type {
1919
/* CMD/RES (bit7 = 0) */
2020
MESSAGE_SUBTYPE_START_SINK_SCAN = 0x01,
2121
MESSAGE_SUBTYPE_START_SOURCE_SCAN = 0x02,
22-
MESSAGE_SUBTYPE_START_CSIS_SCAN = 0x03,
22+
MESSAGE_SUBTYPE_START_ALL_SCAN = 0x03,
2323
MESSAGE_SUBTYPE_STOP_SCAN = 0x04,
2424
MESSAGE_SUBTYPE_CONNECT_SINK = 0x05,
2525
MESSAGE_SUBTYPE_DISCONNECT_SINK = 0x06,
@@ -29,6 +29,7 @@ enum message_sub_type {
2929
MESSAGE_SUBTYPE_SET_VOLUME = 0x0A,
3030
MESSAGE_SUBTYPE_MUTE = 0x0B,
3131
MESSAGE_SUBTYPE_UNMUTE = 0x0C,
32+
MESSAGE_SUBTYPE_START_CSIS_SCAN = 0x0D,
3233

3334
MESSAGE_SUBTYPE_RESET = 0x2A,
3435

web/lib/message.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const MessageSubType = Object.freeze({
3232
// CMD/RES (MSB = 0)
3333
START_SINK_SCAN: 0x01,
3434
START_SOURCE_SCAN: 0x02,
35-
START_SET_MEMBER_SCAN: 0x03,
35+
START_ALL_SCAN: 0x03,
3636
STOP_SCAN: 0x04,
3737
CONNECT_SINK: 0x05,
3838
DISCONNECT_SINK: 0x06,
@@ -42,6 +42,7 @@ export const MessageSubType = Object.freeze({
4242
SET_VOLUME: 0x0A,
4343
MUTE: 0x0B,
4444
UNMUTE: 0x0C,
45+
START_SET_MEMBER_SCAN: 0x0D,
4546

4647
RESET: 0x2A,
4748

0 commit comments

Comments
 (0)