[HMC5883L Magnetometer] - Wrong Scaled values

If you are getting raw values of 4096 all the time, it looks suspiciously like you have a 12 bit A/D converter there which is stuck on limit. Or maybe 13 bits. Stuck on limit, anyway.

This could mean that the device is not working properly. It could also mean that your I2C communication isn't actually working but the microcontroller end of the I2C doesn't realise it is doing nothing and actually thinks it is reading something.

I recently got several of these devices and had quite a bit of bother getting them to work, although they all eventually did.

I downloaded several bits of library code to read the device, some of them had problems, eventually I wrote a new one which works for me on all of my devices.