Project

General

Profile

Revision ec0eab37

IDec0eab370bfb490370dfe3675708edcf9b18d4f0
Parent ae250f1a
Child 7bdb98c5

Added by Thomas Mullins over 11 years ago

Added script to read from rfid reader

View differences:

util/read
1
#!/bin/bash
2

  
3
stty 9600 raw < /dev/ttyUSB0
4
#-echo -echok -icrnl -ixon -icanon -opost -onlcr 
5

  
6
xxd -r readhex > /dev/ttyUSB0
7

  
8
sleep 0.1
9

  
10
response=`head -c 5 /dev/ttyUSB0`
11
ok=`printf "\001"`
12

  
13
if [ ${response:0:1} = $ok ]; then
14
  echo -n ${response:1} | xxd
15
else
16
  # if it failed, it hangs waiting for more characters anyway, so this never
17
  # happens unless the serial port is missing :(
18
  echo Failed.
19
fi
util/readhex
1
0 21 52 57 01 20
util/serno-list
1
02 3a ca 17
2
02 3a ca 24
3
02 3a cb 5c
4
02 3a cb f6
5
02 3a ca 18

Also available in: Unified diff