PREFLIGHT FAIL: MAG2 SELFTEST - With firmware 1.8.2 and PIXHAWK 3 PRO with external GPS/MAGNETOMETER

I am configuring a drone with one external and two internal magnetometers. The used firmware is 1.8.2 (stable) with pixhawk 3 pro (by Drotek). External compass is DP0105 (NEO-M8N GPS + LIS3MDL Magnetometer for Pixhawk 3 Pro).
After calibration, I’m receiving CRITICAL error MAG2 SELFTEST CALIBRATION, and the drone is not able to arm. It seems that only way to arm is disabling CBRK_IO_SAFETY, setting this parameter to 22027. Is it risky? Moreover, how could I proceed to overcome such a problem? I’ve repeated the calibration phase more and more, but the results were always the same.

I’m sorry, I’ve tried to upload flight log file in but the following error is returned: HTTP Error 400: Failed to parse the file. It is most likely corrupt.

Below the screenshot:

Do you have any idea of the error, or suggestion to avoid the problem?
Thank you so much!

Good day,
You can solve the issue disabling the compass but first you must find which one is external or internal, you can do this using the nsh console following this command.

type ? followed by enter
ls / obj (enter)

type : listener sensor_mag - 0
listener sensor_mag - 1
listener sensor_mag - 2
for every command there is the correspondent result: if its external you wil will find external, if not you will find false.

For disable the compass type in the search box, compass 0 or 1 or 2 or 3.

Try one by one and test it without props

Just install the px4 master firmware for the procedure and after this you can install the 1.9.0

Hi @Dave84,
I apologize for the delay with which I answer you.
I will try to perform the operations that you advised me and that I had hypothesized too. My doubt is: but is this a safe operation? Because the board has two internal compasses and then I have to disable an internal one. I know that pixhawk considers the main one external, and in the case of anomalies, chooses the internal one. However, excluding one, only one remains as an alternative to pixhawk.
Do you miss anything? Is this always the case in general, or could it be due to some internal reason in my system? Electromagnetic and/or other disorders?
I thank you for your time, advice, and kindness.

you don’t need apologize.

you must consider that the internal compass may have interferences or due high vibration can give you few issues that’s why there is also the second one.

You must test the behavior of the drone.

You can calibrate both internal but one can have an high offset.
better you set the safety switch… coz just in case you need to handle the drone you don’t risk any injury.
Just send me pls pictures about your gps position and fc…

Dear @Dave84,
if it were not possible for me today, I will certainly try to follow your advice these days, and I will certainly keep you updated.
I will send you the images, and you will realize that the wiring is not the best. However, the combo tarot (hexacopter) provides a harness of dubious realization or not purely designed for the frame that I purchased. I recommend, tomorrow when you see the images made a great laugh but don’t get too angry! :laughing::laughing:
However, the most important thing is to thank you for your valuable help.
Thank you again!

Dear @Dave,
I make a small summary of what I did these days, despite the short time.
I have updated the firmware to version 1.9.0.
I tried to recalibrate both without the eternal GPS on board and with the GPS installed on board.
After the calibration, I get the message “Internal compass inconsistent” and I am unable to arm the drone.
Moreover, I note that with the 1.9.0 the “GPS lock” occurs in very long times. The time required to perform the “GPS lock” on equal terms seems to have returned to normal with the 1.9.0 master version (I refer to the daily May 31, 2019). I point out that the visibility conditions of the satellite constellation have always been excellent with 15-18 satellites visible from the “flight control”.

Then I tried to update with the master version, I’m still receiving warnings; The entry is denied and the message suggests enabling the safety switch.

I noticed that the following trace is often shown in the logs:
[rm3100] no device on bus 4

I am attaching some images that illustrate the first makeshift assembly. Unfortunately, in my opinion, the wiring, supplied by Tarot itself in the combo version of the frame, is not adequately sized.

I am still all to thank you very much. Your help is precious, I am a bit perplexed and desperate right now.

Thank you again!

Just install again the master version and check after the calibration all the compasses. Just disable the internal compass and also the second one is external. Just make the calibration of the one still active. For the safety switch just enable the function. I just have check but im sure just try to reposition the gps stand I will do some test with my fc under 1. 9.0.
Can you tell me pls the version of your fc,?

Good day, I’ve done few test with my fc (pixracer r15 - px4fmu - v4, and mro x2.1 777) and gps (dual compass), I’ve run the stable version of the px4 1.9.0 disabling both internal mags and enabling both external… i can arm and flight without any issues. I need more info about your settings. There is another option you can try…

Hi @Dave84,
I’m sorry for the delay, but I was swamped in the last days. First of all, thank you so much for your suggestions and for the time you spent for me.
I try just now, and I’ll let you know and eventually send you more information on my settings. Is it enough the whole parameters file of my flight controller setting?

Thank you so much

Hi @Dave84 ,
as announced I’ve made the test.
I’ve installed last stable firmware version (1.9.1), repetead the calibration steps (is it necessary when a new firmware is installed? ) but now error is ‘no valid data from compass 0’.
I’m desperate!
I’ve repeated more than one-time calibration, but error now is always the same.
Also disabling mag0, the error is remaining: how is it possible?
Moreover, I’ve noticed that for mag0 e mag1, if I check parameters, just ID,EN e ROT parameters are present, the others (SCALE x,y,z and OFFSET x,y,z) are missing. Why?
Another thing, note that when just upgraded firmware to 1.9.1 I was able able to arm motors, without errors. Since mag2 was disabled, I’ve tried to set mag2 enabled
and tried to arm: I was not able to arm anymore.
Then, since I believed that such operation was ‘reversible’, I’ve set mag2 DISABLED again, expecting that arming was possible, but nothing! I was not able to arm anymore.
Then I’ve repeated calibration and error was ‘no valid data from compass 0’, as I said at begin of this post.
The parameter list you can find at this link: if it could be useful. Please say me what could be helpful to overcome this issue… :frowning:

Thank you so much.

Can you tell me what kind of fc and gps you have installed?

I @Dave84,
my flight controller is Pixhawk 3 Pro and external COMPASS-GPS is DP0105 NEO-M8N GPS + LIS3MDL Magnetometer.
My flight controller Pixhawk 3 PRO you can find it here:

As said, the error I receive is ‘No valid data from compass 0’ that seems to be the internal one. Moreover, if I try to disable it, I still receive the same message. Why?
Could be useful logs and parameter files?
Thank you very much for your time.

Good day,
can you do a screen shot about how did you set your compasses, coz sometimes compass 0 is external.
just make a sensor listener of your mags in the nsh console

follow these instructions:

type ? followed by enter
ls / obj (enter)

type : listener sensor_mag - 0
listener sensor_mag - 1
listener sensor_mag - 2
for every command there is the correspondent result: if its external you wil will find external, if not you will find false.

Hi @Dave84 ,
thank you for your reply.
Please find attached output of what you required.
It seems that the external one is instance 1 (with device id 335377).
Instance 0 seems to be one of the internal compasses. Below the output:

Thank you very much David

Mag 1 is external and mag 0 is internal, just enable also the internal and disable the mag2.
just send me also before this the screen shot of the mags settings you have right now