I’m trying to get arm authorization working and running into some issues. First here’s my setup:
- Pixhawk Cube
- Authorizer is a Linux board running pymavlink using v2 dialect
- Param COM_ARM_AUTH = 1280001 (require one arm, 5s timeout, authorizer sysid 1)
- Param COM_MIS_REQ = 2 (require auth but not valid mission)
- Arming via Qground
I can go into more detail on the setup if needed, but all the basics appear to be working. When arming I see the COMMAND_LONG 3001 arrive in the python script, and I have even rebuilt PX4 for the Cube to check that the COMMAND_ACKs I send to it are being received in the mavlink module. Here is the behavior I observe:
- After reboot of Cube, the first arming attempt fails. It appears to fail even before the first COMMAND_ACK (with result MAV_RESULT_IN_PROGRESS) reaches the arm_auth module via uORB
- Subsequent arming attempts succeed, but they appear to rely on acks that are still queued from the first attempt. I have tested killing the python script after the first arming attempt (fail) and the second attempt still succeeds, despite no new acks being sent.
Here is a snippet showing what the python script does:
in_msg = self._mav_sock.recv_match(blocking=False)
if in_msg != None:
if in_msg.get_type() == ‘COMMAND_LONG’:
self._mav.command_ack_send(3001, 5, 255, 5, 1, 1) # in progress
self._mav.command_ack_send(3001, 0, 255, 5, 1, 1) # arm cmd, accept
If you know about this module or have a working setup I can compare to, I’d appreciate the assistance. Thanks!