Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify with unique serial number #16

Open
sTywin opened this issue Jan 23, 2018 · 2 comments
Open

Identify with unique serial number #16

sTywin opened this issue Jan 23, 2018 · 2 comments

Comments

@sTywin
Copy link

sTywin commented Jan 23, 2018

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
Copy link
Author

sTywin commented Jan 23, 2018

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

@sTywin
Copy link
Author

sTywin commented Jan 24, 2018

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 :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant