From cbc76558cd3308478b00bc6267992b273b0e39bd Mon Sep 17 00:00:00 2001 From: Vynull App Date: Wed, 14 Oct 2026 19:32:41 +0000 Subject: [PATCH] dbserver: name 0x3007 as set filter on/off, not media info Decks send 0x3007 before each root menu request, and we labelled it "mount/media info". link-spec's static analysis shows it is CMD_SET_FILTER_ONOFF: rekordbox dispatches it to PSvDBMain::OnFilterCmd as the first of its filter commands (0x3007 to 0x3407), and XDJ-RR firmware sends it from dbcl_SetFilterOnOff. Rename the handler, document the evidence, and log the request's arguments so a deck session shows what the deck asks for. The reply is unchanged: rekordbox's has not been captured, and decks accept our plain success. --- dbserver/handler.go | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/dbserver/handler.go b/dbserver/handler.go index fc8f3fa..a31c008 100644 --- a/dbserver/handler.go +++ b/dbserver/handler.go @@ -219,8 +219,8 @@ func (h *Handler) Handle(msg *proto.DBMessage) []*proto.DBMessage { switch msg.Type { case proto.DBMsgSetup: return h.handleSetup(msg) - case 0x3007: // mount/media info - return h.handleMediaInfo(msg) + case 0x3007: // set filter on/off (CMD_SET_FILTER_ONOFF) + return h.handleSetFilterOnOff(msg) case proto.DBMsgRootMenu: // 0x1000 return h.handleRootMenu(msg) case 0x3e03: // NXS2 extension @@ -508,9 +508,20 @@ func (h *Handler) handleSetup(msg *proto.DBMessage) []*proto.DBMessage { }} } -func (h *Handler) handleMediaInfo(msg *proto.DBMessage) []*proto.DBMessage { - dlog.Debugf("dbserver: media info (0x3007)") - // Respond: success with [echo_type, 0] — matches the CDJ +// handleSetFilterOnOff handles 0x3007, which decks send before each root +// menu request. It is the first of rekordbox's filter commands (0x3007 to +// 0x3407 in 0x100 steps, dispatched by PSvDBMain::OnFilterCmd), and XDJ-RR +// firmware sends it from dbcl_SetFilterOnOff (link-spec's static analysis +// in docs/LINK_EXPORT_REQUEST_VOCABULARY.md and +// data/static-analysis/xdj-rr-client-navigation.json). We keep no filter +// state, so it is only acknowledged. rekordbox's reply has not been +// captured; this plain success is what decks have always accepted from us. +func (h *Handler) handleSetFilterOnOff(msg *proto.DBMessage) []*proto.DBMessage { + argVals := make([]string, len(msg.Args)) + for i, a := range msg.Args { + argVals[i] = fmt.Sprintf("0x%08x", a.Int()) + } + dlog.Debugf("dbserver: set filter on/off (0x3007) args=%v", argVals) return []*proto.DBMessage{{ TxID: msg.TxID, Type: proto.DBMsgSuccess,