Pixhawk 2 Cube + Ublox M8N gps +compass module

is it possible to use a standart UBLOX M8N GPS +COMPASS module with pixhawk 2 cube?

Yes. Just make a JST-GH connector for it.

I did, but the board does not recognize it. I have a no gps message on my artificial horizon. But the compass Is recognized

Try interchanging RX, TX pins of GPS.
If still it doesn’t recognise, set LOG_DISARMED=1 and upload a log here.

Worked! Thank you very much!