Bad encoder or pixhawk port?

I am trying to make my own quadcopter that has a Pixhawk Mini 4 as a FC, and using a Spektrum DX6e as a controller, and using Mission Planner ArduPilot.

We are having some trouble with something, but I don’t know what the root cause is. When we connect the PPM Encoder into the Pixhawk’s PPM port, the lights turn on on the Encoder, but when we try to do an RC calibration on MP, it is not connecting as we see no bars, and when we try to move the throttle, there are no green bars. Only sometimes when we start to play around with the connection (i.e removing it, plugging it back in) it does connect but it seems random…Sometimes it connects on my firs try, or it connects on my 30th try. Is this because of a bad Encoder or bad Pixhawk port? My gut tells me this is the Pixhawk but I hope I am wrong.