Compass Sensor 0 Missing

Iā€™m working with a Cube Orange Plus mounted to a CubePilot and trying to get the internal magnetometer to be used as compass 0 for my quadcopter drone. When I attempt to calibrate the compass I receive the message ā€œno mags foundā€ and the calibration fails. However, I am able to see the digital displays for the compass and horizon line on QGC react to the movements of the drone. The MAVLink command ā€œsensors statusā€ does not appear to list any connected compass/magnetometer and the ā€œlistener sensor_magā€ gives the message ā€œnever published.ā€ I believe this issue is keeping me from properly arming the drone as well since I am receiving the ā€œMAV_CMD_COMPONENT_ARM_DISARM command temporarily rejectedā€ warning when I attempt to arm. Does anyone know how to solve this issue or is it a bug with the current Cube Orange Plus experimental build?

Got the same issue myself. It seems the problem is with the latest PX4 commit. I tried uploading the cubeorangeplus firmware using an old PX4 version (downloaded in Jul-2023) and it worked fine. The ā€œno mags foundā€ error is gone.

Thanks for the note @BusterB and @Pravin_Kumar. I will look into this. In the meantime, could you please paste the output of dmesg in this thread?

Just open the MAVLink shell in QGC and type dmesg.

Hi @JulianOes,

Please find the dmesg output for the scenario where ā€˜no mags foundā€™ is occurring. Additionally, Iā€™m providing the dmesg output from the previous PX4 commit where the issue did not occur.

nsh> dmesg
HW arch: CUBEPILOT_CUBEORANGEPLUS
PX4 git-hash: 61aee73b91ff76c6555173bc0c7846d7c7dab7e2
PX4 version: 1.14.0 80 (17694848)
PX4 git-branch: main
OS: NuttX
OS version: Release 11.0.0 (184549631)
OS git-hash: c23b72dffeb0de0d1a836ab561eb9169c4a9e58e
Build datetime: Sep 22 2023 23:25:05
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 10.3.1 20210621 (release)
PX4GUID: 000600000000323037343331511800340024
MCU: STM32H7[4|5]xxx, rev. V
INFO [param] selected parameter default file /fs/mtd_params
INFO [param] importing from ā€˜/fs/mtd_paramsā€™
INFO [parameters] BSON document size 976 bytes, decoded 976 bytes (INT32:15, FLOAT:29)
INFO [param] selected parameter backup file /fs/microsd/parameters_backup.bson
Board architecture defaults: /etc/init.d/rc.board_arch_defaults
Board defaults: /etc/init.d/rc.board_defaults
Loading airframe: /etc/init.d/airframes/4001_quad_x
INFO [dataman] data manager file ā€˜/fs/microsd/datamanā€™ size is 62584 bytes
INFO [px4io] IO FW CRC match
Board sensors: /etc/init.d/rc.board_sensors
ms5611 #0 on SPI bus 4
icm42688p #0 on SPI bus 4 rotation 10
ERROR [SPI_I2C] icm42688p: no instance started (no device on bus?)
ERROR [SPI_I2C] icm45686: no instance started (no device on bus?)
ERROR [SPI_I2C] icm45686: no instance started (no device on bus?)
icm20649 #0 on SPI bus 1
ms5611 #1 on SPI bus 1
ekf2 [718:237]
Board mavlink: /etc/init.d/rc.board_mavlink
INFO [mavlink] mode: Minimal, data rate: 2880 B/s on /dev/ttyS4 @ 57600B
Starting Main GPS on /dev/ttyS2
Starting MAVLink on /dev/ttyS0
INFO [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS0 @ 57600B
INFO [logger] logger started (mode=all)
INFO [uavcan] Node ID 1, bitrate 1000000

NuttShell (NSH) NuttX-11.0.0
nsh> WARN [health_and_arming_checks] Preflight Fail: Compass Sensor 0 missing
WARN [health_and_arming_checks] Preflight Fail: Compass Sensor 0 missing
WARN [uORB] orb_advertise_multi: failed to set queue size
INFO [commander] [cal] calibration started: 2 mag
WARN [commander] No mags found
WARN [commander] [cal] calibration failed: mag
INFO [commander] [cal] calibration started: 2 mag
WARN [commander] No mags found
WARN [commander] [cal] calibration failed: mag
nsh>

Output from older commit:

nsh> dmesg
HW arch: CUBEPILOT_CUBEORANGEPLUS
PX4 git-hash: 57b3c26ab0048c4fa163de3074347ecfcaee440b
PX4 version: 1.14.0 0 (17694720)
PX4 git-branch: main
OS: NuttX
OS version: Release 11.0.0 (184549631)
OS git-hash: 3f77354c0dc88793a47ff3b57595195ab45f7ba9
Build datetime: Sep 23 2023 20:17:28
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 10.3.1 20210621 (release)
PX4GUID: 000600000000323037343331511800340024
MCU: STM32H7[4|5]xxx, rev. V
INFO [param] selected parameter default file /fs/mtd_params
INFO [param] importing from ā€˜/fs/mtd_paramsā€™
INFO [parameters] BSON document size 976 bytes, decoded 976 bytes (INT32:15, FLOAT:29)
INFO [param] selected parameter backup file /fs/microsd/parameters_backup.bson
Board architecture defaults: /etc/init.d/rc.board_arch_defaults
Board defaults: /etc/init.d/rc.board_defaults
Loading airframe: /etc/init.d/airframes/4001_quad_x
INFO [dataman] data manager file ā€˜/fs/microsd/datamanā€™ size is 62560 bytes
INFO [px4io] IO FW CRC match
Board sensors: /etc/init.d/rc.board_sensors
ms5611 #0 on SPI bus 4
icm42688p #0 on SPI bus 4 rotation 10
icm20948 #0 on SPI bus 4 rotation 10
icm20649 #0 on SPI bus 1
ms5611 #1 on SPI bus 1
ekf2 [714:237]
Board mavlink: /etc/init.d/rc.board_mavlink
WARN [mavlink] offboard mission init failed (-1)
INFO [mavlink] mode: Minimal, data rate: 2880 B/s on /dev/ttyS4 @ 57600B
Starting Main GPS on /dev/ttyS2
Starting MAVLink on /dev/ttyS0
INFO [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS0 @ 57600B
INFO [logger] logger started (mode=all)
INFO [uavcan] Node ID 1, bitrate 1000000

NuttShell (NSH) NuttX-11.0.0
nsh>

Sorry, live happened. Iā€™m looking into this tomorrow.

@Pravin_Kumar and @BusterB ok this will be fixed with:

I apologize for breaking it and taking a while to look into it.