MATLAB unable to detect Pixhawk4 port over WIFI (Linux)

1 view (last 30 days)
I have been trying to run simulink files but unable to connect the Pixhawk to MATLAB over wifi using the esp8266 wifi module as it does not detect the port. I believe there is some Mavlink code missing/incorrect in the rc.txt file, as the Pixhawk connects to QGC over wifi perfectly without this file. I have tried all combinations of the code and 'serial port' options in the Configuration parameters>Hardware Implementation of Simulink, that i could find in the documentations.
Mavlink WIFI Bridge parameters:
WIFI_UDP_HPORT = 14550
WIFI_UDP_CPORT = 14555
UART_BAUDRATE = 57600
My rc.txt file has the following code:
#Copyright 2018 The MathWorks, Inc.
# This is the custom rc.txt which loads px4_simulink_app on start-up
usleep 1000
uorb start
usleep 1000
tone_alarm start
usleep 1000
px4io start
#gps start -f #Starts GPS driver and Fake a GPS signal (useful for testing)
usleep 1000
sh /etc/init.d/rc.sensors
usleep 1000
#Uncomment the below 2 lines to use LPE estimator
#attitude_estimator_q start
#local_position_estimator start
#Using EKF2 estimator by default as PX4 does build LPE on px4fmu-v2 due to a limited flash.
ekf2 start
usleep 1000
mtd start
usleep 1000
param load /fs/mtd_params
usleep 1000
rgbled start
usleep 1000
fmu mode_pwm # This is required for AUX PWM channels
usleep 1000
px4_simulink_app start
mavlink start -u 14550 -b 57600 -m onboard -r 80000
mavlink boot_complete
#exit #4-Jan-2019
even tried the following line:
mavlink start -d /dev/ttyS1 -b 57600 -m onboard -r 80000

Answers (0)

Community Treasure Hunt

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

Start Hunting!