I’m trying to create a drone simulator using AirSim with Unreal Engine, but when I attempt to connect PX4, it gets stuck at “Waiting for simulator to accept connection on TCP port 4560.” I’m using Ubuntu to connect PX4 to AirSim via TCP. If anyone has a solution, please let me know.
That message usually means PX4 has reached the simulator connection stage, but nothing is accepting the expected TCP connection on port 4560.
I would first verify the connection boundary before changing PX4 itself.
In the AirSim settings.json, check that the PX4 vehicle has:
UseTcp: true
TcpPort: 4560
Then, while AirSim/Unreal is running, check on the AirSim side whether TCP 4560 is actually listening.
If PX4 and Unreal/AirSim are running on different hosts, VMs or WSL environments, also verify which interface/address AirSim is bound to. localhost only works when both sides share the same network namespace.
A useful way to isolate this would be:
PX4 starts → attempts TCP 4560 → AirSim listener exists? → TCP connection established? → simulator MAVLink exchange begins
Could you share:
- PX4 version/commit
- AirSim version/fork
- whether PX4 and Unreal are on the same Ubuntu host, different machines, VM, Docker or WSL
- the PX4 vehicle section of your AirSim
settings.json - output showing whether port 4560 is listening while Unreal/AirSim is running
With those, the first failed boundary should be fairly easy to identify.