Activity Forums Questions & Troubleshooting Retrieve device’s Serial Number, VID, PID and board type

  • Retrieve device’s Serial Number, VID, PID and board type

  • koderjan

    Member
    September 2, 2021 at 1:35 pm

    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!

  • Lukas

    Member
    September 30, 2021 at 7:44 am

    Hello,

    which “code” do you mean? The sketch for CONTROLLINO, or some custom build app for PC?

    Thanks,

    Lukas

    • koderjan

      Member
      September 30, 2021 at 8:18 am

      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 2 years, 6 months ago by  koderjan. Reason: Clarification
      • Lukas

        Member
        September 30, 2021 at 9:44 am

        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.

  • koderjan

    Member
    September 30, 2021 at 1:44 pm

    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.

    • Lukas

      Member
      October 22, 2021 at 7:26 am

      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.

Viewing 1 - 3 of 3 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now