SMBus (System Management Bus) provides a control bus for the system to pass the messages to/from devices instead of using an individual control lines, this control helps to reduce pin count and system wires.
Questions tagged [smbus]
88 questions
1
vote
1 answer
smBus communication testing for fan driver IC in STM32 with C
I developed a library for fan IC which use smbus protocol. However ı have some problems and questions.
1 -) what is diff between master and slave for smbus? whether the IC should be slave or master is not specified in the datasheet. Therefore, how…

Mete Bingöl
- 13
- 2
1
vote
1 answer
SMBUS undefined reference
I'm trying to make simple program in c++ to read from SMBus, but can't even build program sample.
I'm building with gcc(9.4.0) on Ubuntu 20.04.5 LTS.
I've installed
libi2c-dev
i2c-tools
Code:
#include
extern "C" {
#include…

new_linux_explorer
- 13
- 3
1
vote
0 answers
How to avoid getting invalid argument when controlling joystick with smbus library
I am trying to control a 5 pin joystick with raspberry pi
the code is attached
however when I run this I get an error
does anyone know how to resolve this issue?
I expected it to show me the position of the joystick when pushed
i tried checking for…

Kumaran Panchakumar
- 13
- 3
1
vote
1 answer
How to perform a 256 byte block read with i2c/smbus
I've got this power monitor that I'm attempting to interface with to retrieve it's fault log LTC2977 (data sheet: https://www.analog.com/media/en/technical-documentation/data-sheets/ltc2977.pdf)
I'm new to i2c / pmbus / smbus things so forgive my…

dazed_and_confused
- 19
- 4
1
vote
1 answer
How can I get i2c values from a Rapsberry with Python?
I use an ads1115 to get values from an analogic sensor to a raspberry pi 3 but I'm having a hard time figuring out how to get them from python.
I use the SMBus library to get the i2c values but I can't find how to actually get the analog 0 AIN0…

Erwan Bertrand
- 11
- 1
1
vote
2 answers
ImportError: no module named 'smbus2'
I'm using Pymakr on VScode to program a Pycom L01, which is connected to several sensors.
i'm trying to use smbus2 library, but i can't import it.
I created a python virtual enviroment and installed it using 'pip install smbus2', but when i try to…

Lorenzo_inirapmoC
- 33
- 1
- 9
1
vote
0 answers
Smbus-device emulation in QEMU
I want to emulate a SMBus/I2C device in QEMU. I see that there are existing modules in QEMU which have SMBus functionality, but I don't know how to create a new one or the command to use the existing one. Can somebody please help here.

nerd
- 339
- 1
- 5
- 16
1
vote
0 answers
Issue in STM32CubeMx
While using STM32 CubeMX (version 5.2.1) and selecting the i2c in SMBus-two-wire-Interface it shows as follows:-
Warnings: STM32 CubeMX does not support the configuration of this mode of this IP.However,this IP can be configured manually.
Anyone…

Rohith R
- 21
- 1
1
vote
1 answer
Raspberry Pi 4: Python3 smbus2 prepends 0x00 to all I2C data writes
I have working C & Python3 code, based upon simple examples from the internet, where I can correctly send data from my Raspberry Pi4 to an Atmel SAM-E70 dev kit board. I've got a logic analyzer connected to look at the data being sent, and for…

PfunnyGuy
- 750
- 9
- 22
1
vote
1 answer
undefined reference to `i2c_smbus_read_block_data(int, unsigned char, unsigned char*)'
I'm trying to read a block of data from an imu (mpu9250) but when building with
g++ mpu.cpp -o mpu i get the following error:
/tmp/cckh5V8w.o: In function 'imu::read_accel()':…

Adam El Messaoudi
- 43
- 6
1
vote
0 answers
Why might `i2c_smbus_write_byte_data` be returning "Operation not permitted" on uClinux 2.4?
I am writing a C program with the aim of configuring a peripheral device (the CS5368 ADC) via the I2C interface of a Dante Brooklyn II, a board based on a Microblaze soft-core processor running uClinux 2.4.
I have implemented the configuration…

mindTree
- 916
- 9
- 18
1
vote
1 answer
SMBus on PCIe Slot
I have some PCIe cards, which have some PMICs on SMBus.
If I connect more than one (identical) PCIe cards on different slots(on an x86), would I be able too access all PMICs (with same address)?
Does all the PCIe slots share the same SMBus lines,…

Vinu Chandran
- 305
- 2
- 10
1
vote
0 answers
AMD X470 SMBus specification
I've reverse engineered a windows SMBus driver in order to port the code to a Linux system. In order to interact with the SMBus, the code uses hard coded port addresses based on the system chipset. In my case I'm using an AMD X470 with a base…

Twifty
- 3,267
- 1
- 29
- 54
1
vote
0 answers
IOError: [Errno 121] Remote I/O error
I tried to connect the LCD display and display the text, but an error occurred.
The LCD driver is OK, and the smbus and I2C tools are also installed correctly. But I wonder why it does not work.
help.
# demo_lcd.py
# Simple string program. Writes…

sungjin.park
- 19
- 1
- 4
1
vote
1 answer
Python pass input string which has spaces and use for smbus
My code for ic2 is.
import argparse
import smbus
import time
bus = smbus.SMBus(1)
bus.write_byte_data(0x20, 0x00, 0x00)
bus.write_byte_data(0x20, 0x01, 0x00)
bus.write_byte_data(0x20, 0x14, 0x01)
time.sleep(0.5)
bus.write_byte_data(0x20,…

Chonlathit Wanpean
- 15
- 3