When connecting the GPS module WalkSnail WS-M181 to my MicoAir743v2-AIO-45A, PX4 (tested with versions 1.15. and 1.16.) does not recognize its compass. and reports that no compass present. GPS part of the module seems to work fine.
Oddly enough, Betaflight and ArduPilot do recognize it, but identify the chip as IST8310, while the official webpage says the chip is QMC5883.
I have carefully checked the wiring and measured the correct voltage at the module’s input (behind the UART port).
Does anyone have any idea why this might be happening and what could I try?
I think you are looking at the wrong board: x-mav ap-h743v2 instead of micoair743v2.
This makes things even weirder: config file for micoair does not list any magnetometer drivers and yet both ist8310 and qmc5883 chips from other gps modules are working fine (I can share some output for those working cases). This might be because MicoAir743v2-AIO-45A does not have any internal compasses.
However, why then the init script starts a magnetometer driver and why with the option -I (for internal compass), even though the comment above says: “External mag”. This seems like a bug. If this board does not have any internal magnetometers, I assume it should not try to start any driver. Even if it does, it should be with the option -X instead of -I.
Regarding my walksnail module, I am unable to start the driver manually. qmc5883l -X -b 1 -a 0x0C start outputs WARN [SPI_I2C] qmc5883l: no instance started (no device on bus?). And i2cdetecet outputs:
I see there is also some driver named “qmc5883p”, what is it and how is it different from qmc5883l? It is not built by default but maybe that one is needed? I have no further idea what might be the problem.
I edited my startup script. My bad it was wrong.
when you do common_mag_y all drivers should be built inside magnetometer drivers.
Below are couple differences based on the drivers:
I2C Address:
QMC5883L: 0b0001101 (0x0D)
QMC5883P: 0b0101100 (0x2C)
Chip ID:
QMC5883L: 0xFF
QMC5883P: 0x80
Register Map:
QMC5883L: Data starts at 0x00, CHIP_ID at 0x0D
QMC5883P: CHIP_ID at 0x00, Data starts at 0x01
Your command qmc5883l -X -b 1 -a 0x0C start should actually work since the device is detected at 0x0C! But it’s failing during the probe I think.
Looking at probe line, the probe reads CHIP_ID register (0x0D) and expects to see 0xFF. Your sensor might have a different chip ID, or it could be a QMC5883P instead.
but then, the micoair image that is found here is probably built wrong because qmc5883p driver is not present. I have built it myself now and tried, but unfortunately it does not work: nsh> qmc5883p -X -b 1 -a 0x0C start WARN [SPI_I2C] qmc5883p: no instance started (no device on bus?)
The only conclusion left is that IDs do not match, i.e. RegisterRead(Register::CHIP_ID) is not returning 0xFF. How do you know it returns 0x0D? And how do I correct this? I can of course edit the source file and build it myself, but is there a better way that could potentially help others as well?
Lastly, should I report the micoair startup script starting an internal sensor when there isn’t one as a bug?