Mag0 selftest failed

Dear all,
When I calibrate mag0 and mag1, QGC always says that mag0 selftest failed. I use teraterm and see that mag0 is successfully mounted. Can anyone help me what causes this problem. Thanks.

EDIT: sometimes it pops up this error msg:

Cannot figure out why. Please help me out. Thanks guys in advance.

I use teraterm testing the sensors:

All the sensors sort of pass the tests, but when I test 9250, it gives me the following error:

while testing hmc5883:

It seems that it is 9250 that causes this problem. Does it mean this sensor is broken already?

I have just the same problem with external mag on GPS. More of that, with ardupilot firmware and in missionplanner , while calibrating, I see both mags movement (external and internal). But after that, with ardupilot or PX4 firmware both react only on internal mag. Any suggestions? I guess, maybe self test limits in firmware is too high?

The only reason is that your external mag is broken. It is not relevant to firmware. When I changed the mag chip, everything works fine.

Agreed, I’ve changed mag chip and it works just fine. One note: faulty external mag has markings m883. I’ve resoldered it with l883 and it works fine.
I just got another gps module (from Chinese supplier) and again it has m883 mag. And again, calibration issue.
I guess it’s something with selftest routing maybe? I’ve checked both with simple arduino sketch and both mags read and behave normally.