Bug: magnetometer reading process fail

Ehi guys!
Could you confirm this bug? Magnetometer runs properly (using the demo code) but if you try to stop and then restart (the same demo code) magnetometer reading will always be zero.

I believe something wrong with the MPU driver. Can u confirm it?



This bug has been fixed not so long ago. The next APM release won’t have this issue anymore.

Is there any expected date for this new version to be released?

I don’t use APM. Any chance to see the bug fixed in the navio rep???

I second that. I’m not using APM either and I currently have a catch that will auto exit my program if the mag values read zero so I can un-power and re-power the setup.


APM:Copter is currently in release candidate testing stage, so it should happen in a couple of weeks (but only when it hits all requirements for a milestone).

@vincenzocalabro @larssoltmann

We have added it to our task tracker, should be done after we finish a few other tasks.

Ehi Mikhail! Thanks so much to push this through :smile:
Hoping to receive good news soon,

have a nice day,


When you say, “I don’t use APM”, then what do you use? I’m just curious.

I found more interesting to develop algorithm, estimators, control and guidance law myself… that of course because I’m a control engineer with a serious passion :smile:

any update ?

Should be done in the beginning of the next week.

1 Like

What is the status? :smile:


We’ve merged the PR that should fix the issue. Looking forward to your feedback. Thanks!

1 Like

Ehi! Thanks for the changeset update.
Unfortunately, the student project is now ended (for this year). Hence I don’t know when I’m going to test
this change. As soon I’ll get some test, I’ll communicate with your team.

Thanks for the effort,


I know its been a while, but was this issue also fixed in the python driver for the MPU9250?

I’m still getting magnetometer readings of all zeros after a few times of starting and stopping my code. From the previous comments it looks like it was fixed in APM but I don’t use APM. What was/is the cause of this problem?

I do not really remember the details, but the issue was happening when MPU9250 was reset while AK is making a transaction on the internal I2C bus, which causes a lockdown condition. The discussion and fixes are here AK8963 rework. by staroselskii · Pull Request #2493 · ArduPilot/ardupilot · GitHub