cantact-fw icon indicating copy to clipboard operation
cantact-fw copied to clipboard

Identify with unique serial number

Open sTywin opened this issue 7 years ago • 2 comments

According to the data sheet, the STM32F042x includes a 96-bit unique identifier. It would be great if the firmware exposed this unique identifier to the operating system when connected as a serial port, instead of relying on the OS assigning it an ID based on the port and order in which it is connected.

For example, on macOS, when I plug in a serialized FTDI USB to serial adapter, it shows up as /dev/tty.usbserial-########, where the ######## is unique for each physical adapter. I would love for each physical CANtact device to show up in a similar way with a consistent identifier.

sTywin avatar Jan 23 '18 19:01 sTywin

Here is an example of reading the STM32 unique identifier from C; I'm sure there are many others.

sTywin avatar Jan 23 '18 20:01 sTywin

It actually looks like the file Src/usbd_desc.c already has a function to get the device UUID, USBD_FS_SerialStrDescriptor. I just have no idea how to take that and make the OS recognize it :/

sTywin avatar Jan 24 '18 23:01 sTywin