| Crates.io | r200_uhf |
| lib.rs | r200_uhf |
| version | 0.4.0 |
| created_at | 2025-10-18 19:12:06.555847+00 |
| updated_at | 2025-11-15 08:34:38.504678+00 |
| description | Implementation of serial protocol for reading R200 UHF chip |
| homepage | |
| repository | https://github.com/oniram88/r200_uhf |
| max_upload_size | |
| id | 1889547 |
| size | 2,367,330 |
[dependencies]
r200_uhf = "0.3"
serialport = "4.8"
This repo includes an example that opens a serial port, configures power, and continuously reads tags.
Linux/macOS example: cargo run --example std_pc_serial -- /dev/ttyUSB0 115200
Windows example (port name may vary): cargo run --example std_pc_serial -- COM3 115200
Notes
Minimal usage example (library)
use r200_uhf::Connector;
use std::time::Duration;
use serialport;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Open the serial port to the R200 module
let port = serialport::new("/dev/ttyUSB0", 115200)
.timeout(Duration::from_millis(500))
.open()?;
// Create the Connector
let mut conn = Connector::new(port);
// Query some information
let _info = conn.get_module_info()?;
// Read tags once
let tags = conn.single_polling_instruction()?;
for t in tags {
println!("{}", t); // Rfid implements Display
// Access UID as hex string: t.uid()
}
Ok(())
}
Legal and safety note
License