New Amazon Dash buttons not detected #36
Comments
Thanks for the detailed report and investigation! Dash Buttons update their firmware OTA I believe, so this fix applies to old Dash Buttons with the new firmware, too. |
This might take a little longer to fix since that filter applies to DHCP discovery and request packets, and we only want one of them or else the Dash Button handler might get invoked twice per press. The UDP packet payload contains the data needed to identify DHCP discovery packets, I have a bit to learn since I'm not familiar with the packet format though. |
Ahh, good to know that they can be remotely updated - something to keep in mind as more people buy dash buttons just to hack them! I couldn't see any DHCP Discovery packets here, but that must just be my network configuration... However, I think the following could be added to the filter spec to restrict it to DHCP Request packets only:
(I found this magic number floating around on the Internet, but confirmed it using WireShark - see image below. It does a 4-byte numeric comparison (has to be 1 byte, 4 bytes, etc.) which catches the last byte of the DHCP magic number, and verifies that the next 3 bytes are a "Request" message type option. I believe this is always the first option specified.) So the full filter could be something like:
|
The sad thing is that this error is why almost all scripts I find on google doesn't work on my computer. I was planning to give a presentation of IoT with this device but I don't think I'll be able as I've tried at least 5 scripts and none of them seem to work. If any of you wants to give me a hand I'll be much appreciated. |
@tommcintyre Thanks for the detailed investigation! I've tested it with a Dash Button of mine and published v2.0.0 to npm. @PabloOyarzo If you want dedicated support you should get the AWS IoT buttons (https://smile.amazon.com/dp/B01C7WE5WM) instead of the consumer-facing Dash Buttons. |
It appears that "new" model Dash buttons (they have finally been released in the UK, and I'm playing with one on the day of release) behave differently when connecting to the network than the previous models.
Rather than broadcasting an ARP request from
0.0.0.0
, they instead broadcast a DHCP request from0.0.0.0
. They do then send out ARP requests for other network devices (e.g. the gateway), but these have the source IP set to the address allocated to the device.The following patch to
build/ArpProbes.js
fixes this, and should properly handle both the new and old button varieties. Change:const ARP_PROBE_FILTER = 'arp src host 0.0.0.0';
to
const ARP_PROBE_FILTER = '(arp or (udp and src port 68 and dst port 67)) and src host 0.0.0.0';
(I believe
udp and src port 68 and dst port 67
is the most succinct way to filter DHCP request packets.)The text was updated successfully, but these errors were encountered: