I had a similar problem, crashed, not able to calibrate compass. I took the top shell off. The compass cable was partially disconnected, but it's also loose from the main board.
I reconnected, still couldn't calibrate. I disconnected the cable and looked closer. The 4 wires are still soldered to the main board, but the 2 end pieces are broken (see photo). However, these appear to be just for stability, they dead end in the yellow plastic connector.
I got frustrated and walked away. I came back an hour later, reconnected the compass wires, and it worked! Didn't even need to calibrate!