From 9848386b83f5c9778f437d570680b802e75572a4 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Wed, 28 Oct 2026 13:44:49 -0500 Subject: [PATCH 1/2] fix(usb): identify the UF2 drive as Meshtastic The SCSI inquiry vendor reads Meshtast instead of Adafruit. --- changelog.md | 1 + src/usb/msc_uf2.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index d659f22a..3bba9563 100644 --- a/changelog.md +++ b/changelog.md @@ -25,6 +25,7 @@ provenance. - The lazy-erase packet buffer holds 16 packets instead of 8. Costs about 2 KB of `.bss`. - Hardening, no behavior change: `flash_nrf5x_write` splits a write that crosses a 4 KB page instead of running past its page buffer. The UF2 path accepts only 256 B blocks at 256 B-aligned addresses, so no current caller crosses a page. - A UF2 whose application blocks start below the installed SoftDevice's end and carry no SoftDevice (no block at 0x1000) is now rejected as WRONG FILE: every block of the file is rejected and nothing is written. An app-only image built for a different SoftDevice would have overwritten the last page of the installed one. SoftDevice+app images, app-only images at the application start, and `CURRENT.UF2` restores are unaffected; the check assumes the host writes the file front to back. +- The UF2 drive's SCSI inquiry vendor reads `Meshtast` (the field holds 8 characters) instead of `Adafruit`. The volume label, `INFO_UF2.TXT` and the USB descriptors are unchanged. ## OTAFIX 2.5 diff --git a/src/usb/msc_uf2.c b/src/usb/msc_uf2.c index d7261900..8a50f08b 100644 --- a/src/usb/msc_uf2.c +++ b/src/usb/msc_uf2.c @@ -89,7 +89,7 @@ void tud_msc_inquiry_cb(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16 { (void) lun; - const char vid[] = "Adafruit"; + const char vid[] = "Meshtast"; const char pid[] = "nRF UF2"; const char rev[] = "1.0"; From 82b6b9c5ba4102c4e635b33cbd76d1cbebc0a9b5 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Wed, 28 Oct 2026 14:22:47 -0500 Subject: [PATCH 2/2] fix(usb): report vendor Mesh, product Meshtastic UF2 --- changelog.md | 2 +- src/usb/msc_uf2.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 3bba9563..1c0b7b96 100644 --- a/changelog.md +++ b/changelog.md @@ -25,7 +25,7 @@ provenance. - The lazy-erase packet buffer holds 16 packets instead of 8. Costs about 2 KB of `.bss`. - Hardening, no behavior change: `flash_nrf5x_write` splits a write that crosses a 4 KB page instead of running past its page buffer. The UF2 path accepts only 256 B blocks at 256 B-aligned addresses, so no current caller crosses a page. - A UF2 whose application blocks start below the installed SoftDevice's end and carry no SoftDevice (no block at 0x1000) is now rejected as WRONG FILE: every block of the file is rejected and nothing is written. An app-only image built for a different SoftDevice would have overwritten the last page of the installed one. SoftDevice+app images, app-only images at the application start, and `CURRENT.UF2` restores are unaffected; the check assumes the host writes the file front to back. -- The UF2 drive's SCSI inquiry vendor reads `Meshtast` (the field holds 8 characters) instead of `Adafruit`. The volume label, `INFO_UF2.TXT` and the USB descriptors are unchanged. +- The UF2 drive's SCSI inquiry reads vendor `Mesh`, product `Meshtastic UF2` instead of `Adafruit`, `nRF UF2` (the vendor field holds 8 characters). The volume label, `INFO_UF2.TXT` and the USB descriptors are unchanged. ## OTAFIX 2.5 diff --git a/src/usb/msc_uf2.c b/src/usb/msc_uf2.c index 8a50f08b..521eab67 100644 --- a/src/usb/msc_uf2.c +++ b/src/usb/msc_uf2.c @@ -89,8 +89,8 @@ void tud_msc_inquiry_cb(uint8_t lun, uint8_t vendor_id[8], uint8_t product_id[16 { (void) lun; - const char vid[] = "Meshtast"; - const char pid[] = "nRF UF2"; + const char vid[] = "Mesh"; + const char pid[] = "Meshtastic UF2"; const char rev[] = "1.0"; memcpy(vendor_id , vid, strlen(vid));