Mavlink commands with Wiris Security

45 views
Skip to first unread message

Tiberius F.

unread,
Jun 9, 2022, 9:11:47 AM6/9/22
to MAVLink
Hello, I have a project in which I connect a Wiris Security camera with a transmission system. I want to say I don't connect this system with a autopilot. So, I control the camera with MAVLink. I realised a script with which I connected the camera, but I don't know how to send a command or receive a message.
I attached the code and the pictures with commands which I want to implement.
If I send the message MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS, I receive the error AttributeError: 'int' object has no attribute 'pack'
If I send the message MAV_CMD_DO_DIGICAM_CONFIGURE(1,0,0,0,0,0,0), I receive the error TypeError: 'int' object is not callable.

So...Can somebody help me with this problem and explain me how to send commands to control the camera?





request_message.PNG
command.PNG
program_mavlink_true.py

Hamish Willee

unread,
Jun 9, 2022, 6:53:57 PM6/9/22
to MAVLink
The best place to ask this question is on the pymavlink gitter  channel: https://gitter.im/ArduPilot/pymavlink

I'm not very familiar with Pymavlink, but what you're sending is a command. So you need to pack it in a Command_long or command_int message and then send that message. A good example from a quick net search is this one: https://williangalvani.github.io/ardusub-gitbook/developers/pymavlink.html#armdisarm-the-vehicle

master.mav.command_long_send( master.target_system, master.target_component, mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM, 0, 1, 0, 0, 0, 0, 0, 0)

Hope that is enough to get you started

Tiberius F.

unread,
Jun 15, 2022, 6:39:56 AM6/15/22
to MAVLink
I was able to connect and control the camera through a transmission system. Indeed, I had to pack everything with the command_long command. Thanks a lot for the information and if anyone wants the code, I can display it here

Hamish Willee

unread,
Jun 15, 2022, 6:04:12 PM6/15/22
to MAVLink
You're very welcome.
Reply all
Reply to author
Forward
0 new messages