I am trying to run some Python control of I2C devices on the Pocket Beagle (PB)
that already run on the BBB (Rev C).
So, I set up the following comparison:
----------------------------------------------------------------
Load fresh "bone-debian-9.2-iot-armhf-2017-10-10-4gb.img" on the BBB Rev.C
Linux beaglebone 4.4.91-ti-r133 #1 SMP Tue Oct 10 05:18:08 UTC 2017 armv7l GNU/Linux
sudo apt update
sudo apt install python-smbus python3-smbus
i2cdetect -y -r 2 # reveals target part at bus 2, addr = 0x18
python2
>>> import smbus
>>> b = smbus.SMBus(2)
>>> print b.read_word_data(0x18,0x06)
21504
# expected result (Manufacturer ID for MPC9808 temp sensor)
python3
>>> import smbus
>>> b = smbus.SMBus(2)
>>> print (b.read_word_data(0x18,0x06))
21504
# expected result (Manufacturer ID for MPC9808 temp sensor)
----------------------------------------------------------------
Load fresh "bone-debian-9.2-iot-armhf-2017-10-15-4gb.img" on the PB.
Linux beaglebone 4.4.91-ti-r133 #1 SMP Tue Oct 10 05:18:08 UTC 2017 armv7l GNU/Linux
i2cdetect -y -r 2 # reveals target part at bus 2, addr = 0x18
sudo apt update
sudo apt install python-smbus python3-smbus
python
>>> import smbus
>>> b = smbus.SMBus(2)
>>> print(b.read_word_data(0x18,0x06))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 121] Remote I/O error
python3
>>> import smbus
>>> b = smbus.SMBus(2)
>>> print(b.read_word_data(0x18,0x06))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 121] Remote I/O error
The only thing unique about this PB is that I am using a USB-2 to Ethernet interface for SSH access on USB1 port. Driver is already included in the kernel/img.
Should not have any impact on I2C operation. I2C is not used by the Ethernet, just USB.
----------------------------------------------------------------