M8N GPS includes GPS satellite search and compass. GPS satellite search must go to an outdoor open place. It may not be possible to search satellites indoors due to poor satellite signals.
If want to use GPS module, the connection is as follows,
Remove the line cap to use external compass,make sure the APM is power off when remove the line cap.
Do not insert compass line of GPS to I2C port.
Do not plug and unplug the GPS line with the flight control power. Remember to power off the flight control before plugging and unplugging the GPS line.