This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

I've been fiddling with an MPU-9255-based IMU, and using the code on this fork, I've been able to properly detect and calibrate the unit.

The problem is that if I move the newly compiled code into Openplotter, it fails to start. I'm fairly certain it is due to a check of the .ini setup file for the proper IMU type. In the IMU code that comes with Openplotter, the IMU types go up to "10", while with the new code, the MPU-9255 is type "11". Apparently there is something in the Openplotter start-up code that checks this, as I can change that one item in the .ini file to another value and Openplotter starts properly.

Sailoog, would you have a moment to tell me where in the code this check is happening? I'm happy to modify the code on my own, I just don't know where to look for it.

Thanks, and thanks for spending so much time to create a great system for all of us.
I am playing with this system for few weeks and I would like to thank the community and sailoog for it. I tried to buy MPU-9250 but I received MPU-9255 twice.
So now I am trying to make them work but I have the same issue as abarrow.
Please find in the link below the change I have done manually while the system runs (the github is to show the changes):

The calibration creates and update the file /home/pi/.config/openplotter/imu/RTIMULib.ini.
However the file "detected_RTIMULib.ini" is style using the non-MPU9255 template.

Also the files in /usr/include were not updated with the install process of RTIMULib, whereas /usr/local/include is updated with the new files.

Someone could help me to understand why it seems a initial version of RTIMULib remains installed after the installation of RTIMULib for MPU-9255?

Thank you
OpenPlotter uses this library to manage IMUs and some pressure and humidity sensors:
there you will find the supported models list. That library creates the ini files and many others things.

MPU-9255 is not supported. If we want to support that sensors we have to install another modified library (,) instead of the current one. Adding the model to OP code is not enough.

The bad new is that we will not switch library until the current one is working stable. Working on it.
Thanks for your answer. But my explanation must not have been clear.
I indeed installed the ones from Nick-Currawong, compiling it and so on using the commands from

I also modified some files to add the selecton lines MPU-9255 into the openplotter application. I thought it would work.
However two points are strange from my (little) understanding:
- the "detect" function, which creates the detected_RTIMULib.ini is using the template from the whereas the calibration function (when the sensor is manually configured) creates a template according to

- After the installation of, some files/folders remain with the previous data/files from For example in /usr/include

It looks like some functions for the RTIMU sensors are "hard coded" in your code and not updated depending on the github. Maybe that also why the ellipsoid fail for some users with MPU-9250. By the way I was able to succed with the ellipsoid and the MPU-9255.

I understand that you will take a look at it in the future. But maybe you can point out a direction to which looking for and I will try to help you as much as I can.

Ops sorry.

We do not modify the source of when installing. Try to manually delete both ini files (they will be self-generated), keep your openplotter changes and install this repo:

That is a cloned repo where MPU-9255 was already added and we have done some test to add LSM6DS33/LIS3MDL too, look at the modifications:

Let us know the result. Thanks for your help.
I haven't tried yet with the repository from e-sailing. I will try to d it tomorrow after restarting from the NOOB to have a clean confguration.

Do you know if the python script is able to create an .ini file?
1) Starting openplotter creates an RTIMULib.ini which is not up-to-date with the RTIMULib application ( No MPU9255).
2) Pressing the buton "add sensor" creates an detected_RTIMULib.ini which is not up-to-date with the RTIMULib application ( No MPU9255).
3) Manually setting the IMU and then pressing Graphical calibration starts RTIMULibDemoGL and edits the RTIMULib.ini which is then up-to-date with the RTIMULib application (MPU9255 is here).
4) However detected_RTIMULib.ini remains "old".

I don't understand why something is still able to create an old template for RTIMULib.ini. Any idea?

Meanwhile, I am trying to integrate the driver of the BMP280 into RTIMULib based on the BMP180. But I am a complete beginner so it is most likely I won't managed it.
You must rename or deleted the old rtimulib in folder /usr/bin. The new one is in /usr/local/bin.
I tried to removed as much as I could from this folder. But the result is the same.
Test done with a fresh install from the NOOB.
Really weird, we need to investigate why.

Do not try to add BME/BMP280 to RTIMULib!!!!! this sensor is already supported and has his own script. We added a way to add future sensors.
With the new update, Openplotter doesn't start anymore. My deviation from the standard installation are:
- RTIMULib for MPU9255
- Removing all old files/folders linked to RTIMU in usr/bin (out of usr/locale/ as e-sailing advised me).
My configuration was working before the update (and I could made the update), so I assume with what you fixed for I2C, it shows up that something "old" is now trying to be used. I hope this can help you to understand the situation:

pi@openplotter:~ $ openplotter
Traceback (most recent call last):
File "/home/pi/.config/openplotter/openplotter", line 3400, in <module>
File "/home/pi/.config/openplotter/openplotter", line 253, in __init__
File "/home/pi/.config/openplotter/openplotter", line 1722, in read_i2c
  self.list_i2c.Append([str(c), name, address, magn_list[c], iii[0], str(iii[1]), str(iii[2])])
UnboundLocalError: local variable 'magn_list' referenced before assignment

Forum Jump:

Users browsing this thread: 1 Guest(s)