# This would be written to test_messages.bin by the test script, # or you can create the file with these exact bytes. # For clarity, showing how it's constructed: # Frame 1: Timestamp response (12345 ms) frame1 = b'\xBB\x55\x00\x01\x01\x04\x39\x30\x00\x00\x49\x95' # Frame 2: Unsolicited Attitude data frame2 = b'\xBB\x55\x00\x01\x04\x06\xE8\x03\xF4\x01\x38\xFF\xC8\x28' # Frame 3: RESP_OK to a SET_UART_CONFIG command (ID 0x18) frame3 = b'\xBB\x55\x00\x81\x18\x03\x01\xA0\xB0\x2D\x24' # Frame 4: RESP_ERR_KEY to a SAVE_SETTINGS_TO_FLASH command (ID 0x23) frame4 = b'\xBB\x55\x00\x81\x23\x03\x07\xC1\xD1\xB0\x0D' # Frame 5: Another unsolicited Timestamp (67890 ms) frame5 = b'\xBB\x55\x00\x01\x01\x04\x32\x09\x01\x00\x42\xCD' binary_file_content = frame1 + frame2 + frame3 + frame4 + frame5