Raspberry Pi2 + Navio2. How to setup maximum speed for UART?

Hello!

HW config: Raspberry Pi2 + Navio2.
SW config: PX4 master + QGroundControl V2.2.Stable.

I have successfully setup HIL simulation with FlightGear.
In addition i would like to increase the speed of connection to the maximum value: B921600.
However, i was unable to do it: the maximum speed of connection is: B115200

Mavlink command: mavlink start -d /dev/ttyAMA0 -b 115200
I can put the value greater than 115200, but in this case QGroundControl always displays error: “Mismatch baudrate”
Mavlink starts ok with any given value, let’s say: mavlink start -d /dev/ttyAMA0 -b 921600 is ok.

The problem might be in QGroundControl, since mavlink always starts ok with any given value.
But it also might be in Navio2 UART.

Have anybody faced with the same problem?
Have

Solved. QGroundControl has class QSerialPort and it does not support the values for the baudrate greater than 115200.

Hi,
I’m very interested in setup HIL simulation using RPI3 + Navio2. Can you please tell me how you make it work?
Thank you

Hi!
Basically, HIL with Flighgear is already setup (for fixedwing and quadcopters) within QGroundControl.
The main thing is PX4 setup config for HIL.

In my case (fixedwing) it looks like this:

uorb start
dataman start
param set SYS_AUTOSTART 1005
param set SYS_RESTART_TYPE 0
param set MAV_BROADCAST 0
param set MAV_USEHILGPS 1
param set COM_RC_IN_MODE 1
param set FW_THR_IDLE 0.1
param set MAV_TYPE 1
param set FW_AIRSPD_MIN 12
param set FW_AIRSPD_TRIM 25
param set FW_AIRSPD_MAX 40
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 15
param set FW_PR_FF 0.8
param set FW_PR_I 0.05
param set FW_PR_IMAX 0.2
param set FW_PR_P 0.1
param set FW_RR_FF 0.6
param set FW_RR_I 0.02
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.1
param set FW_R_LIM 45
param set FW_R_RMAX 0
param set FW_YR_FF 0.0
param set FW_YR_I 0
param set FW_YR_IMAX 0.2
param set FW_YR_P 0.0
pwm_out_sim mode_pwm
df_lsm9ds1_wrapper start -R 4
df_ms5611_wrapper start
sensors start
commander start
navigator start
ekf2 start
fw_att_control start
fw_pos_control_l1 start
mavlink start -d /dev/ttyAMA0 -b 115200
mavlink stream -d /dev/ttyAMA0 -s HIL_CONTROLS -r 50
mixer load /dev/pwm_output0 AETR.main.mix
mavlink boot_complete

However, you must compile and deploy “pwm_out_sim” module to be able to run command “mixer load /dev/pwm_output0 AETR.main.mix”.

To do it, simple add the following command: drivers/pwm_out_sim into cmake/configs/posix_rpi_common.cmake file