Then it is not wired or connected correctly.
Put an oscilloscope on the data and clock lines and see if they are doing what they are supposed to do.
It also looks like you are using an old version of the OS.
Move to Debian 8, and you should see the I2C devices on bus 2.
Hook the I2C Clock to P9-19. Hook the I2C data to P9-20.
You should not have to mess with the device tree or pin configuration.
Power and ground also required.
I have been using the latest version of Debien, for three days now with the same result.
On the other hand i checked with the oscilloscope the SDA and SCL lines are not acting like they are supposed to act (even on the default P9_19 and P9_20).
Thought maybe they all need to be enable.Tried the following method but in vain (NO such file or directory is the response i’m getting)
To enable the I2c-1 on the BeagleBone Black Rev A, B and C:
Rev A/B: Open the file /media/BEAGLEBONE/uEnv.txt in an editor (vim/nano)
Rec C: Open the file /boot/uboot/uEnv.txt in an editor (vim/nano)
Add the key “capemgr.enable_partno=”
Add the ports you want to enable, comma separated (BB-I2C0, BB-I2C1, etc)
Reboot.
Am i right to say the I2c buses are not enable? or is it another proble?
Under Debian 8, the external I2C bus is now I2C-2.
I2C-1 is internal only, and used for talking to the PMIC and things like that.
Don’t use it, unless you really understand what you are doing.
— Graham
If you have a current version of Debian 8, with the cape manager,
THEN I2C-2 IS ALREADY ENABLED.
IT IS ALREADY BROUGHT OUT ON P9_19 and P9_20
Start with that one, Don’t mess with I2C-1. If you touch the EEPROM on I2C-1, you can brick the unit. It is intended for internal use.
Get your part working on I2C-2, before you start messing with other things.
put your part on P9-19 and P9-20, then boot, then run “i2cdetect -y -r 2”
I2C needs pull-up resistors to work.
There are no pull-up resistors on the BBB board, on I2C-2.
There are some 10K pull up resistors on the MPU-9250 breakout board.
So, if you disconnect the MPU-9250 breakout board when you hook up the oscilloscope, then the bus can’t work.
You need to bridge the SDA and SCL lines with the oscilloscope, with the MPU-9250 connected in order to see anything on the osciloscope.
I note that you are trying to run the MPU-9250 over a long cable, perhaps several feet long.
I can’t tell from your photos.
I2C is NOT a cable protocol. It is intended for communications between ICs on the same PC board, or close together.
So, I would start by getting the MPU-9250 to work with the Beaglebone using four short connecting wires, not over 6 inches (15 cm) long.
I would recommend using the most recent ‘release’ version of Debian. (Debian 8.6 2016-11-06)
With the MPU-9250 connected to the BBB, and booted,
You should have +3.3 Volts on the Vdd pin of the MPU-9250 breakout board
You should have 0 Volts on the GND pin of the MPU-9250 breakout board
Both the SDA and the SCL lines should be idling at +3.3V, with no communications active.
With the oscilloscope bridging the connected SDA and SCL lines,
run “i2cdetect -y -r 2”
You should see a lot of activity on both the SCL line and the SDA line for a fraction of a second.
If you are going to remote the MPU-9250 over a cable, there are things that can be done, but get it running on short, close leads, first.
Thanks Graham, got it working. I think it was the cable length that was causing problem. At the moment I’m just trying to figure out why the magnetometer data are not varying while i can see the changes for the accelerometer and gyroscope.
I am glad it is running now.
It is not a chip I have used, so you will have to sort it out, now that you are communicating with it.
If you do need to remote it in the future, you should use shielded cable with a good ground, increase the size of the bypass / filter cap at the IC, from the 0.1 uF to something much bigger, and also reduce the value of the pull-up resistors at the IC from the current 10K to something down in the range of 1K to 2K. But still keep that cable length as short as possible.