Activity › Forums › Questions & Troubleshooting › Retrieve device’s Serial Number, VID, PID and board type
-
Retrieve device’s Serial Number, VID, PID and board type
-
Hello,
Via the “Board Info” menu option in Arduino IDE I can get information like Serial Number, PID, VID about the board which is connected to the selected COM port.
How can I retrieve this same information in my code?
Thanks!
-
Hello,
which “code” do you mean? The sketch for CONTROLLINO, or some custom build app for PC?
Thanks,
Lukas
-
I mean a sketch for CONTROLLINO.
For example on ESP32 you have a function “ESP.getChipId” or “ESP.getEfuseMac” which returns the serial number or mac address of the device.
- This reply was modified 3 years, 2 months ago by koderjan. Reason: Clarification
-
Not possible in CONTROLLINO because the USB is handled by another microcontroller Atmega16U2 (like on Arduino MEGA or UNO). As far as I know the sketch is not able to directly communicate with this chip.
-
-
Lukas, thank you very much for your answer.
So there is no way to uniquely identify a Controllino device from within a sketch?
The reason why I’m asking is because we have put a lot of effort into the development of a sketch and want introduce a license mechanism to avoid that sketch is downloaded from one device and uploaded onto another.
-
Hi Jan, I am afraid that Atmega MCUs do not have an unique ID. But you can store some hidden magic number into EEPROM (by another sketch) and then check it from your sketch. This thread may help you.
-
Log in to reply.