I want to get the first 6 bytes from payload as a single number or string.
for byte_pos in range(6):
byte_content = ord(payload[byte_pos])
Assume the payload is 1 2 3 4 5 6,
for byte_pos in range(6):
print ord(payload[byte_pos])
This will result as follows, 0x1 0x2 0x3 0x4 0x5 0x6
But what I need is a single number/string like 123456. How to combine these single numbers to make 123456?
How to convert these 6 byte_contents to a single number or string.