Dual gps not working on pixhawk cube

I have trying connecting dual gps on pixhawk cube. I connected second gps on gps2 port and have selected serial4 with serial protocol parameter set to 5. Both gps are getting detected by ardupilot as seen in message window of mission planner but only gps1 hdop appears and gps2 hdop2 shows 99 continuously.

Swap the two GPS and see if the problem follows the port or the GPS. Make sure the rx/tx lines are correct on the second GPS. Check the Status tab under the HUD in Mission Planner to see if data is coming in or not.

Set GPS_AUTO_SWITCH =2 (Blend)

thanks for the reply guys. Its working now. Had some cable issue.