I am trying to access an I2C based device through SMBus ioctls on Linux. I need write more than 32 bytes. I2C_SMBUS ioctl limits the size to 32 bytes. The underlying driver does not support I2C_RDWR ioctl and direct read()/write() calls. I have also tried byte by byte R/W but it does not work for me.
Is there any way to read/write more than 32 bytes on Linux based SMBus interface?
1.3k views Asked by tsk At
1
There are 1 answers
Related Questions in LINUX
- Is there some way to use printf to print a horizontal list of decrementing hex digits in NASM assembly on Linux
- Why does Hugo generate different taxonomy-related HTML on different OS's?
- Writes in io_uring do not advance the file offset
- Why `set -o pipefail` gives different output even though the pipe is not failing
- what really controls the permissions: UID or eUID?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Docker container unable to make HTTPS requests to external API
- Whow to use callback_query_handler in Python 3.10
- Create kea runtime directory at startup in Yocto image
- Problem on CPU scheduling algorithms in OS
- How to copy files into the singularity sandbox?
- Android kernel error: undefined reference to `get_hw_version_platform'
- Is there a need for BPF Linux namespace?
- Error when trying to execute a binary compiled in a Kali Linux machine on an Ubuntu system
- Issue with launching application after updating ElectronJs to version 28.0.0 on Windows and Linux
Related Questions in EMBEDDED-LINUX
- Touch calibration error when using Avalonia UI with Raspberry PI 4 (lite) DRM Mode
- Can't ping to 8.8.8.8 and google.com in beaglebone black
- How to extract the .img file into normal kernel source file in the linux?
- Using C++ libgpiod to calculate interval and speed between events
- yocto bitbake 'python3 setup.py bdist_wheel ' execution failed
- How to reduce cached memory used by Linux kernel on embedded linux platform
- Unable to parse input tree, possibly due to dash
- How to add a button handler to GPIO pin through a push button
- Linux of_platform_depopulate() does not remove drivers
- Filling a sk_buff with content of recieved frame
- How to reduce reserved memory allocated by Linux kernel during boot time
- embedded linux buildroot how to work with axi-gpio?
- How do I know when the dsa_loop and dsa_loop_bdinfo linux kernel modules are working?
- buildroot for zedboard, how to enable axi-gpio in device tree?
- Driver is not loading when there 2 or more source files
Related Questions in I2C
- Adafruit BNO08x Lib Not working with PicoRP2040 - PlatformIO
- msp430f5438a reading multiple sensor tmp117
- Raspberry pi 4, ina219 Bi-Directional DC Current Power Supply Sensor
- read block data with smbus2 is slow on Raspberry Pi
- I2C problems communicating with I2C Analog Devices AD5112 Digital Pot
- How to receive a float array using esp8266 via I2c
- I2C Communication with Tiva TM4C123GXL
- GPIO I2C IMU on OrangePi CM4 Running Android Doesn't Interface With Native Apps
- I2C LCD1602 interfacing with PIC16F877A
- Sets huskylens modes
- Find out which protocol to communicate with a TFT LCD display
- Why does one of the arguments in this MPU-6050 code mean something different from the official Arduino documentation?
- I want to change the slave address in runtime again after the first configuration of i2c SLAVE. Is this possible , I'm getting errors while doing that
- Issue with MAX32664 breakout board from Protocentral on STM32L476RG Nucleo-64: Fixed SpO2 value
- enabling cdc-acm uart and I2C at the same time on zephyr OS
Related Questions in SMBUS
- read block data with smbus2 is slow on Raspberry Pi
- Get PSU info through PMBus with lm-sensors
- Bring Rechargeable Li-ion battery to shipping mode by using TI library
- How can I add two hexadecimal values with assignment operators in 8-bit or 16-bit format?
- Android Studio C++ missing i2c related definitions
- Error installing smbus module with Python 3.10
- i2c_smbus_write_byte_data not working on the Raspberry Pi 3
- Get the SMBus device address on the terminal and set the clock frequency
- PI4IOE5V96248 communication with an Orange Pi zero 2 - Python
- python i2c smbus erro, data sending
- read/write on eeprom from linux userspace
- Is it possible in smbus2 to have start and stop conditions as you wish?
- smBus communication testing for fan driver IC in STM32 with C
- Raspberry pi pip install illegal instruction erorr
- Getting "OSError: [Errno 121] Remote I/O error" when trying to access LCD screens over I2C (python in raspberry)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You'll need to use
I2C_RDWR. The smbus functions have a hard-coded size. Not only in the userspace i2c-dev driver, but also the kernel functioni2c_smbus_xfer(), which is passed data as aunion i2c_smbus_data.The SMBUS spec is limited to 32 bytes. So it's possible your master does not support writing more than 32 bytes at once, if it is only design to support SMBUS.
What you'll need to do is look at the specs for the master hardware and see if it can support > 32 bytes. If so, you could extend the driver to support generic I2C messages and then you could use I2C_RDRW.
A generic I2C xfer method (
algo->master_xfer()for I2C vsalgo->smbus_xfer()) is used only if the driver doesn't have an smbus specific method for an operation, so you can add a generic I2C xfer function as a fallback for operations that aren't already implemented. The generic I2C xfer method doesn't have to support every possible I2C transaction. Just support the one you need.