Compass 1 & 2 calibration error:99

On a Pixhawk 3DR board I have mount a “old” HobbyKing Ublox Neo-7M Gps with HMC5883l compass.
The Gps has bad satellite number and high Hdop compared to 3DR Ublox LH6 I use before.

But the real problem is the compass calibration and the compass performances.

During compass calibration the following message appears after a couple of seconds:
Compass 1 error:99
Compass 2 error:99

When the calibration procedure is finished I have some weird values on compass 2 like 58, -108, -596
The compass during loiter flight gives an imprecise heading.

I have a HMC5983 external compass and I could do some tests with it to check if the problem is the Neo-7m compass .

It may be obvious but I just did my first compass calibration with the GPS and didn’t realise that you have to do the Pixhawk and the GPS in the same calibration.

Maybe it’s stating the obvious but it caught me out for a while!