| Crates.io | waveshare-barcodescanner |
| lib.rs | waveshare-barcodescanner |
| version | 0.1.0 |
| created_at | 2025-08-07 11:31:56.805867+00 |
| updated_at | 2025-08-07 11:31:56.805867+00 |
| description | Experimental crate for interacting with a Waveshare Barcode Scanner Module (UART mode) |
| homepage | https://github.com/ronnybremer/waveshare-barcodescanner-rs |
| repository | https://github.com/ronnybremer/waveshare-barcodescanner-rs.git |
| max_upload_size | |
| id | 1785156 |
| size | 63,097 |
A high-level interface for interacting with Waveshare Barcode Scanner modules.
The API is usable, but unstable and not very battle-tested; use at your own risk.
Please look at the provided examples on how to use this crate.
Make sure the scanner module is correctly wired to the UART pins (remember to switch RX/TX). A new scanner module - by default - sends barcode data via USB keyboard emulation. This crate expects data to be sent over UART, so the UART mode setup barcode has to be scanned and this setting saved to the flash.
Add the crate to Cargo.toml
cargo add waveshare-barcodescanner
Currently, Rust version 1.85.0 or later is required.
This crate should work with the following modules:
Please note that development and testing is done on the C revision of the module.
Currently, the main development and testing of the crate is performed on Linux - specifically Raspberry PI 5 on 64-bit Bookworm -, but other major platforms should also work.
All errors are wrapped into anyhow::Error.
This crate is using Tracing.
In your application you need to set up a tracing_subscriber in order to get log output. DEBUG and TRACE levels are available for troubleshooting.
Contributions are welcome, through issues and PRs.
The license for the original work is MIT.