A C# Library to handle your amazon dash probing to execute custom actions.
When an Amazon Dash Button wakes up after being pushed, it introduces itself to the network via a small probe. By simply capturing this probe and raising some events, we can turn our dash button into our own internet of things device.
Follow the setup steps provided by Amazon, once you reach step 3 (selecting an item you want the dash to purchase), exit the app and uninstall it (it will bomb you with notifications otherwise)
Once the Dash Button has been connected to your wifi, any computer on your network can see it when it wakes up. By using this library you can write an application to handle it.
Using the library is easy
private static void Main(string[] args)
{
Console.Title = "DashSharp - Amazon Dash Button";
var network = new DashNetwork();
network.ListenerStarted += network_ListenerStarted;
network.DashButtonProbed += network_DashProbed;
try
{
network.StartListening();
}
catch (PcapMissingException)
{
Console.WriteLine("Pcap is missing, please install it.");
}
Console.Read();
}
Dash Buttons have two physical addresses, one for when they are waking up/pressed and the other for their sync attempt/shutting down. This library monitors for them, you have to handle the logic.
You'll neeed WinPcap on Windows and Pcap on Linux or OSX.
An interesting write up can be found here