AirPixel
TAG-E › Guides › PX4
Guide · PX4 · Sony ILX-LR1

PX4 camera control and triggering for the Sony ILX-LR1

How PX4 works with cameras, and how to put the ILX-LR1 on a PX4 drone as a MAVLink camera: the port parameters, control from QGroundControl, triggering from survey missions, and geotags written into every photo.

AirPixel · Updated 28 September 2026

How PX4 works with cameras

PX4 has two ways to reach a camera:

  • Cameras on flight controller outputs. PX4 pulses a PWM or GPIO output to fire the shutter, configured with the TRIG_* parameters. A capture pin (CAM_CAP_FBACK = 1) can report the moment the shutter actually fired. This is shutter-only control and needs a camera with a wired trigger input.
  • MAVLink cameras. The camera, or a device in front of it, is a MAVLink component that speaks Camera Protocol v2. QGroundControl talks to it directly and builds its camera panel from what the camera reports: shutter, video, exposure and other settings.

The ILX-LR1 is built to be driven over USB, so it goes on PX4 as a MAVLink camera. TAG-E does the translation: it connects to a TELEM port as MAV_COMP_ID_CAMERA and passes the commands to the camera over USB-C.

Setting up the ILX-LR1 on PX4

What you need

  • A PX4 flight controller with a free TELEM port
  • Sony ILX-LR1 and a TAG-E with its USB-C cable to the camera, plus the TAG-E MAVLink cable
  • A 5 V supply for TAG-E that can deliver at least 2 A. Higher voltages damage TAG-E and the camera.
  • QGroundControl 4.4.3 or newer (skip 5.0 RC1 to RC3)

Step by step

  1. Wire it. Connect TAG-E’s IO-B connector to TELEM1 or TELEM2, and TAG-E’s USB-C to the camera. With a Gremsy Pixy LR gimbal, follow the Pixy-LR set connection for PX4 instead.
  2. Configure the MAVLink instance in QGroundControl’s parameter editor. Use MAV_1_* for the first free instance or MAV_2_* for the second, and SER_TEL1_BAUD or SER_TEL2_BAUD for the port TAG-E is on.
ParameterValueWhy
MAV_x_CONFIGTELEM 1 or TELEM 2Runs this MAVLink instance on TAG-E’s port
SER_TELx_BAUD921600Lower rates drop packets
MAV_x_MODEOnboardThe profile for onboard devices such as cameras
MAV_x_RATE0TAG-E requests the messages it needs itself
MAV_x_FORWARDEnabledLets QGroundControl and the camera reach each other through the autopilot
  1. Reboot the flight controller. When the camera is online, TAG-E’s LED turns green and the camera panel appears on the right of QGroundControl’s fly view.
  2. Measure the GPS link delay. Every airframe delays GPS data slightly differently. The GPS delay calculation takes a few minutes and tightens the geotag accuracy.

Sharing the port with a telemetry radio? If the same MAVLink instance also carries your ground station link, use MAV_x_MODE = Normal instead of Onboard.

For reference, TAG-E needs these messages from the autopilot, and asks for them with SET_MESSAGE_INTERVAL: a working TIMESYNC exchange, SYSTEM_TIME at 1 Hz, GPS_RAW_INT and GLOBAL_POSITION_INT, and ATTITUDE at 10 Hz. On a standard PX4 build you don’t set any of this by hand.

Older TAG-E firmware (before 0_193) used 230400 bps. To move to 921600: set TAG-E’s IOB_BAUD to 9216 in QGC’s vehicle settings, reboot the flight controller only, set SER_TELx_BAUD to 921600, then set TAG-E’s FW_SAVE_CFG to 1 and save.

Triggering the camera from PX4

PX4 re-emits the camera commands it finds in a mission as MAVLink commands. Image and video capture commands are addressed to MAV_COMP_ID_CAMERA, which is the component ID TAG-E uses, so they reach the ILX-LR1 without any extra setup:

TriggerUse it for
IMAGE_START_CAPTURE / IMAGE_STOP_CAPTUREOne photo, or photos at a fixed interval
VIDEO_START_CAPTURE / VIDEO_STOP_CAPTUREVideo during part of a mission
Camera section of a waypointQGC’s way of adding the commands above: take a photo, take photos at an interval, start or stop video from that point in the mission
QGC shutter buttonManual photos and video from the camera panel

TAG-E geotags each photo as it is taken, so triggering runs at the camera’s full speed. Before the first real survey, run the mission on the bench with the propellers off and watch the photo counter under the QGC shutter button go up at each trigger point. Do the same for a Survey pattern, which triggers by distance, on your PX4 version.

Controlling the camera from the ground

  • QGroundControl (Android, Windows, macOS) shows a panel with the shutter button, photo/video switch and the photo count or recording time. The gear icon under it opens the full camera configuration: ISO, aperture, shutter speed, exposure compensation, exposure mode, AF mode and more. QGC camera control manual
  • HereLink, SIYI and Skydroid controllers can run MavCam, an on-screen overlay with exposure, focus and video controls on top of QGC.

Geotagging on PX4

PX4’s own route to geotagged photos runs through the log: each trigger is recorded, and after the flight QGroundControl’s GeoTag Images tool matches the photos on the card to the log. It adds a step after every flight, and the photo count has to match the log.

TAG-E skips that step. It takes position, altitude and attitude from PX4 over MAVLink, keeps its clock synchronised with TIMESYNC, and writes the values into the EXIF and XMP of each photo on the camera’s card. With RTK on the aircraft, the geotags carry RTK precision, and the lever-arm correction moves the coordinates from the GPS antenna to the camera. The ArduPilot and PX4 geotagging comparison goes through the options in detail.

Troubleshooting

  • No camera panel in QGC. Check that TAG-E’s LED is green (camera online). If it isn’t, check the USB-C cable and the camera power. If the LED is green, check the wiring, MAV_x_CONFIG, MAV_x_FORWARD and the baud rate on both sides. The message icon at the top left of QGC shows whether TAG-E reported in.
  • The setup window won’t open. The camera has to be online (green LED) before the configuration window is available.
  • Photos are taken but the positions look shifted. Run the GPS delay calculation and enter the antenna-to-camera offsets for the lever-arm correction.

Camera control and geotagging for your ILX-LR1

TAG-E costs €299: one USB-C cable to the camera, one MAVLink cable to the autopilot.

Related