How to to connect Pixhawk board to QGC for debugging purpose in MATLAB R2018b?

1 view (last 30 days)
I am unable to connect my Pixhawk board to QGC for debugging purpose, after using it with Embedded Coder Support package for PX4 Autopilots. I need to connect to NSH terminal. I was able to do it before using the Support package.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Jan 2024
Edited: MathWorks Support Team on 29 Feb 2024
QGC will not be able to connect to the Pixhawk board because the Mavlink is not enabled on USB port of the Pixhawk board in RC.TXT, which is added to the SD card. Refer the following documentation for details. 
Run the command below in the command window  of MATLAB R2018b to get documentation page.
web(fullfile(docroot, 'supportpkg/px4/ug/px4-system-startup-sdcard.html'))
To enable Mavlink on USB port, and therefore connect to QGC, please follow the instructions mentioned in the following documentation page. 
Run the command below in the command window of MATLAB R2018b to get the release instruction documentation page.
web(fullfile(docroot, 'supportpkg/px4/ug/enable-mavlink-px4.html'))
Note that once Mavlink is enabled on USB port, you cannot use external mode over USB in Simulink with the Pixhawk board.
You can choose any other serial port (for example, /dev/ttyS6) to run the Simulink model in External mode. However, in this case, you may need additional serial to USB converter.
Please follow the below link to search for the required information regarding the current release:

More Answers (0)

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!