ESP32 DIY Board - Compass Not Found (MPU6050 + HMC5883L I2C Bypass Issue)

Hello everyone,

I am working on a custom ESP32-based Rover (ArduRover 4.5.0) project using ArduPilot. I am using a GY-87 10-DOF sensor module which contains an MPU6050 (IMU), an HMC5883L (Compass), and a BMP180 (Baro).

The Problem:
My ESP32 successfully detects the MPU6050 and BMP180, but it cannot find the HMC5883L compass. I know that on the GY-87 module, the HMC5883L is connected to the auxiliary I2C bus of the MPU6050. To see the compass, I need to enable the I2C Bypass on the MPU6050.

I am using the following configuration in my AP_HAL_ESP32/boards/esp32diy.h file:

C++
// IMU and Baro are working fine
#define HAL_INS_PROBE_LIST ADD_BACKEND(AP_InertialSensor_Invensense::probe(*this, GET_I2C_DEVICE(0, 0x68), ROTATION_NONE))
#define HAL_BARO_PROBE_LIST ADD_BACKEND(AP_Baro_BMP085::probe(*this, std::move(GET_I2C_DEVICE(0, 0x77))))

// This line is NOT working for GY-87
#define HAL_MAG_PROBE_LIST ADD_BACKEND(DRIVER_HMC5843, AP_Compass_HMC5843::probe(GET_I2C_DEVICE(0, 0x1E), true, ROTATION_NONE))
My Questions:

How can I correctly trigger the MPU6050 I2C bypass in the HAL_MAG_PROBE_LIST for the ESP32 HAL?

I see some other boards use a probe_mpu6000() or similar function to handle this. What is the correct way to implement this for the HMC5883L sitting behind an MPU6050 on a DIY ESP32 board?

Do I need to add a specific PROBE_MAG_IMU_I2C macro or change the driver call to ensure the bypass bit is set before the compass probe starts?

Any help or example configuration would be greatly appreciated.

Thanks in advance!