Servers by jDrones

UC4H Mag calibration fails

Hey @olliw42 @ppoirier
I’m trying to get Magnetometer working using UC4H on Bluepill. Every time I try to calibrate, the calibration fails. Sometimes the calibration gets completed, But I get “Bad compass health” message.
Looking for suggestions.


Thank You!

I get “unknown message 1002” message. Mag data comes after flashing and it vanishes on later boots.

Are you using Betacopter or Arducopter?

Arducopter! But bus data started showing unknown message 1002.

which firmware version you have flash?

I would try Betacopter and see if the problem is gone. Have you loaded the UC4H specific message descriptions into the UAVCAN GUI tool?

I’m running uc4h-gpsmagbaro-v028 and Arducopter 4.0.3Dev

I’ll give Betacopter a try! No, I haven’t loaded UC4H specific message on UAVCAN GUI tool. How do i do it?

ok… what kind of gps and compass?
just consider that you can use a different binary… the one you are using its out of date.
You can compile a new update version with Ubuntu…

I’m trying with HMC5883 mag. Can you direct me to latest binary?

yes… i will compile it for MCU stm32f103, you can flash the binaries with an stlink

Voilà…

AP_periph: must be flashed on the following address: 0x8006400
AP_bootloader : must be flashed on the following address: 0x08000000

AP_Periph_with_bl.hex: it contains bootloader and the firmware

UAVCAN GUI Tool

In order to be able to decode the UAVCAN messages on the CAN bus, this tool must know about the definitions of the UAVCAN messages. The UC4H-specific uavcan.olliw.uc4h.GenericBatteryInfo, uavcan.olliw.uc4h.Notify, and uavcan.olliw.uc4h.Distance messages used by the UC4H PowerBrick, UC4H Notifier, and UC4H RangeFinder nodes, as well as the STorM32 UAVCAN messages, are not part of the standard set. They thus need to be made aware to the tool by copying the message definition files to a particular folder: Move the folder „olliw“ and it’s subfolders with the .uavcan dsdl definition files to the folder „C:\Program Files (x86)\UAVCAN\UAVCAN GUI Tool\uavcan\dsdl_files\uavcan\“. Now, after a restart, the UAVCAN GUI tool should show the new messages in e.g. the bus monitor, and not display „unknown“.
http://www.olliw.eu/2017/uavcan-for-hobbyists/

The latest binaries

Servers by jDrones