1

I have two identical (but with different software) Arduinos connected to Linux box. Their serals are identical

# udevadm info -a -n /dev/ttyUSB1 | grep '{serial}'
    ATTRS{serial}=="0000:00:1d.0"

# udevadm info -a -n /dev/ttyUSB0 | grep '{serial}'
    ATTRS{serial}=="0000:00:1d.0"

Can I make these Arduinos to differ somehow programmatically?

3
  • What Arduinos do you have?
    – Majenko
    Dec 17, 2021 at 12:34
  • 2
    request some info over Serial
    – Juraj
    Dec 17, 2021 at 12:36
  • 1
    If you want the same firmware for both Arduinos, you could make a simple hardware solution: use a jumper and connect and input pin to select a 0V or 5V value as input. Dec 17, 2021 at 13:08

1 Answer 1

3

You can't change the USB information programmatically. The fact that you're referencing /dev/ttyUSB* means you have hardware USB interface chips (CH340, PL2302, FT232, etc) which you can't change from your sketch (some can be adjusted using tools provided by the chip manufacturer though, so you may be able to tweak it using that).

Instead your only option is to have some kind of "fingerprint" that software on your computer can request from your firmware. If you stick to a common serial protocol for all your firmwares you can implement a standard "Firmware Version" command which will respond with what code and version you have installed.

It's up to you to decide how best to implement such a system, of course.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.