jawi/ols — Issue #79: UART decoder cannot always correctly detect baudrate
Author: jawi
Created: 2011-11-11 17:14:43+00:00
State: open
Labels: bug

From :

...
Specifically, it makes the rather baseless (but quite often true) assumption that the bitrate can be found as the most common pulse width (as implemented in BaudRateAnalyzer, where getBestBitLength() returns statData.getHighestRanked()). For your misfortune, your signal contains a lot more double-bit-wide than single-bit-wide pulses (874 vs. 309, actually), therefore the analyzer locks into the double bit width as the bitrate, resulting in the disconcerting conclusion "Baudrate 115200 (exact: 58479)". In essence, it tries to decode at 58479 baud which obviously fails.

This could be fixed either with a manual override for the baud rate, or a smarter detection algorithm - like, for instance, sorting bit lengths in descending order of commonness, then starting with the most common (as now), then verify downwards if any of the less common values are a) smaller then the current bit width AND b) one of their integer multiples in the x2...x8 range comes within, say, +/- 10% of the current bit width (in which case they become the new bit width).
...