Navio2 and external mag

Hi. I am using navio2 with 3dr external gps+magnetometer. Magnetometer is connected to i2c port. What should I write into config to load mag sensor driver? How can I check that external mag is working?

Hi @ArcsinX,

Try manually starting the hmc5883 driver. df_hmc5883_wrapper start
I’m not sure why it isn’t currently started by default, but if that works we can enable it.

Hi.
Yep, this driver works, but only after I changed device name in source code in src/lib/DriverFramework
— a/drivers/hmc5883/HMC5883.hpp
+++ b/drivers/hmc5883/HMC5883.hpp
@@ -40,7 +40,7 @@ namespace DriverFramework
#if defined(__DF_OCPOC)
#define MAG_DEVICE_PATH “/dev/i2c-0”
#else
-#define MAG_DEVICE_PATH “/dev/iic-2”
+#define MAG_DEVICE_PATH “/dev/i2c-1”
#endif

Also I have one more question: by default only one internal sensor (df_lsm9ds1_wrapper start -R 4) is used. Is there some reason why I could not use two sensors mpu and lsm? I mean why line df_mpu9250_wrapper start -R 10
commented out?

I’m not sure why only a single IMU is started. Right I’m working on unifying the drivers so that Raspberrypi will share the same pixhawk drivers. I’d like to properly resolve these issues as part of that work. https://github.com/PX4/Firmware/pull/7907