Huy's Notes
Custom device name for Teensy

Custom device name for Teensy


Original: How to change Teensy 3.0 product name - PJRC Forum

By default, when you use Teensyduino, the device name will be appeared as USB Serial or something.

To change this to your own product name, create a new tab in Arduino IDE, name it something ending with .c, for example, metadata.c. Then put the following code:

#include "usb_names.h"
#define MANUFACTURER_NAME       {'S','n','a','c','k','y'}
#define PRODUCT_NAME          {'S','n','a','c','k','y','M','i','n','i'}
#define PRODUCT_NAME_LEN      10

struct usb_string_descriptor_struct usb_string_manufacturer_name = {  2 + MANUFACTURER_NAME_LEN * 2,  3,  MANUFACTURER_NAME};
struct usb_string_descriptor_struct usb_string_product_name = {  2 + PRODUCT_NAME_LEN * 2,  3,  PRODUCT_NAME};

Don't forget to set MANUFACTURER_NAME_LEN and PRODUCT_NAME_LEN to the actual length of your manufacturer/product name.

Referred in

If you think this note resonated, be it positive or negative, please feel free to send me an email and we can talk.