How control the Aux pin through QtGround Control Mavlink Console?

What kind of changes need in PX4 firmware code need to control the AUX pin of Pixhawk 4 through QtGround Control Mavlink console?
I need to control the AUX pix of pixhawk 4. I want to use it as a relay output as an on-off signal to activate or deactivate dc motor during operation of pixhawk through mavlink console. I don’t know whether it’s valid or not. I read it online somewhere. that Aux pin can also be used as relay control. Is it true?
Please tell me which code to study in px4 firmware which need to change to do what i want to achieve?Please help me is you know any thing.