Driver Issue with Waf Built Arduplane

Here is a link to the original discussion on GitHub, I was told to post this here. That post has much more information then I will write here, but essentially I built the main code with waf through Ubuntu running on my Windows 10 laptop. The USB cable is capable of sending power and signal, USB power is not an issue as Mission Planner works when I load the firmware directly through mission planner. I’ve loaded the firmware to my Pixhawk 4 board using:

./waf configure --board Pixhawk4
./waf plane --upload

I’ve also loaded the firmware using Mission Planner’s Custom Firmware option, and QGroundControl’s ability to load custom firmware. Through Mission Planner’s Custom Firmware option I upload a .APJ file, and through QGroundControl I upload a .bin file. Neither will communicate with the ground control softwares. In Mission Planner’s UI I can select the COM port and hit connect, but MAVLink times out after the 30 second period waiting for a Heartbeat Packet. QGroundControl simply never connects.

I have installed Mission Planner Approx 12 times, first through the Microsoft Store, then through the github page and then through the Ardupilot home page link. No iteration has successfully connected, although it did fix the issue of not being able to see the COM port. I have tried deleting and reinstalling the Port drivers on my computer and I have deleted and reinstalled the PX4 BL V.5 (May not be precisely correct). I am running the most up to date version of Windows and Mission Planner and the firmware I built was downloaded/cloned from Ubuntu command line actions a few days ago.

For additional information such as my Ubuntu/Waf download and set up process with line by line instructions please see the github post. I also have provided screenshots of the build in the Ubuntu terminal and the Exception Details of when the Heartbeat Packets were not received.

Thank you for helping me sort this out,
Cameron Gable

there is something wrong with the firmware you are compiling.
try installing the normal firmware. then reset all params to default. then loading your custom image.

it seems as though the device is not booting at all with your custom image.
i noticed in your post you built sitl first? can you do a clean on your git repo and try building just the target board

We will work on that. Using the steps above we recreated the issue on a different machine, I think running Ubuntu natively. The firmware we download is from the base Ardupilot repo, not even a fork. Could you give me a hand in what waf commands should be run to build the firmware?
Thanks,
Cameron Gable

The issue was resolved. We attempted the steps provided first on a Windows 10 machine, then on a Windows 7 machine. The third computer we ran it on was in Windows 10 and the steps listed above worked perfectly. I have no solution for the other computers and I am curious if Mission Planner/Ardupilot will release a piece of software to compile the code as an application on your computer. I think that would standardize the process and eliminate these issues.
Good luck

UPDATE: The fix was not able to be replicated. If you encounter this please just partition your computer and run Ubuntu and follow the instructions for that. There seems to be an issue with WSL I am no expert, but Ubuntu natively fixed it.

i build on WSL all the time. its something with your setup.

I don’t know what to say, we experienced the same issue across three machines running Windows 10 and Windows 7. The only thing that worked was Ubuntu natively. Here’s a doc I made documenting the process completely.