mirror of
https://github.com/brmlab/brmdoor_libnfc.git
synced 2025-06-07 08:04:06 +02:00
Saver script if reader HW goes dead
This commit is contained in:
parent
8e36a89443
commit
7e5f4a3603
1 changed files with 12 additions and 0 deletions
12
brmdoor-forced-unlock.sh
Executable file
12
brmdoor-forced-unlock.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
# This is example script to force unlock the lock in case the reader HW is
|
||||
# dead, kernel driver misbehaves or reader cable is damaged.
|
||||
|
||||
export PIN=25
|
||||
|
||||
if [ '!' -d /sys/class/gpio/gpio$PIN ]; then
|
||||
echo $PIN > /sys/class/gpio/export
|
||||
echo out > /sys/class/gpio/gpio$PIN/direction
|
||||
fi
|
||||
|
||||
echo 1 > /sys/class/gpio/gpio$PIN/value; sleep 5; echo 0 > /sys/class/gpio/gpio$PIN/value
|
Loading…
Add table
Add a link
Reference in a new issue