All Questions
Tagged with python-bytearray hex
3 questions
0
votes
1
answer
53
views
How can I manipulate the syntax of an AT command and assign a method value in Python?
print(bytes(npArray))
print(bytes(npArray).hex())
ser.write(b'AT+DTRX=0,2,16,00003f0101007a00\r')
response = ser.read(100)
print(response.decode())
I have the above snippet in Python, which delivers ...
-1
votes
1
answer
3k
views
Try to reverse an bytearray(from hex) in python
I have the following script:
hex_string = "c23dba5fcac1048b3c050266ceb6a0e870670021"
hex_bytes = bytearray.fromhex(hex_raw)
print(hex_bytes.reverse())
The problem it prints/returns None. I ...
0
votes
0
answers
111
views
Creating Byte Object in Python3.x
I have a question considering python3. I am already trying for a few days to create a byte object, which looks like these:
b"'\x10\x00\x0020180425"
The first part '\x10\x00\x00 are two int16 objects ...