#rfid #usb-hid #usb #hid #barcode

usb-rfid-decoder

A simple character decoder for USB RFID readers

3 unstable releases

0.2.1 Aug 28, 2023
0.2.0 Aug 26, 2023
0.1.0 Aug 26, 2023

#1138 in Hardware support

Download history 46/week @ 2024-02-25 5/week @ 2024-03-10 1/week @ 2024-03-17 47/week @ 2024-03-31

53 downloads per month

MIT license

8KB
198 lines

Overview

Simple function to parse raw hex data from something like /dev/hidraw0 and return a card number. Works from products such as this

Example

[dependencies]
usb-rfid-decoder = "0.2.0"
use usb_rfid_decoder as decoder;

fn main() {
    const CARD: [u16; 11] = [
        0x27, 0x27, 0x27, 0x1f, 0x22, 0x20, 0x27, 0x24, 0x25, 0x22, 0x28,
    ];
    let result = decoder::decode(&CARD);
    println!("{:?}", result.unwrap());
}

References

No runtime deps