I know a few folks have worked with this. I am getting an error. I am using the SparkFun BMP085 breakout board and wired to Expansion Header P9 pins 19 and 20. I cannot get the bone to recognize it.
When I try to initialize it as follows:
echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-3/new_device
I get the following error in dmesg:
[ 85.795628] i2c i2c-3: new_device: Instantiated device bmp085 at 0x77
[ 85.806202] bmp085: probe of 3-0077 failed with error -121
Any tips?
Thanks!
$ grep 121 include/asm-generic/errno.h
#define EREMOTEIO 121 /* Remote I/O error */
$ grep REMOTEIO drivers/misc/bmp085.c
$
[nada, let's look at the driver's probe() since something external to it
is failing]
drivers/misc/bmp085.c:
bmp085_init_client()
bmp085_read_calibration_data()
i2c_smbus_read_i2c_block_data()
[aha, something external to our driver returning error status up the
stack]
$ grep REMOTEIO drivers/i2c/busses/i2c-omap.c
return -EREMOTEIO;
$
[that's suspicious, exactly what dmesg reported is returned by our i2c
adapter driver that's called during problem to init the device]
If you'll look further at the i2c adapter driver (omap_i2c_xfer_msg()),
you'll find that this is indicative of an i2c master transfer failure.
I suggest you check your interfacing and pin muxing, double, and triple
check.
-Matt
Isn’t the device address 0xEE (write) and 0xEF (read)? that’s what the datasheet at sparkfun indicates.
Eric
Never mind … I had SDA and SCL crossed. Must of stared at it for 2 hours with my eyes crossed the whole time.
I suggest you check your interfacing and pin muxing, double, and triple
check.
Matt: it was quintuple checking that did it. ROFL
Thanks!
I just plugged in my bmp085 and ran:
echo bmp085 0x77 > /sys/class/i2c-adapter/i2c-1/new_device
to initialize it. What more need I do to to have
sys/bus/i2c/devices/<busnum>-<devaddr>/temp0_input
and
/sys/bus/i2c/devices/<busnum>-<devaddr>/pressure0_input
show up?
I’m not yet seeing these.
Thanks,
Eric
Dan1
March 17, 2012, 11:07pm
7
Eric,
Are you using pins 19 and 20 on Port 9? If so, then it;s i2c-3, not i2c-1.
Try the instructions on Koen Kooi’s blog post: http://dominion.thruhere.net/koen/cms/using-the-beaglebone-as-a-weatherstation . If i2cdetect doesn’t see your BMP085 at address 77, then something’s wrong with the way it is connected. Also, try running dmesg to see if there are any i2c-related errors in there, like timeouts.
Dan.