- Notifications
You must be signed in to change notification settings - Fork1
Add Serial Number to Avahi Service for Board Deduplication#48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I didn't figure out that we needed to add another sudoers file for this feature, which I would avoid to do it. So I think we should change the approach here, and we could instead do that in a systemd unit that is triggered only on the first boot, e.g.,https://github.com/arduino/arduino-app-cli/blob/main/debian/arduino-app-cli/etc/systemd/system/arduino-burn-bootloader.service.
The Serial number of the board should not change, so we can do it just the first time you flash the board, and in there, you have all the permission to patch the Avahi service.
Motivation
A board connected via both USB and Network currently shows up as two separate devices in the board list. This makes it difficult for a client application to know it is the same physical board.
We need a way to "deduplicate" these entries by providing a common identifier, allowing the client to show just one entry for that board.
Change description
A simple approach is to add the board's serial number to its Avahi service file. This change will be made at runtime when the EnableNetworkMode function is executed.
Specifically, we will add a new containing the serial number (e.g., serial_number=YOUR_SERIAL) to the board's .service file.
Additional Notes
Reviewer checklist
main.