MPU-9250 external compass not detected

I have a 3DR PX4 board. Following the instructions from here:

I am able to connect to it the external GPS + compass module from 3DR and calibrate it correctly on Mission Planner.

Now I try to use the MPU-9250 IMU (accel, gyro and magneto) as the external compass. The IMU is mounted on the Grove 9DOF board (, which provides two I2C interfaces (primary and auxiliary).

Unfortunately, the MPU is not detected by the PX4.

Firmware version I am using: APM:Copter V3.4.2 (6076bdf)

I checked the wiring, and it seems to be ok.

Thanks a lot, any help will be appreciated

I had a chat with Tridge who knows more about this kind of thing and I’m afraid we don’t support using the MPU9250’s compass as an external compass. It will work if it’s built right into the board like on many of the new Pixhawk boards.

Some of the code changes required to make this work would be:

  • instantiate the mpu9250 as an i2c IMU first (requires a couple of code lines changed).
  • change our AP_InertialSensor_Invensense driver to run at a lower rate OR change the ardupilot I2C setup to force 400kHz (we normally run at 100kHz because some I2C devices can’t handle 400kHz). One of these two is required because by default the 9250 needs to be sampled at 1kHz which can’t be achieved with I2C running at 100kHz.

Hope that helps.

@rmackay9 I’m up against this with an external 9250 attached to a speedybeef4 board. I entirely see in code where the 9250 is not probed in void Compass::_probe_external_i2c_compasses(void). What do I need to resolve this? I can hack at your bullet points. Let me know.