Parameter setting using UART

Hi!

I have a thesis project related to multicopters. I am using QGroundControl and Holybro Durandal V1 flight controller with PX4. My quiestion is the following:

I want to set the rate controller’s P, I, D parameters. Is it possible to change them without QGroundControl? My idea is to set them via Durandal’s UART port which would be connected to an STM32 microcontroller. My goal is to send a message using UART with the STM32 to the Durandal and it should change the parameter and even reboot the vehicle to apply the changes. How the UART message should look like?

Thank you for your answers!
Tamas