i am doing corebluetooth
application and able to receive the data from the peripheral in the hex format i need to parse the data to integer format and is there any method to convert the data to integer format from hex format please help Below values iam getting
NSstring *data
is
011f6d000000160000000000040507010500054607db051705173a0600053d
Nslog(@"data is Ð`@PpPT`}°QpQs")
And also please help if there is any method for converting the data to the string also.
Define a struct with all the correct types and order. Point the struct to the data. Then just access the items via the struct elements. Be careful with the types, it is probably best to use well defined types such as int8_t, uint8_t, uint16_t, int16_t, etc to insure the correct element size. You will want a "packed" struct, not alligned to the CPU alignment size.