no acces to dev/-2c-2 P9_18,19

25 views
Skip to first unread message

Frederik Lettens

unread,
Apr 2, 2015, 6:56:03 AM4/2/15
to libbu...@googlegroups.com
Hello all, 


for a project I'm working on I need the use of two I2C-busses ( a lot of sensors: IMU, ultrasonic sensors,..).

The P9-header extends acces to /dev/i2c-2 (P9_17,18) and /dev/i2c-1 (P9_19,20), 
I plan to use the both of them.The libbulldog library has been a great tool so far! Really helpfull for java developers, 
but I'm experiencing a lack of acces to /dev/i2c-2 (P9_17,18).

I read that one should first enable the I2C1 (/dev/i2c-2) bus with a device tree overlay, this worked and I could
probe my sensors with the linux I2c-tools command 'i2cdetect -r 2",they appear on screen. The I2C1 bus is clearly enabled!

Libbulldog only gives acces to BBBNames.I2C_1 and BBBNames.I2C_0.
The first one was to acces /dev/i2c-1 on P9_19,20, this worked so far, one can read and write with this bus with java.

However the BBBNames.I2C_0 does not refer to I2C1 (/dev/i2c-2 on P9_17,18)...

Is this a bug? Because from the datasheets of the Beaglebone Black, it is clear that I2C0 (/dev/i2c-0) cannot be physically be accesed at the headers.

Has anyone rebuild the libbulldog-library with the addition of acces to P9_17,18?
This would be of great help! (Time is an issue here)

Cheers,
Someone in need of help
Message has been deleted

Frederik L.

unread,
Apr 2, 2015, 8:49:22 AM4/2/15
to libbu...@googlegroups.com

This fixed the problem :

board.getI2cBuses().add(new LinuxI2cBus("I2C_2", "/dev/i2c-2"));


It would be nice if it was integrated into the library though! 

Datenheld

unread,
Apr 18, 2015, 4:03:28 AM4/18/15
to libbu...@googlegroups.com
Hi Frederik,

your solution is fine and it should be integrated into the library.

Kind regards,
Datenheld aka Bulldog
Reply all
Reply to author
Forward
0 new messages