From 9a688224d0b19a7b4d33c8bb767d0486d5b1bccd Mon Sep 17 00:00:00 2001 From: Jerzy Kasenberg Date: Fri, 15 Oct 2021 13:47:49 +0200 Subject: [PATCH] msc examples: Extend serial number to 12 digits USB3CV tool complains about too short serial number being used in MSC device. This just extends serial number to 12 characters, it makes it easier to analyze USB3CV logs where this unnecessary warning made output red. Offending warning: Serial Number string for MSC device : iSerialNumber = 0x3 Checking iSerialNumber String Descriptor: index = 0x03. String Descriptor : "123456". (ENGLISH_US) Using Language ID 0x409 MSC Serial Number length = 14 Invalid MSC Serial Number length : should be >= 26 ************************* Invalid MSC Serial Number length ************************* ************************* (MSC: 5.1.2) Serial number must be a string, 12 characters or longer (if the device supports a BOT interface, bInterfaceProtocol = 0x50), or exactly 12 characters long (if the device supports a CBI interface, bInterfaceProtocol = 0x00 or 0x01, and has a serial number). --- examples/device/cdc_msc/src/usb_descriptors.c | 2 +- examples/device/cdc_msc_freertos/src/usb_descriptors.c | 2 +- examples/device/msc_dual_lun/src/usb_descriptors.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/device/cdc_msc/src/usb_descriptors.c b/examples/device/cdc_msc/src/usb_descriptors.c index 34537b8f0..524c5bfb4 100644 --- a/examples/device/cdc_msc/src/usb_descriptors.c +++ b/examples/device/cdc_msc/src/usb_descriptors.c @@ -232,7 +232,7 @@ char const* string_desc_arr [] = (const char[]) { 0x09, 0x04 }, // 0: is supported language is English (0x0409) "TinyUSB", // 1: Manufacturer "TinyUSB Device", // 2: Product - "123456", // 3: Serials, should use chip ID + "123456789012", // 3: Serials, should use chip ID "TinyUSB CDC", // 4: CDC Interface "TinyUSB MSC", // 5: MSC Interface }; diff --git a/examples/device/cdc_msc_freertos/src/usb_descriptors.c b/examples/device/cdc_msc_freertos/src/usb_descriptors.c index f3ff305f8..9585822a3 100644 --- a/examples/device/cdc_msc_freertos/src/usb_descriptors.c +++ b/examples/device/cdc_msc_freertos/src/usb_descriptors.c @@ -218,7 +218,7 @@ char const* string_desc_arr [] = (const char[]) { 0x09, 0x04 }, // 0: is supported language is English (0x0409) "TinyUSB", // 1: Manufacturer "TinyUSB Device", // 2: Product - "123456", // 3: Serials, should use chip ID + "123456789012", // 3: Serials, should use chip ID "TinyUSB CDC", // 4: CDC Interface "TinyUSB MSC", // 5: MSC Interface }; diff --git a/examples/device/msc_dual_lun/src/usb_descriptors.c b/examples/device/msc_dual_lun/src/usb_descriptors.c index 7e194ea7a..2afd391af 100644 --- a/examples/device/msc_dual_lun/src/usb_descriptors.c +++ b/examples/device/msc_dual_lun/src/usb_descriptors.c @@ -141,7 +141,7 @@ char const* string_desc_arr [] = (const char[]) { 0x09, 0x04 }, // 0: is supported language is English (0x0409) "TinyUSB", // 1: Manufacturer "TinyUSB Device", // 2: Product - "123456", // 3: Serials, should use chip ID + "123456789012", // 3: Serials, should use chip ID }; static uint16_t _desc_str[32];