Combining arduino-udev with legacy code

#1

Hi everyone,

I would like to combine arduino-udev with the legacy code in order to have a unique name of every brewpi.
The idea of arduino-udev is to call a python callback script on device detection. The script then asks arduino for its name. Arduino sends its name back and this name is then used to create a symlink to the tty device.
For this reason I would like to ask, especially Elco, where could be the best position to fit a few bytes for the name. Somewhere inside EepromFormat?

Thanks

0 Likes

#2

Probably, at the end. But we discontinued the arduino version in 2015. I don’t want to invest time adding code or offering support for a code base I stopped working on 4 years ago.

0 Likes

#3

This is a tools-only problem in most cases.

You can awk for the udev block which contains ATTRS{maxchild}=="0" which (so far) I have found to be indicative of the block pertaining specifically to the Arduino. With a real Uno (or reasonably compatible clone) you can then grep for the “serial” line and use that to create a deterministic udev rules file.

The boards running the CH340 don’t seem to have a serial number, at least none of the ones I’ve tried have.

0 Likes