Is I2C working in BBB ?

Hi,

I am struggling to connect Adafruit MCP9808 to my BeagleBone Black, FreeBSD 12.

I thought it would have been a pice of cake to configure it, instead I got stuck.

I see the device:
Code:
#> i2c -s -f /dev/iic1
=> 18    # that is correct

But I can't comunicate at all with it via i2c command.
Code:
#> i2c -f /dev/iic1 -d r -a 0x18 -o 5  -c 1
ioctl: error sending start condition

If I repeat the previous command with truss I see:

Code:
sigprocmask(SIG_SETMASK,{ },0x0)                 = 0 (0x0)
mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0,0x0) = 538947584 (0x201fb000)
openat(AT_FDCWD,"/dev/iic1",O_RDWR,00)           = 3 (0x3)
ioctl(3,I2CSTART,0xbfbfec28)                     ERR#19 'Operation not supported by device'
ioctl(3,I2CSTOP,0xbfbfec28)                      = 0 (0x0)
ioctl: error sending start condition
write(2,"ioctl: error sending start condi"...,37) = 37 (0x25)
close(3)                                         = 0 (0x0)

Unfortunately the issue seems similar to what was reported 5 year ago by this guy:

I hope some of you has good news.

bye
Nicola
 
Hi Nicola and all,

I'm trying to do a similar thing.

I have a Beaglebone White (one before the Black) and am using FreeBSD 12.1.

I am trying to connect it over I2C to a AM2320 temperature/humidity sensor.

Here is what I get with or without 10k pull-up resistors.

Code:
root@generic:/usr/include # i2c -f /dev/iic1 -s
Hardware may not support START/STOP scanning; trying less-reliable read method.
Scanning I2C devices on /dev/iic1: <none found>
root@generic:/usr/include # i2c -f /dev/iic1 -s
Hardware may not support START/STOP scanning; trying less-reliable read method.
Scanning I2C devices on /dev/iic1: 5c
root@generic:/usr/include # i2c -f /dev/iic1 -a 5c -d r -c 1
ioctl: error sending start condition
root@generic:/usr/include # i2c -f /dev/iic1 -a 5c -d r -c 1
ioctl: error sending start condition
root@generic:/usr/include # i2c -f /dev/iic1 -a 5c -d r -c 1
ioctl: error sending start condition
root@generic:/usr/include # i2c -f /dev/iic1 -a 5c -d r -c 1 -m tr
i2c: ioctl(I2CRDWR) failed: Resource temporarily unavailable
root@generic:/usr/include # i2c -f /dev/iic1 -a 5c -d r -c 1 -m tr
i2c: ioctl(I2CRDWR) failed: Device busy
root@generic:/usr/include # i2c -f /dev/iic1 -a 5c -d r -c 1 -m tr
i2c: ioctl(I2CRDWR) failed: Device busy
root@generic:/usr/include # i2c -f /dev/iic1 -a 5c -d r -c 1 -m tr
i2c: ioctl(I2CRDWR) failed: Device busy

Any ideas?

Here is the spec sheet for the AM2320 if it helps: http://akizukidenshi.com/download/ds/aosong/AM2320.pdf

Thank you!
 
Back
Top