2017-09-05 06:17 AM
Hello,
I am working with stm32f4 discovery and linux systems.
We have a larger number of discovery boards that are interfaced via USB, and want to be able to connect to each one uniquely. I normally do that by using the attribute 'serial' that USB can give me, and I use the number in an udev-rule to get a unique devicename in /dev. An example of such a rule is:
SUBSYSTEM=='tty', ATTRS{idVendor}=='0483', ATTRS{idProduct}=='5740', ATTRS{serial}=='00000000001A', SYMLINK+='VHP100'
The problem is that this serial number is NOT fixed. It sometimes changes after a reboot. I have never seen this with other devices.
The question is, how can I fix/set this number? A cannot find anything in the CubeMX stuff about this.
UPDATE: The fact that the number changes suggests that it resides in software. Does anyone know where the value is set?
Thanks in advance,
Sietse
#stm32f4-usb-virtual-com-port-serial-attributeSolved! Go to Solution.
2017-09-19 12:45 AM
Via another question I found out that the serial number is fixed and can be set in the file Src/usbd_desc.c
2017-09-19 12:45 AM
Via another question I found out that the serial number is fixed and can be set in the file Src/usbd_desc.c