Gps status is not ok

Hi, I am using QGC with Pixhawk 5X and M8N U-blox GPS module, where I am getting the following GPS Status:
NuttShell (NSH) NuttX-11.0.0
nsh> gps status
INFO [gps] Main GPS
INFO [gps] protocol: UBX
INFO [gps] status: NOT OK, port: /dev/ttyS0, baudrate: 0
INFO [gps] sat info: disabled
INFO [gps] rate reading: 0 B/s

Please let me know, how to resolve the issue?

How is the GPS connected?

Hi @JulianOes , Thank you for attending my issue. The GPS is connected to GPS1 port / pin-out [ i.e. full GPS & Safety Switch Port] of Pixhawk 5X , please have a look at image attached herewith on the same and which is pin-out reference available on the PX4 website (URL: Holybro Pixhawk 5X | PX4 User Guide)

Ok, and you haven’t set any GPS parameters? My guess would be something is misconfigured. What’s the output of ver all, what version are you using?

… and in case you have changed them, what are the valus of GPS_1_CONFIG and the other GPS_1 params

NuttShell (NSH) NuttX-11.0.0
nsh> ver all
HW arch: PX4_FMU_V5X
HW type: V5X02
HW version: 0x00000000
HW revision: 0x00000002
FW git-hash: 1c8ab2a0d7db2d14a6f320ebd8766b5ffaea28fa
FW version: Release 1.13.3 (17630207)
OS: NuttX
OS version: Release 11.0.0 (184549631)
OS git-hash: 4a1dd8680cd29f51fb0fe66dcfbf6f69bec747cf
Build datetime: Mar 14 2023 01:45:46
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 9.3.1 20200408 (release)
PX4GUID: 000200000000203335375942500f002f0044
MCU: STM32F76xxx, rev. Z

No, I haven’t set any GPS parameters yet, all are default parameters after I have flashed with latest Px4 Firmware through QGC on Pixhawk 5X. Actually, I have bought 2 Pixhawk 5x boards, one of it has not issues , showing gps but I am unable to understand why I am unable to get GPS shown on other board. Please assist me to resolve the issue.

If you are using the exact same firmware and default parameters on both of them, and one works, then that tells me it’s a hardware issue.

You could try to swap the GPS over, and if the same Pixhawk is not working, it’s likely a Pixhawk issue. If the problem changes with the GPS, then the problem is with the GPS device, rather than the Pixhawk.