waveshare-barcodescanner

Crates.iowaveshare-barcodescanner
lib.rswaveshare-barcodescanner
version0.1.0
created_at2025-08-07 11:31:56.805867+00
updated_at2025-08-07 11:31:56.805867+00
descriptionExperimental crate for interacting with a Waveshare Barcode Scanner Module (UART mode)
homepagehttps://github.com/ronnybremer/waveshare-barcodescanner-rs
repositoryhttps://github.com/ronnybremer/waveshare-barcodescanner-rs.git
max_upload_size
id1785156
size63,097
Ronny Bremer (ronnybremer)

documentation

README

Experimental crate for interacting with a Waveshare Barcode Scanner Module (UART mode)

Build status Documentation Package

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.

Changelog

Getting started

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

Minimum rustc version (MSRV)

Currently, Rust version 1.85.0 or later is required.

Hardware support

This crate should work with the following modules:

Please note that development and testing is done on the C revision of the module.

Platform support

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.

Error handling

All errors are wrapped into anyhow::Error.

Tracing support

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.

Contributing

Contributions are welcome, through issues and PRs.

The license for the original work is MIT.

Commit count: 0

cargo fmt