PX4 , mavlink, simulink

I am working on the Three degree of freedom hover system
in that I need to simulate the system in HITL
I created the model in the simulink, I am trying to simulate the model the simulink model is working properly but I need to arm the hover system by using the keyboard functions i tried by using the udp port that will sending the arming command to the simulink model and the pixhawk 2.4.8 microcontroller is used in this
and the pixhawk is connected through the serial port and when there is the sending of the arming command the command is receiving properly by the simulink model but the arming of the pixhawk is not happening
can anyone help me out of this