How can I initialize the I2C bus on the BeagleBone Black Rev C running Embedded Linux?
Hey guys, how can I initialize the I2C bus on the BeagleBone Black Rev C running Embedded Linux? I am getting the error
Failed to open the bus: No such file or directory
, but I have verified that the I2C module is loaded and checked the device tree overlay. Here are the steps I took to verify the I2C module:
1. Loaded the I2C module using modprobe i2c-dev
.
2. Checked that the device tree overlay for I2C is applied correctly.
The error occurs when attempting to open the I2C bus
8 Replies
Well, @Boss lady I would suggest you check if the I2C device nodes exist under /dev. Normally, it's named as /dev/i2c-X .
And the X stands for Bus No.
Some other things to check (Examples and responses from my BBB which has i2c working):
The version of the BBB Image you are using
If the i2c modules are loaded (not always an issue if not)
(No modules on my system)
Any messages in the bootlog:
I have the i2c devices
@Sterling I have checked and it does exist
Alright then, @Boss lady you will have to load in the I2C modules.
It's simple, just run the following code;
Afterwards, check if it's successful by running the following on your terminal;
I hope this helps ☺️
Thanks @Sterling although, I have already loaded my I2C module using the mod probe command it's still not displaying any output
@Boss lady What version of the Kernel are you running? You can find out by executing
I'm running the stock BBB image with the 5.10 kernel and am using my i2c.