hortinstein / node-dash-button

A small module to emit events when an Amazon Dash Button is pressed
949 stars 94 forks source link

Can't find the dash button using the libpcap library #22

Closed bsherertz closed 8 years ago

bsherertz commented 8 years ago

I'm having trouble trying to capture my dash button using "findbutton", but I know it works since it discovers another random iot device in my house every minute. I ruled out the device being the issue since I was able to see it using wireshark from the same linux mint vm (packet: AmazonTe_27:9f:69 (f0:27:2d:27:9f:69)).

Just to make sure it wasn't the configuration that was the issue, I changed the mac address to the device I mentioned above and it successfully connected and printed a message when the device connected (using dash-rickroll).

ecaron commented 8 years ago

Hi @bsherertz. Very impressive debugging! Can you provide a couple more pieces of background:

bsherertz commented 8 years ago

Thanks @ecaron and the information is below:

node version = 5.4.1 npm is 3.3.12 ifconfig:

eth0 Link encap:Ethernet HWaddr 00:0c:29:e9:59:c9
inet6 addr: fe80::20c:29ff:fee9:59c9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:296 errors:0 dropped:0 overruns:0 frame:0 TX packets:124 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21400 (21.4 KB) TX bytes:18459 (18.4 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:378 errors:0 dropped:0 overruns:0 frame:0 TX packets:378 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:39417 (39.4 KB) TX bytes:39417 (39.4 KB)

wlan0 Link encap:Ethernet HWaddr 00:02:6f:dc:95:c3
inet addr:192.168.1.114 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::202:6fff:fedc:95c3/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:7609 errors:0 dropped:0 overruns:0 frame:0 TX packets:7090 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3805441 (3.8 MB) TX bytes:877176 (877.1 KB)

It looks like there are 8 to 12 white blinks on average then around 3 to 4 red blinks followed by a longer red (this could be the issue). I did notice after trying wireshark inside my linux mint vm that it was unable to find the wireless dongle so this could be a driver issue (wireless works though from a usb dongle connected inside the vm using vmware). I'll try this with my ubuntu vm and see if this is the issue.

bsherertz commented 8 years ago

Wow...looks like I just had to restart the vm and plug the wifi adapter into another outlet. Please disregard the issue and thanks for the quick response.