summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-07hdcp: Simplify some code snippets.Uwe Hermann
2019-12-07hdcp: Add tags.Uwe Hermann
2019-12-07Add HDCP traffic decoder to stack on i2cDave Craig
This decoder annotates i2c traffic to indicate the type of HDCP message contained. It includes HDCP2.2 and HDCP1.4. Useful for analysing HDCP negotiation failures.
2019-12-07ieee488: flush upper layer payload data when IFC assertsGerhard Sittig
Also flush previously accumulated payload data when the IFC signal asserts (interface clear, a controller requests ownership of the bus). This is in line with EOI (end of message) and ATN (start of a command, including change of "connected" peers or direction of communication).
2019-12-07ieee488: introduce 'delim' option for improved text outputGerhard Sittig
When a capture contains output from a talking device, but neither contains EOI (end of transmission) nor ATN (new commands, including changes in the set of communicating peers or communication direction), then lower layer data bytes would be shown but accumulated runs of upper layer payload data would not. The hp53131a-ton.sr capture demonstrates this behaviour. Add transparent support for the typical case of communicating SCPI over GPIB. Do emit upper layer payload data annotations when termination sequences for text lines were seen. Allow users to disable this feature when it's not appropriate for binary content. It's an internal implementation detail that accumulated data gets flushed. Communicate the user visible option as "payload data separation", which should most appropriately reflect the resulting behaviour. The specific implementation of this feature can also support different kinds of payload chunk separation.
2019-12-06Obsolete gpib and iec PDs in favor of ieee488.Uwe Hermann
2019-12-06ieee488: Mention more relevant keywords in longname.Uwe Hermann
This can be used by frontends for decoder search features.
2019-12-06ieee488: Simplify _get_raw_byte() a bit.Uwe Hermann
2019-12-06ieee488: introduce unified IEEE-488 decoder (supports GPIB and IEC)Gerhard Sittig
Introduce an 'ieee488' protocol decoder which handles both the 16 lines parallel GPIB variant as well as the serial IEC bus variant. Which kind of supersedes the 'gpib' and 'iec' decoders. This implementation increases maintainability because only the extraction of raw bytes from the parallel or serial bus is separate, and all GPIB related command/address/data interpretation is shared. This decoder extends the feature set of the previous versions: Visual annotations are more fine grained (more classes, additional rows, various text lengths to maintain usability during zoom). There is binary output for communicated data, as well as Python output for stacked decoders. Consecutive runs of talker data gets accumulated, and is made available in binary form as well as text (with escapes for non-printables). The terse single-letter format (character codes '0' to 'O' for addresses) is kept for compatibility for those users who are accustomed to it. The implemented logic also copes with captures of low samplerate, where edges happen to fall onto the same sample number which at higher samplerates shall be perceived as distant and should get processed in their respective order of appearance. This implementation tracks the most recent configuration of "peers" (the set of talkers and listeners). A future implementation might support the isolation of a single conversation out of a busy chat on the bus. Some optional support for Commodore peripherals is included (currently limited to disk channels), while it's recommended to move this logic to a stacked decoder if it grows more complex.
2019-12-03ir_rc6: Reduce nesting level.Uwe Hermann
2019-12-03ir_rc6: Initial commitBenediktO
2019-12-01ir_rc5: improved performanceBenediktO
2019-11-30flexray: Use bit/s instead of Mbit/s for bitrate.Uwe Hermann
This avoids floating point number option values, which makes things a bit easier/clearer on the command-line and also matches what other decoders do. Also, use numbers instead of strings for the option values.
2019-11-30flexray: add basic decoderStephan Thiele
2019-11-30nes_gamepad: implement and add decoderStephan Thiele
2019-11-30uart: Drop question mark from two option names.Uwe Hermann
2019-11-30uart: Shorten various decoder option names.Uwe Hermann
This makes the decoder a lot nicer to use from the command-line. * num_data_bits -> data_bits * parity_type -> parity * num_stop_bits -> stop_bits * rx_packet_delimiter -> rx_packet_delim * tx_packet_delimiter -> tx_packet_delim
2019-11-29uart: rephrase check for required input signals, reword error messageGerhard Sittig
Rephrase the test for the availability of at least one of several optional input signals, and reword the corresponding error message.
2019-11-29uart: support 'ignore' parity type, remove unsupported 'check_parity' optionGerhard Sittig
The previous UART decoder implementation announced a 'check_parity' option which took no effect (support code was missing). Remove it. Add another 'ignore' parity choice instead, which consumes the parity bit's position yet always passes the check.
2019-11-29Remove left-over FSF postal address from boiler plate license text.Uwe Hermann
2019-11-29decoders: Use a slightly more consistent/logical annotation row setup.Uwe Hermann
Generally show "bits" and other smaller annotations in rows that come before "larger" annotations (in later rows).
2019-11-29ir_nec: fix #1243, multiple capture frames.Philipp Marek
2019-11-29ws281x: Check for "None" before subtracting.Philipp Marek
2019-11-29can: more robust sample point position for low sample ratesGerhard Sittig
Do more of the calculation with floating point, only trim precision and enforce integers at the end of the determination of the next sample point. This shall increase robustness at low capture sample rates.
2019-11-29can: implement bit rate switch support for CAN-FD framesStephan Thiele
2019-11-29can: annotate classic CAN CRC as CRC-15Stephan Thiele
2019-11-29lin: calculate checksum on two consecutive UART idle framesStephan Thiele
2019-11-29modbus: Ignore unknown/unsupported types.Uwe Hermann
Without this, e.g. the recently added 'IDLE' ptype of the UART decoder would cause issues.
2019-11-29uart: Document the new 'IDLE' ptype for OUTPUT_PYTHON output.Uwe Hermann
2019-11-29uart: communicate periods of idle frames to stacked decodersGerhard Sittig
Detect periods of a frame's length with idle level, and communicate these time spans to stacked decoders by means of PYTHON output. Do *not* display these idle frames in regular annotations, for backwards compat.
2019-11-28signature: Fix license metadata field to match pd.py license header.Uwe Hermann
2019-11-28signature: Use more human-readable option values.Uwe Hermann
2019-11-28signature: Minor consistency fixes.Uwe Hermann
2019-11-28signature: Add self.reset().Uwe Hermann
2019-11-28Add decoder: signature analysissharow
2019-11-24gpib: drop obscure "total number of samples" optionGerhard Sittig
The gpib decoder tried to "flush" input data at a user specified sample number when the input data lacked the respective edge which triggers the processing during regular operation. This is rather obscure a feature, not seen in any other decoder, perhaps a workaround for bug #292, rather unaccessible to users (units of sample numbers not times nor automatic detection of the EOF condition), highly confusing according to user reports, and not covered by existing tests. The mere presence of this option caused severe issues in application code (see bug #1444). While there is no apparent fix that won't affect other decoders. So let's drop this questionable feature. Valid and complete captures should contain all relevent edges and thus decode properly.
2019-11-24decoder: accept skip count 0 (onewire_link, usb_signalling)Gerhard Sittig
A recent commit tightened the check for acceptable 'skip' sample counts. This broke the onewire_link and usb_signalling decoders' test sequences, which no longer pass with a minimum count of one. Relax the condition and accept a count of zero. This breaks gpib again for low total sample count option values, but this needs to get addressed differently.
2019-11-24decoder: internal 'always false' term, handle invalid skip and channelGerhard Sittig
Introduce an "always false" type for .wait() terms. Map invalid counts of skip conditions (zero or negative numbers) as well as invalid channel references for level/edge conditions to this type which never matches. Keep this "always false" term type an internal detail of the common support code. This is most robust and least intrusive at the same time, it keeps the existing API, and simplifies the implementation of Python decoders for rare edge cases (optional input signals or optional features, handling of initial samples at the very start of a capture). This commit passes sample counts internally in a signed data type. This is essential for proper operation, and the loss of one bit out of 64 shall not be considered a severe limitation. This fixes bug #1444.
2019-11-24tdm_audio: Place each channel on its own annotation row.Uwe Hermann
2019-11-24tdm_audio: Add initial decoderBen Dooks
2019-11-24amulet_ascii: Drop unneeded rxtx_channels.Uwe Hermann
2019-11-24amulet_ascii: Drop a few unneeded parenthesis.Uwe Hermann
2019-11-24Initial Amulet LCD ASCII PDVesa-Pekka Palmu
This is a protocol decoder for the 'ASCII' protocol used by Amulet Technologies LCDs. Currently some commands are not implemented yet. I also lack capture data from a display that will use replies other than ACK and NACK. Reads are untested as I have no suitable captures. The PD copes with bus errors (there is an actual bug in the device I'm reverse engineering) and most of the commands are implemented. The unimplemented commands should generally consume the correct number of bytes from the bus, the exception to this are the drawing commands, because there are actually at least two revisions of them with different payloads, that are really hard to detect in greedy algorithm.
2019-11-23Fix three -fsanitize=undefined issues.Uwe Hermann
instance.c:62:2: runtime error: null pointer passed as argument 1, which is declared to never be null instance.c:858:45: runtime error: shift exponent -1 is negative instance.c:836:45: runtime error: shift exponent -1 is negative
2019-11-23Avoid using Py_IncRef/Py_DecRef for consistency.Uwe Hermann
We currently use a mix of Py_IncRef/Py_DecRef and Py_XINCREF/Py_XDECREF or Py_INCREF/Py_DECREF in the code-base. Only use the latter variants for the time being (for consistency).
2019-11-23srd_inst_option_set(): Fix multiple memory leaks.Uwe Hermann
These were reported when compiling with "-fsanitize=address" and running "PYTHONMALLOC=malloc make check": ================================================================= ==42879==ERROR: LeakSanitizer: detected memory leaks Direct leak of 317 byte(s) in 6 object(s) allocated from: #0 0x7f08e4809538 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144 #1 0x7f08e3f37622 in PyUnicode_New ../Objects/unicodeobject.c:1365 Direct leak of 28 byte(s) in 1 object(s) allocated from: #0 0x7f08e4809538 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144 #1 0x7f08e3f7e1a5 in _PyLong_New ../Objects/longobject.c:275 Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7f08e4809538 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144 #1 0x7f08e3f91521 in PyFloat_FromDouble ../Objects/floatobject.c:122 SUMMARY: AddressSanitizer: 369 byte(s) leaked in 8 allocation(s). session
2019-11-23spiflash: lists.py: Use None for unsupported features.Uwe Hermann
2019-11-23spiflash: Minor fixes for Atmel AT25 chips.Uwe Hermann
2019-11-20spiflash: Add support for Atmel AT25xxxSoeren Apel
2019-11-19Fix multiple PyObject_SetAttrString() related leaks.Uwe Hermann
This fixes bug #1374.