how to protect device functionality (firmware)

Hello, i have built a prototype and have written an application firmware.

Device will send data logs on server database.

How can i protect the authentication of the data logs (produced by original firmware and not modified)

Adding some code in bootloader , looking for verification value in firmware in order to update (so I can only update) ?
Adding verification value between device and server (on run-time verificatoin)?

Use end-to-end encryption and make it completely impossible for an unauthorized person to access the sending device.

device will be given to people, i just would like to know if its possible to make someone's life hard to hack/cheat

There is always a tradeoff between the expense of making something hard to crack, and the value of the information that can be gained by doing so. Consider consulting a security professional.

hm well you can always remove sensor (mpu9250)which produce the data for logging hack it( to produce different data) and you dont need to hack the encrypted firmware :confused: