ridiculousfish / one-second-dash Goto Github PK
View Code? Open in Web Editor NEWGently redirecting the Dash button through monitor mode
License: zlib License
Gently redirecting the Dash button through monitor mode
License: zlib License
Hi,
I notice a delay of around 3 seconds between the press of the dash button and the reaction of the script. Is there anything to improve this?
Also I notice the dash button then starts to blink red for a couple of seconds during which pressing it again will have no effect. I guess we have to live with this?
I noticed your script uses the command seq 10 to iterate phy1 to phy10. The problem is if it's phy0, it will not work.
I fixed this by changing the line to:
for IDX in $(seq 0 10); do
pi@raspberrypi:~/one-second-dash $ ./start.sh
+ [[ 2 -ne 2 ]]
+ CHANNEL=2
+ CAP_FIELD='Capabilities: 0x172'
+ PHYIDX=
++ seq 10
+ for IDX in '$(seq 10)'
+ iw phy phy1 info
+ grep -q 'Capabilities: 0x172'
+ PHYIDX=1
+ break
+ test -z 1
+ iw dev
+ grep -q wlan1
+ MONITOR_NAME=DoorbellMonitor
+ sudo iw dev DoorbellMonitor del
+ sudo iw phy phy1 interface add DoorbellMonitor type monitor
+ sudo ifconfig DoorbellMonitor up
+ sudo iw dev DoorbellMonitor set channel 2
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on DoorbellMonitor, link-type IEEE802_11_RADIO (802.11 plus radiotap header), capture size 256 bytes
18:37:48.534111 1.0 Mb/s 2417 MHz 11b -69dB signal antenna 1 Beacon (dash-door) [1.0* 2.0* 5.5* 11.0* 9.0 18.0 36.0 54.0 Mbit] ESS CH: 2, PRIVACY
Traceback (most recent call last):
File "./doorbell.py", line 41, in <module>
do_ring()
File "./doorbell.py", line 24, in do_ring
stdin=DEVNULL, stdout=DEVNULL, stderr=DEVNULL)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
./start.sh: line 24: break: only meaningful in a `for', `while', or `until' loop
pi@raspberrypi:~/one-second-dash $ 19 packets captured
19 packets received by filter
0 packets dropped by kernel
pi@raspberrypi:~/one-second-dash $
Not sure what's going on here, here is the output of a ls -al in case it helps:
pi@raspberrypi:~/one-second-dash $ ls -al
total 640
drwxr-xr-x 3 pi pi 4096 Oct 1 18:36 .
drwxr-xr-x 3 pi pi 4096 Oct 1 18:36 ..
-rwxr-xr-x 1 pi pi 1255 Sep 22 19:48 doorbell.py
-rw-r--r-- 1 pi pi 615120 Sep 22 19:48 doorbell.wav
drwxr-xr-x 8 pi pi 4096 Sep 22 19:48 .git
-rw-r--r-- 1 pi pi 844 Sep 22 19:48 LICENSE
-rw-r--r-- 1 pi pi 4370 Sep 22 19:48 README.md
-rwxr-xr-x 1 pi pi 843 Sep 22 19:48 setup_monitor_interface.sh
-rwxr-xr-x 1 pi pi 743 Oct 1 18:30 start.sh
i am having issues with the first part. I have checked details with iw phy but i have 3 capabilities fields
Band 1:
Capabilities: 0x1022
Band 2:
Capabilities: 0x1062
VHT Capabilities: 0x1020
i have tried all of these in the start.sh and none work.it does this in a loop
its running on a Pi3 B+
thanks
Hi,
Is there any built in way to perform different actions based on the MAC address of dash buttons?
Thanks,
Does this work with the built in wifi of the rpi 3?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.