Hardware in the loop simulation with 4.0.5

I am trying to use HIL to simulate ArduPlane on a pixhawk cube using Q ground control as my GCS. I am running the latest ArduPlane (4.0.5) and I have heard that HIL has not worked since version 2.76 or something similar. When I enable HIL mode using the -H flag in sim_vehicle.py, it repeats the error “Waiting for first HIL state message”. Has anyone come up with a fix for HIL in 4.0.5? Or have any suggestions on where to look in order to fix the problem?

Is there a particular reason you can’t use SITL?

We would like to fully simulate a flight without having to leave the building since actual test flights can be time consuming, dangerous, and take up resources. We have noticed that there are some discrepancies between software and hardware when testing our payload software. Errors that do not occur in SITL came up when actually attaching to hardware. If possible we would like to find all the errors before we get an aircraft actually into the air.

There is quite an old issue requesting this: https://github.com/ArduPilot/ardupilot/issues/1106