I have this issue when I try to run python scripts and getting parameters from pixhawk. After connecting the pix via USB, the data stream will only be active after I connect the pixhawk to a ground station like QGC or MP. So I have to do this every time that I connect the pix to my PC. Plug the USB, open QGC, connect, and then close QGC. Is there any way to solve this issue? The pixhawk is not even sending a heartbeat until connected to the GS.
Solved: I wanted to run the scripts on a machine without having to install QGC or MP in it. The pix needs to stablish a connection on the USB port you are using. This is what QGC or MP were doing for me, openning the conection for the pixhawk to communicate through the port. Without this step, the pixhawk data stream won’t be available from your port. So I ran a basic mavproxy connection command on the linux terminal for it to open a stream data route (mavproxy.py --master=/dev/ttywhatever). After this, I tryed to run the scripts on a different terminal, leaving the mavproxy connection terminal open, but this led to them running intermitently (sometimes good sometimes won’t run), due to the fact that the USB port was being requested by both mavproxy and script. I finally had to close the mavproxy terminal and my script worked with no failure.