July 9, 2024, 05:14
File "/home/nengyi/.local/lib/python3.12/site-packages/luma/oled/device/__init__.py", line 79, in __init__ self.command( File "/home/nengyi/.local/lib/python3.12/site-packages/luma/core/device.py", line 48, in command self._serial_interface.command(*cmd) File "/home/nengyi/.local/lib/python3.12/site-packages/luma/core/interface/serial.py", line 93, in command self._bus.write_i2c_block_data(self._addr, self._cmd_mode, File "/home/nengyi/.local/lib/python3.12/site-packages/smbus2/smbus2.py", line 643, in write_i2c_block_data ioctl(self.fd, I2C_SMBUS, msg) BlockingIOError: [Errno 11] Resource temporarily unavailable
from smbus2 import SMBus, i2c_msg # Single transaction writing two bytes then read two at address 80 write = i2c_msg.write(80, [40, 50]) read = i2c_msg.read(80, 2) with SMBus(1) as bus: bus.i2c_rdwr(write, read)
Traceback (most recent call last): File "/home/example.py", line 62, in <module> bus.i2c_rdwr(write, read) File "/home/.local/lib/python3.12/site-packages/smbus2/smbus2.py", line 658, in i2c_rdwr ioctl(self.fd, I2C_RDWR, ioctl_data) BlockingIOError: [Errno 11] Resource temporarily unavailable
sudo dmesg | grep i2c
[22341.795707] i2c_designware 1f00074000.i2c: i2c_dw_handle_tx_abort: lost arbitration