1 Reply Latest reply on May 5, 2015 11:31 AM by cyph3rpunk

    Reverse-engineered sensor.so with source


      I have reverse engineered the sensor.so so that it can be compiled for V1.0 (and V2.0) Raspberry Pi Boards.


      The source is available here: https://github.com/larsch/rpi-mems-sensor


      I found that sensor.so is based on the bcm2835 library (bcm2835: C library for Broadcom BCM 2835 as used in Raspberry Pi), and is actually in full GPL violation. The sensor-specific function are quite simple though and mostly consist of the register numbers and bus addresses needed to talk to the chip. This could be implemented from scratch using the datasheet. The chips don't really require a "driver" when done this way, as the program basically talks on the I2C bus directly via the bcm2835 library.


      I've kept it so that everything works the same as the original sensor.so and it is fully compatible with the original Python Scripts (get them from http://git.oschina.net/embest/rpi_sensor_board.git). It is working perfectly on my V1.0 board with all three sensors here, but note that the bcm2835 library needs to be compiled specifically for the V1.0 board.