we connected a here2 in can mode on pixhawk cube but sometimes at startup, here2 was not recognized. very strange because when it’s recognized everything works fine.
so we decided to come back in i2c mode (moving the switch in here2, changing the wire and connecting in gps1 port). now the here2 is always recognized (appearing in HW ID window) BUT there is a value of 0 in magfield (magfield 2 and 3 show values of the 2 internal compasses). gps is well recognized and works fine.
If you can see the HWID of compass, that means it is recognized. Maybe you need to change the compass order in Mission Planner > Setup > Mandatory Hardware > Compass > Compass Priority screen.
not sure how old is your here2, but you may try updating your here2 firmware to the latest using Mission Planner. Use the search firmware from internet function in MP.