Let the network tell you where you are
rachelbythebay.com
rachelbythebay.com
https://mastodon.social/@jwz/113209773692118053
(intentionally linked via Mastadon because he doesn't appreciate direct links from HN)
I sit with a pile of raspberry Pis I throw into different rooms about the house and want to stick assorted tasks on them. My open question was how can I just image them, plug them in and centrally configure what runs on them with no more sd card or Mac detection shenanigans when I change their job.
I’ll be giving this a try!
I think something similar exists on most processors
I mentioned it because the OP was going to use Mac addresses in a similar way, and only didn't because the Mac addresses of her machines were unstable.
But also, I was wondering if she was going to say, "these devices have cameras on them which are not used because they are pointed in random directions depending on how they are mounted". And then I was hoping to see an interesting image recognition task, "given this blurry, dim, random image, choose which location it probably came from".
I got nerd sniped to the power of 2.
Or microphone+speakers, where every device can self-assign an ID, echo it over speakers, and then everyone triangulates everyone else and themselves.
Somewhat related, years ago I worked in an office that switched to hot-desking, and I spent a while trying to figure out whether was there was a way to automatically generate a map of who was in the office, and whereabouts. Identifying an individual laptop is okay, but figuring out which docking station the laptop was plugged into was a lot trickier without admin access to network hardware (which I def didn't have). This approach may have allowed an individual laptop to figure out where it was, and then update a central location database.
Cool hack!
Depending on protocols nobody expects you to be depending on can be risky, particularly with all the pathologies of working with multi-team corp operations...
To some degree, beyond a tiny scale, building on CDP/LLDP is probably fighting uphill. From my perspective working with audio/visual (AV) teams and corporate IT, it's maybe safer to do your location and stream management out of band in some kind of overlay (app or network protocol), and just have the network serve you multicast streams that you request.
That is, a receiving device is programmed out of band (manually or by some management scripting) to subscribe to a particular IP multicast stream and the network's job is just delivery through IGMP+PIM. This is the rough model most AV technologies seem to be following, even to the point of collapsing receiver/decoder boxes into the TV itself.
But, sometimes there's nothing like scratching your own itch, though.
The protocol is old enough and very well established by now, even modern Windows boxes run it by default.