Bug 708 - 9 bit UART decoding not working
: 9 bit UART decoding not working
Status: RESOLVED FIXED
Product: libsigrokdecode
Classification: Unclassified
Component: PD: uart
: unreleased development snapshot
: All All
: Normal normal
: ---
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-03 23:44 CET by Theo
Modified: 2016-10-23 22:30 CEST (History)
4 users (show)



Attachments
session file with 9bit 9600baud uart data (582 bytes, application/octet-stream)
2015-12-03 23:44 CET, Theo
Details
fix uart decoder failure when num_data_bits=9 (785 bytes, patch)
2016-06-07 04:13 CEST, Drew Dibble
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Theo 2015-12-03 23:44:20 CET
Created attachment 194 [details]
session file with 9bit 9600baud uart data

No decode output is shown when 9 bitUART decode is selected. Works fine when 8 bit decode is selected but with framing errors (as the data is 9 bit). Version 0.3.0-git-8f6b98f
Comment 1 Uwe Hermann 2016-02-03 17:57:30 CET
*** Bug 747 has been marked as a duplicate of this bug. ***
Comment 2 Drew Dibble 2016-06-07 04:13:02 CEST
Created attachment 250 [details]
fix uart decoder failure when num_data_bits=9

Current code gives the error:
srd: Protocol decoder instance uart: ValueError: bytes must be in range(0, 256)

when decoding 9-bit serial. Changing bytes() to bin() fixes the error and displays the proper number of bits.
Comment 3 Uwe Hermann 2016-10-23 22:30:22 CEST
Fixed in 98b8913915e8649cca83f543e84fbf128707b5fb.