i2c IO not working

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
lorenzogm
 
Posts: 1
Joined: Fri Jun 10, 2016 4:25 am

i2c IO not working

Post by lorenzogm »

I'm trying to read a BMP180 sensor and I don't know how to do it.

Those are the steps I have followed:

1. I flashed Debian 8.5 (http://elinux.org/Beagleboard:BeagleBon ... GB_eMMC.29) to eMMc
2. Follow this tutorial to install the IO Python library: https://learn.adafruit.com/setting-up-i ... -on-ubuntu
3. Follow this tutorial to test the BMP180: https://learn.adafruit.com/using-the-bm ... rything-up

And, when I run "sudo python simpletest.py" I get the following error:

Code: Select all

Traceback (most recent call last):
  File "simpletest.py", line 37, in <module>
    sensor = BMP085.BMP085()
  File "build/bdist.linux-armv7l/egg/Adafruit_BMP/BMP085.py", line 69, in __init__
  File "build/bdist.linux-armv7l/egg/Adafruit_BMP/BMP085.py", line 72, in _load_calibration
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 200, in readS16BE
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 177, in readS16
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 164, in readU16
  File "build/bdist.linux-armv7l/egg/Adafruit_PureIO/smbus.py", line 173, in read_word_data
IOError: [Errno 110] Connection timed out
If I enable the "busnum=2" [sensor = BMP085.BMP085(busnum=2)], I get this one:

Code: Select all

Traceback (most recent call last):
  File "simpletest.py", line 40, in <module>
    sensor = BMP085.BMP085(busnum=2)
  File "build/bdist.linux-armv7l/egg/Adafruit_BMP/BMP085.py", line 69, in __init__
  File "build/bdist.linux-armv7l/egg/Adafruit_BMP/BMP085.py", line 72, in _load_calibration
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 200, in readS16BE
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 177, in readS16
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/I2C.py", line 164, in readU16
  File "build/bdist.linux-armv7l/egg/Adafruit_PureIO/smbus.py", line 173, in read_word_data
IOError: [Errno 121] Remote I/O error
The sensor is properly connected and the connections are as described:

Code: Select all

GND to P9.1
Vin to P9.3
SCL to P9.19
SDA to P9.20

Code: Select all

The voltages are alright:
5.22V at Vin
2.50V at SCL
2.50V at SDA
Why is not working? I'm going to provide some info about the system and to make some questions:
1. Should I install some other distribution of debian or any other kernel?
2. Which version is the one used in https://learn.adafruit.com/setting-up-i ... -on-ubuntu by Justin Cooper?
3. The 0x77 is always "--" on every i2c bus (it doesn't matter if the sensor is psychically connected or not). I didn't applied any Device Tree Overlay. Is this the problem? How can I apply the right one?

Code: Select all

root@beaglebone:~# uname -a
Linux beaglebone 4.4.11-ti-r29 #1 SMP Fri May 27 22:58:36 UTC 2016 armv7l GNU/Linux

Code: Select all

root@beaglebone:~# dmesg | grep i2c
[    1.521813] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    1.521861] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
[    2.101447] i2c /dev entries driver
[    2.220718] input: tps65217_pwr_but as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/input/input0
[    2.246522] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    2.249378] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[   26.827916] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz

Code: Select all

root@beaglebone:~# i2cdetect -l
i2c-0   i2c             OMAP I2C adapter                        I2C adapter
i2c-1   i2c             OMAP I2C adapter                        I2C adapter
i2c-2   i2c             OMAP I2C adapter                        I2C adapter

Code: Select all

root@beaglebone:~# i2cdetect -y -r 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- 34 -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Code: Select all

root@beaglebone:~# i2cdetect -y -r 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Code: Select all

root@beaglebone:~# i2cdetect -y -r 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
I have spent the last days trying but I didn't get it...

Thank you very much for your help!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: i2c IO not working

Post by adafruit_support_rick »

Your BMP180 is not properly connected to your beaglebone. It doesn't show up in i2cdetect.
Please post some clear, detailed pictures of both sides of the BMP180, showing your soldering and wiring.

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”