+def get_area_info(dev):
+ for i in [0,1,2]:
+ print("===================")
+ packed = pack_pkt(ARE_CMD, [str(i)])
+ dev.send_data(packed)
+ info = dev.recv_data(23)
+ msg = unpack_pkt(info)
+ fmt = '>BIIII'
+ KOA, SAD, EAD, EAU, WAU = struct.unpack(fmt, bytes(int(x, 16) for x in msg))
+ print(f'Area {KOA} - {hex(SAD)}:{hex(EAD)}')
+ print(f'Erase {hex(EAU)} bytes - write {hex(WAU)} bytes')
+