fix: use upstream dongle firmware

Use the common xow_dongle.bin image from the upstream driver for the
GUI session instead of selecting the older 02E6-specific image. Update
the firmware download script and plan to document the same upstream flow.
Keep the extended RX diagnostics used to inspect controller discovery.

Co-Authored-By: openai/gpt-5.6-luna: traced firmware and pairing behavior
This commit is contained in:
portersky
2026-08-29 12:35:50 +02:00
parent 5fd1b3a11f
commit baebcb73c2
5 changed files with 16 additions and 25 deletions
+5 -7
View File
@@ -85,12 +85,10 @@ std::mutex session_mutex; // guards current_session
// 802.11 management frame header length (three addresses, no extensions).
constexpr std::size_t k_mgmt_hdr_len = 24;
// Select the firmware image for a product ID: firmware/xone_dongle_<pid>.bin.
auto firmware_path_for(std::uint16_t pid) -> std::string
// Upstream xone loads one common firmware image for every dongle PID.
auto firmware_path_for(std::uint16_t) -> std::string
{
char path[64];
std::snprintf(path, sizeof(path), "firmware/xone_dongle_%04x.bin", pid);
return path;
return "firmware/xow_dongle.bin";
}
} // namespace
@@ -117,9 +115,9 @@ auto xone_dongle::process_message(void const *data, std::size_t len) -> void
// Strip the header + trailer.
buf = buf.subspan(cmd_hdr_len, len - 2 * cmd_hdr_len);
char hex[64] = "";
char hex[192] = "";
int off = 0;
for (std::size_t i = 0; i < buf.size() && i < 16 && off < 48; ++i)
for (std::size_t i = 0; i < buf.size() && i < 48 && off < 144; ++i)
off += std::snprintf(hex + off, sizeof(hex) - off, "%02x ", buf[i]);
xone::log_msg(xone::log_level::debug,
"api: rx info=0x%08x port=%d len=%zu %s",
+2 -2
View File
@@ -140,9 +140,9 @@ auto main(int argc, char **argv) -> int
auto on_frame = [](std::uint8_t ep, void const *data, std::size_t len) {
auto const *p = static_cast<std::uint8_t const *>(data);
std::fprintf(stderr, "[in] ep=0x%02x len=%zu: ", ep, len);
for (std::size_t i = 0; i < len && i < 32; i++)
for (std::size_t i = 0; i < len && i < 512; i++)
std::fprintf(stderr, "%02x", p[i]);
if (len > 32)
if (len > 512)
std::fprintf(stderr, "...");
std::fprintf(stderr, "\n");
};