I am sending two hex values(uint8_t values) from my device such as 0x10, 0x00 to my mobile phone using Bluetooth. I can see a value of 4096. (this includes both 0x10, 0x00 but I don't know whether it shows an added value or so).
if 0x11,0x11 then it shows 4369,
if 0xCA,0x11 then it shows 51729
I am not to figure out what it means and how they are getting converted.
First understand that you aren’t sending “hex” anything. The fact that you wrote those numbers in hexadecimal in your code is irrelevant. They’re just numbers, and writing them in hex or decimal or binary doesn’t change the value at all. It’s just different ways to write the same number.
They’re just values and they’re sent as binary. Everything computers do is done in binary. The other end is just printing them in decimal. Tell the receiver to print in hexadecimal and you’ll probably recognize the values.
Your code is taking 0x11,0x11 = 0x1111 = 4369
Same, 0xCA11 = 51729
What did you expect to do with the “data sets” besides merge them?
Thanks for your reply. I understood. It is a hex value which is getting converted into a decimal on my mobile device. The mobile app which I am using is not open source. That's why I am not able to modify and packet structure is defined in such a way that it can take two values.