Updating Ardupilot or PX4 over WiFi

If you don't have easy access to the OcPoC's SD card, this tutorial will help you update the PX4 or Ardupilot firmware on your OcPoC over Wifi.

📘

NOTE

This tutorial assumes you are running Ubuntu on your host computer.

  1. Ensure your OcPoC has freshly booted up, and any autopilot set for autorun on startup is now stopped.
  2. If you don't already know, make sure you check the OcPoC's IP address:
ifconfig wlan0 | grep "inet addr"
  1. Remember the IP address after the inet addr
750
  1. Now all you need to do is overwrite the autopilot firmware currently on the OcPoC with your newly compiled firmware. On the OcPoC side, the firmware resides in the '/root' directory. From your host computer where you've built Ardupilot or PX4, you can find the compiled executable in the following directories:
  • Ardupilot: ardupilot/build/ocpoc_zynq/bin/
    • "" here simply means whatever version of ardupilot you've built, be it "arducopter", "arduplane", "ardurover", and so on.
  • PX4: Firmware/build/posix_ocpoc_ubuntu/px4
    • If you have a directory titled 'build_posix_ocpoc_zynq', then your px4 executable is located in 'Firmware/build_posix_ocpoc_zynq/src/firmware/posix/px4'.

👍

NOTE

The above mentioned 'build' directory won't exist in either Ardupilot or PX4 directories until you've compiled the source code.

Finally copying the autopilot firmware to the OcPoC over WiFi is as simple as using scp as shown here:

# Copy Ardupilot to OcPoC over WiFi
scp build/ocpoc_zynq/bin/arducopter [email protected]:/root/.

#Copy PX4 to OcPoC over WiFi
scp build/posix_ocpoc_ubuntu/px4 [email protected]:/root/.

You'll be asked to provide the password for the OcPoC - which is "root" assuming you're still using the default password - and now you have updated your autopilot firmware.