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 best solutions below
Related Questions in LINUX
- How do I recursively find and replace only in files named index.php on Linux webserver?
- passing text with \n as one argument in shell
- kernel module does not print packet info
- How to send ESC/POS commands to thermal printer in Linux
- (x64 Nasm) Writeline function on Linux
- How do I set the Hive user to something different than the Spark user from within a Spark program?
- Default priority of thread with SCHED_FIFO
- Calling a python function with options from shell script
- How to split a directory into parts without compressing or archiving?
- Cross compile simple standard C program on Linux for Mac
- How to offload NAPI poll function to workqueue
- python netifaces - How to get currently used network interface
- Unexpected output from function
- mingw-64 conflicting declarations when cross-compiling
- Different behavior of async with Visual Studio 2013(Windows8.1) and GCC 4.9(Ubuntu14.10)
Related Questions in EMBEDDED-LINUX
- How to offload NAPI poll function to workqueue
- Why Device Tree Structure (DTS) file is needed both in bootloader and kernel source code?
- Qtwebengine on Embedded linux, with qtwayland and OpenGL not working, black rectangles seen on browser
- board firmware update through uefi capsule feature from Linux
- How to get list of programs which can open a particular file extension in Linux?
- u-boot select boot partition based on GPIO state
- Bit Bang with SPI (fwirte, write performance)
- How to setup test SMTP server for devices on local network
- Documentation for regulator framework with device tree
- TechWell TW6869 driver does not generate interrupts on embedded device
- How to change tty group on Linux (build with buildroot)
- How to save console log from chrome in local file without any third party tool?
- Raw access on eMMC with alternating speeds
- Qt application randomly failing to properly paint the interface showing black screen instead
- Trouble implementing android_serialport_api into my own application
Related Questions in I2C
- Using camera shutter to trigger MPU6050 on raspberry pi
- Xilinx AXI-IIC Slave Protocol description
- Python bus = smbus.SMBus(1) equivalent in C++?
- Erroneous i2c response from LSM303D to Netduino Plus
- Linux I2C-Dev IOCTL-Call produces wrong message
- Embedded software program block, I2C?
- I2C & SPI driver
- Listening to i2c input changes with python
- Getting the info from MCP23017 with Python
- Python - HowTo unittest i2c device wrapper class
- Linux - Is it necessary to register (instantiate) i2c devices before using them?
- Issue on using both I2C and Serial simultaniously in raspberry pi 2
- what is better using while loop or if statement when checking status codes of atmega 32?
- Register address not sent using I2C in TM4C123GH6PM board
- I2C communication in raspberry pi using python
Related Questions in SMBUS
- Operating the AD5272 with Python 3 and smbus2 on Raspberry Pi 3 B+
- Android Studio C++ missing i2c related definitions
- Linux: writing to the i2c/SMBus
- undefined reference to `i2c_smbus_read_block_data(int, unsigned char, unsigned char*)'
- AMD X470 SMBus specification
- Writebyte and Readbyte esp QMC5883 on Python (Beaglebone Black) appear Errno 110
- Getting IOError: [Errno 121] Remote I/O error with smbus on python (raspberry) while trying to get data over I2C from Arduino
- ImportError: no module named 'smbus2'
- #include <i2c/smbus.h> file not found
- Raspberry pi pip install illegal instruction erorr
- smBus communication testing for fan driver IC in STM32 with C
- How to avoid getting invalid argument when controlling joystick with smbus library
- Raspberry Pi 4: Python3 smbus2 prepends 0x00 to all I2C data writes
- Silabs efm8bb3 is very slow on smbus/i2c master transfers
- SMBUS undefined reference
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)
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?
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.