Found a device at 36, but it is not a UltraBorg (id FF instead of 36)

Forums:

The ultraborg stopped responding. I have only a HC-SR04 attached and the UltraBorg is powered through the Raspberry. When I try sudo i2cdetect -y 1, the Raspberry returns correctly all -- and 36 at row 30, collumn 6. (When I do this without the UltraBorg connected to the GPIO pins it returns only all --). When I try i2cdetect at bus 0, I get: 'couldn't open file 'dev/i2c-0' or 'dev/i2c/0' No such file or directory'. I only know the principles of i2c. So I have no idea what to look for now. Could anyone help me out on this?

piborg's picture

This is a fairly unusual problem which has two obvious causes.

The first possibility is that the HC-SR04 is faulty and is preventing the UltraBorg from working properly. Try disconnecting the sensor and see if the UltraBorg will talk.

The second possibility is that something related to the I2C control has changed on the Raspberry Pi itself. Have you updated or changed any software on the Raspberry Pi recently?

Turned out the kernel version (4.9) was the root cause. Downgrading to 4.4.50 solved this issue and the UltraBorg is operational again. Thank you very much for the support.

piborg's picture

It seems like this problem is due to a subtle change in behaviour with the I2C bus, rather than a bug. We have a fix which changes how our library talks to the UltraBorg slightly, solving the issue where the ID is read as FF.

We have finished testing the new logic on the UltraBorg library, it seems to work well on both the old and new versions of Raspbian ^_^

There are three ways you can go about updating the library on your Raspberry Pi:

1. Update UltraBorg.py only

This will keep any changes you have made to other scripts intact :)

cd ~/ultraborg
mv UltraBorg.py UltraBorg.old
wget -O UltraBorg.py https://www.piborg.org/downloads/ultraborg/UltraBorg.txt

2. Re-install the examples

This will loose any changes you have made to scripts and any other scripts in the examples folder, but is much less typing.

cd ~
rm -r ultraborg
bash <(curl https://www.piborg.org/installer/install-ultraborg.txt)

3. Copy / view the new code

This should work in all cases, but is much more manual.

You can view the new version of the library here: Improved UltraBorg.py script. This should be used to replace any copies of UltraBorg.py.

You can tell if the script is new or old by looking at the import section (starts around line 30).
Old script:

# Import the libraries we need
import smbus
import types
import time

New script:

# Import the libraries we need
import io
import fcntl
import types
import time

No other scripts need to be changed, all of the same functions are available and work in the same way ^_^

Subscribe to Comments for &quot;Found a device at 36, 	 but it is not a UltraBorg (id FF instead of 36)&quot;