As I mentioned in #8 I haven't actually executed this code... but there seems to be a bug in the protocol header parsing in parse_header():
frame_id = (header >> 5) & 3
endpoint = (header >> 3) & 3
status = (header >> 2) & 3
length = header & 3
status uses two bits here, it looks like it should use only one based on https://dev.tillitis.se/protocol/#response-frame-format:
status = (header >> 2) & 1
As I mentioned in #8 I haven't actually executed this code... but there seems to be a bug in the protocol header parsing in
parse_header():status uses two bits here, it looks like it should use only one based on https://dev.tillitis.se/protocol/#response-frame-format: