summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/librfid-tool.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/utils/librfid-tool.c b/utils/librfid-tool.c
index 910770f..449cb4c 100644
--- a/utils/librfid-tool.c
+++ b/utils/librfid-tool.c
@@ -334,9 +334,18 @@ static int do_scan(int first)
unsigned int size_len = sizeof(size);
if (first) {
- rh->reader->rf_power(rh, 0);
+ unsigned int opt;
+ unsigned int optlen = sizeof(opt);
+
+ /* turn off RF */
+ opt = 1;
+ rfid_reader_setopt(rh, RFID_OPT_RDR_RF_KILL, &opt, optlen);
+
usleep(10*1000);
- rh->reader->rf_power(rh, 1);
+
+ /* turn on RF */
+ opt = 0;
+ rfid_reader_setopt(rh, RFID_OPT_RDR_RF_KILL, &opt, optlen);
}
printf("scanning for RFID token...\n");
rc = rfid_scan(rh, &l2h, &ph);
personal git repositories of Harald Welte. Your mileage may vary