Useful console commands
This page lists some useful NuttX console commands. You can access the console through QGroundControl or using a USB-TTL-3V3 cable and debugger adapter board.
PX4 Dev Guide commands reference
The PX4 Dev Guide provides an auto-generated overview of (almost) all available commands. See the following page in the Dev Guide:
This page should provide an overview of some important and useful commands that people participating in the HoverGames might find useful.
This page will be updated when we come accross more useful commands. suggested improvements are welcome via email at HoverGames@nxp.com or https://community.nxp.com/community/mobilerobotics
Test SDcard operation
You can perform a test of how well the currently inserted SD card is performing using the sd_bench
command.
Test flash memory operation and erase flash memory
You can perform a read/write test of the flash memory using the mtd rwtest
command.
The part of the flash memory which holds all PX4 parameters can be erased using the mtd erase
command.
mtd_erase
may be useful when you have flashed new firmware and find the need to do a full reset of the PX4 settings and parameters.
Start drivers for the available sensors on RDDRONE-FMUK66
All sensor drivers should be started on startup, but if this does not work or when you are debugging and need to restart a driver, you can use the following commands
NXP MPL3115A2 pressure sensor (I2C): mpl3115a2 -I start
NXP FXOS8701CQ accelerometer/magetometer (SPI): fxos8701cq start -a 8 -R 0
NXP FXAS21002C gyroscope (SPI): fxas21002c start -R 0
The file that starts the sensors on power up and specifies which bus it is connected to, is located atROMFS/px4fmu_common/init.d/rc.sensors
Sensor commands
Each sensor has a set of commands, which are usually presented when you enter the name of the sensor without a specific command. For example, fxos8701cq
supports the following commands:
Set and view parameter settings from command line
Parameters can be set from the command line, using param set PARAM VALUE
, where PARAM is the name of the parameter and VALUE is the value to which it should be set.
For example, the airframe parameters can be set usingparam set SYS_AUTOSTART 4014
, which sets the airframe to S500. After a reboot, the SYS_AUTOSTART parameter will then also change other parameters to the values that are set within the S500 airframe definition.
You can also easily read the current value a parameter is set to withparam show PARAM
. This also allows for wildcard characters. For example, if you want to show the values of all parameters that start with SYS, you can use param show SYS*
.
MAVLink instances
You can see the current active MAVLink instances using mavlink status
Listening to uORB messages
PX4 uses uORB for its internal communication between modules. It is possible to listen to uORB topics, which can be very useful for debugging or when developing new functions. See the following page for more information and commands:
Last updated