nicholascioli / rbroadlink

A broadlink library written in Rust. Based on https://github.com/mjg59/python-broadlink
https://crates.io/crates/rbroadlink
MIT License
3 stars 5 forks source link

Error with locked broadlink RM4 pro #9

Open skoky opened 4 months ago

skoky commented 4 months ago

I have a Broadlink RM4 Pro and I am getting this error with example:

cargo run --features="rbroadlink-cli" --example rbroadlink-cli info 10.0.10.32
warning: unused manifest key: target.cfg(target_os = "macos").rustflags
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s
     Running `target/debug/examples/rbroadlink-cli info 10.0.10.32`
Getting information for device at 10.0.10.32
thread 'main' panicked at /Users/lskokan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/block-padding-0.2.1/src/lib.rs:101:21:
attempt to subtract with overflow
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
manio commented 4 months ago

There is some "substract with overflow" error, isn't it also related with the bigger data size you reported in #8?

skoky commented 4 months ago

No, those two bugs are unrelated. I have forked your repo and did several fixes. It works with mine broadlink and not sure if it is properly fixed

skoky commented 3 months ago

I did some improvements of the lib in my fork https://github.com/skoky/rbroadlink Feel free to take changes you like into the lib