Both MAGs get the same ID

I have a quad with two magentometers: 1 on the FMU and one next to the GNSS receiver. When calibrating my sensors, both get the same sensor ID. I would like to change the priority of the sensors, but can’t tell them apart with only one identifier. Any way to fix this?

FW details:

nsh> dmesg
HW arch: ARK_FMU_V6X
HW type: ARKV6X
HW FMUM ID: 0x000
HW BASE ID: 0x000
PX4 git-hash: f75a92d19977061eba411bd5a134a59f9fb0407e
PX4 version: 1.14.2 0 (17695232)
PX4 git-branch: release/1.14
OS: NuttX
OS version: Release 11.0.0 (184549631)
OS git-hash: de41e7feaeffaec3ce65327e9569e8fdb553ca3d
Build datetime: Mar 21 2024 09:36:28

Onboard sensor:

nsh> bmm150 status
INFO  [SPI_I2C] Running on I2C Bus 4, Address 0x10
bmm150: reset: 182 events
bmm150: bad register: 0 events
bmm150: bad transfer: 0 events
bmm150: overflow: 0 events
bmm150: self test failed: 0 events

External sensor:

nsh> lis2mdl status
INFO  [SPI_I2C] Running on I2C Bus 1, Address 0x1E
lis2mdl: read: 12247 events, 17922369us elapsed, 1463.41us avg, min 1442us max 1632us 37.722us rms
lis2mdl: comms_errors: 0 events
INFO  [lis2mdl] poll interval:  50000

Sensors status output:

<SNIP>
[vehicle_magnetometer] selected MAG: 794121 (0)
validator: best: 0, prev best: 0, failsafe: NO (0 events)
sensor #0, prio: 75, state: OK
    val:  -0.0621, lp:  -0.0628 mean dev:   0.0010 RMS:   0.0097 conf:   1.0000
    val:  -0.2362, lp:  -0.2358 mean dev:  -0.0006 RMS:   0.0071 conf:   1.0000
    val:  -0.5479, lp:  -0.5422 mean dev:   0.0002 RMS:   0.0042 conf:   1.0000
MAG 794121 EN: 1, offset: [-0.137 0.373 0.110], scale: [1.001 1.077 0.938], Ext ROT: 0
<SNIP>

MAG parameters:

Do you have an idea how to deal with this @AlexKlimaj

I’ve seen this happen before when swapping out different mags/GPS. Just reset the CAL_MAGX_ID params and re-calibrate the mags.

@AlexKlimaj Did you reset both values to 0 via the parameter menu? I have tried this, but after calibration, both MAGs are back to 794121. I will re-test with vanilla PX4 image as well to see if it changes anything.

Yeah just in the parameter editor. Can you provide a log?