I have compiled and installed the bme280 overlay from the beagleboard overlays and added it to uEnv.txt. Now the sensor is detected upon boot.
Unlike in the other threads i found here, i do not intend to access the sensor using python directly, but use the kernel module (bmp280.ko, bmp280-i2c.ko), which is in the kernel tree and works fine.
Before i used the overlay, i tried out the connections by echoing the not-so-magic string to /sys/class/i2c-adapter/i2c-2/new_device, which had the sensor detected and the module loaded.
However, when the sensor is detected using the overlay, the module is not loaded automagically. Of cource, i could simply add it to modprobe.conf, but on a raspberry pi this worked out of the box. What am i missing?
might be built into the kernel
use i2cdetect to see if the address is seen or UU, if UU then it means that the kernel is using the address with the driver.
Thanks for that hint, but the module is not built in. I could see the loaded module on the first trial, and the module must be loaded to find the measurement of the sensor (bme280 is a temperature / pressure / humdity sensor) in the /sys file tree.
Could you post the output from dtc -I fs /sys/firmware/devicetree/base
,
just to confirm that the overlay does what it’s supposed to?
(remember to enclose in tripple-backticks for readability)
Thanks a lot for the hints (esp the backtick
-one ). The
dtc
command creates lots of output! I found out meanwhile: Of course, for the module to be loaded at boot time, it must be in the initrd – which it wasn’t. Now it is, it is properly loaded.