Here is the situation. Let's say there is a set of small devices supplied with an audio 3.5 mm jack. Each of these devices represent sort of a unique hardware key value (say just a number or a string). Let's also say there's is an iPhone/Android app, that needs to detect that one of these devices is plugged in on start up or the plug-in status (unplugging one device, and plugging in another) has changed. The app should have the full knowledge of whether any is plugged in, and if yes – which one exactly. There is no other interaction needed so far.
What would be the easiest (for a guy, who never dealt with any kind of hardware) and the cheapest (in production of such 3.5 mm pluggable devices) solution for the situation.
I've searched around, and most of the examples are quite complex and are about more sophisticated devices, like external sensors, programmable microcontrollers (Arduino, Hijack, etc.), which seems a bit of an overkill to me. But correct me if that's the way to go.
Best Answer
Assumption: The desired end-product is some form of hardware identification / copy-protection dongle for software to run on a smartphone.
Going from simple to more reliable, here are two options:
Sound ping-back: Pure analog, no microcontroller
Unique ID Challenge-Acknowledge via audio. Uses a low-power microcontroller.