rust-embedded / rust-embedded/linux-embedded-hal
2 Writes give "Operation not supported on transport endpoint"
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 319
- Forks
- 60
- Avg merge
- 12h 31m
- Merged PRs (30d)
- 1
Description
I was trying to get the examples in https://github.com/alexeden/adafruit-seesaw to work on linux but i kept getting errors
I managed to track down the problem to this MVP example
use embedded_hal::i2c::{Error, I2c, Operation};
use linux_embedded_hal::{Delay, I2CError, I2cdev, i2cdev::core::I2CDevice};
fn main() {
let mut i2c = I2cdev::new("/dev/i2c-10").unwrap();
let regester_num: &[u8] = &[0x00, 0x7F];
let mut data = [0xFF];
let mut ops = [Operation::Write(regester_num), Operation::Write(&data)];
i2c.transaction(0x36_u8, &mut ops).unwrap();
}
thread 'main' panicked at crates/rig/src/bin/gps.rs:10:40:
called `Result::unwrap()` on an `Err` value: I2CError { err: Errno(95) }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
using https://www.adafruit.com/product/4471 and https://www.adafruit.com/product/5880 but i had the same issue with other i2c peripherals.
95 EOPNOTSUPP Operation not supported on transport endpoint
Please note that a single write of a longer array does not cause the same error.
It should be noted that a single write operation with a longer array does run, let mut ops = [Operation::Write(&[0x00, 0x7F, 0xFF ])]
I cant tell if im doing something wrong or if there is a bug some were.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction in crates/rig/src/bin/gps.rs and compare the two-write transaction with the single longer write using the listed Linux I2C devices. Check how I2cdev maps multiple Operation::Write values and verify the behavior against the EOPNOTSUPP result; the issue is done when the supported behavior is established and the implementation or documentation reflects it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100