can e2e
This commit is contained in:
5
6/CANstrument3/test
Normal file
5
6/CANstrument3/test
Normal file
@@ -0,0 +1,5 @@
|
||||
e2e profile2
|
||||
dataID for counter=0x0b is 0xd2
|
||||
calculate new crc for payload from previous task
|
||||
|
||||
cansend cluster2 100#6f0bc80000000000
|
||||
27
6/CANstrument3/test.py
Normal file
27
6/CANstrument3/test.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import e2e
|
||||
|
||||
#cansend cluster1 100#D300C80000000000
|
||||
|
||||
#b = bytearray(b"\x01\x00\x07\xAD\x07\x62\x08\x71\x62")
|
||||
#b = bytearray(b"\x00\x00\x00\x00\x00\x00\x00\x00")
|
||||
#b = bytearray(b"\x00\x00\x00\xB9\xE6\x6B\x06\x00")
|
||||
b = bytearray(b"\x00\x0B\x10\x15\xC3\x2A\x4A\x00")
|
||||
#for i in range(0,255):
|
||||
# b[0] = i
|
||||
# print(hex(i), end='')
|
||||
# print(" ", end='')
|
||||
#crc: int = e2e.crc.calculate_crc8_h2f(b)
|
||||
|
||||
for i in range(0,255):
|
||||
print(hex(i), end='')
|
||||
print(" ", end='')
|
||||
e2e.p02.e2e_p02_protect(b, 7, bytes([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, i, 0x0d, 0x0e, 0x0f, 0x10]), increment_counter=False)
|
||||
print(b.hex())
|
||||
|
||||
#b = bytearray(b"\x00\x0B\x10\x15\xC3\x2A\x4A\x00")
|
||||
e2e.p02.e2e_p02_protect(b, 7, bytes([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0xd2, 0x0d, 0x0e, 0x0f, 0x10]), increment_counter=False)
|
||||
print(b.hex())
|
||||
|
||||
b = bytearray(b"\x00\x0B\xC8\x00\x00\x00\x00\x00")
|
||||
e2e.p02.e2e_p02_protect(b, 7, bytes([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0xd2, 0x0d, 0x0e, 0x0f, 0x10]), increment_counter=False)
|
||||
print(b.hex())
|
||||
Reference in New Issue
Block a user