Commit Graph

635 Commits

Author SHA1 Message Date
Johannes Pohl
5ab8b0985d fix test for OSX 2019-01-08 17:07:03 +01:00
Johannes Pohl
00ea33deb0 CI with Azure Pipelines (#595) 2019-01-08 14:38:15 +01:00
Johannes Pohl
cebf2ec865 Improve test stability (#596)
* fix relpath error for windows
* increase timeout in tests for ci
2019-01-07 16:28:46 +01:00
Johannes Pohl
6a8ce1cba4 Fixes from Deepsec 2018 workshop (#579)
* give Window flags to all dialogs to prevent window closing issues on OSX

* prevent crash in substitution encoding

* remove dead wsp link

* remove save and close button for fuzzing dialog as closing means save

* consider alignment offset when showing selected labels

* make application font size configurable
2018-12-02 15:47:10 +01:00
Johannes Pohl
58f9d77d2c increase timeout for ci 2018-11-24 09:23:37 +01:00
Johannes Pohl
61070d87ac Add native support for PlutoSDR (#574)
* wrap scan and open device method

* basic rx

* wrap param setting

* integrate RX

* integrate TX

* force build

* avoid void arithmetic

* remove print

* improve buffer size settings

* revert appveyor

* update changelog
2018-11-19 09:49:07 +01:00
Johannes Pohl
f78d7cdf0d Bugfix loading decodings and centralized place for decodings (#563)
* Bugfix loading decodings and centralized place for decodings

* fix bug when combining de whitening with external programs
* remove decodings.txt for projects, save it in project file

* update changelog

* fix display bug for aligned messages

* increase timeout for ci

* use default osx image

* use other osx image

* improve stability for noise detection

* try xcode 10
2018-10-31 20:34:06 +01:00
Johannes Pohl
7eee396f95 make auto interpretation optional (#555)
* make auto interpretation optional and add indicator

* update changelog

* fix dc correction save bug

* fix off by one error for label creation

* update changelog

* update changelog

* revert changes

* reformat file

* reformat file

* update requirements

* try older osx imag

* reformat file
2018-10-23 11:21:22 +02:00
Johannes Pohl
e633a788ad Enhance accuracy of automatic interpretation (#550)
* rename signalFunctions -> signal_functions

* basic methods for auto interpretation

* cythonize k means

* reorder tests

* remove check and update gitignore

* estimate tolerance and implement score for choosing modulation type

* use absdiff

* remove comment

* cythonize messsage segmentation

* improve message segementation and add test for xavax

* integrate OOK special case

* add check if psk is possible

* integrate xavax and improve score

* improve noise detection

* add test for noise detection multiple messages

* improve noise detection

* homematic fix: use percetange of signal length instead of num flanks

* homematic has some trash at start of messages, which counts as flanks
* additonally set score to 0 if found only one bit length lower 5

* calculate minimum bit length from tolerance

* improve noise noise detection

* refactor limit and propose new limit calculation

* improve minimum bit length penalty

* only increase score for mod_type if bit length surpasses a minimum
* this way scoring loop later becomes easier and
* score is more accurate as there is no division needed which does
  not scale well with the length of message vectors

* remove demodulated complex files and demod live in tests

* remove enocean.coco

* add a new check to prevent PSK misclassification

* add tolerance unit test
* use z=2 for finding outlier free max in tolerance estimation

* prevent numpy warnings

* adapt threshold of unit test

* normalize the score by dividing by plateau vector length

* improve OOK segmentation:

Use minimum pulse length instead pause length for reference

* use 50 percentile for detecting n_digits in plateau rounding

* add elektromaten integration test

* improve center detection to deal with varying signal power levels
* use 10% clustering for rect signal
* calculate min and max of each cluster
* return max(minima) + min(maxima) / 2

* improve the center aggregation, separate between modulation types

* add validity checks if message can be ASK or FSK modulated

* use a weighted mean for center estimation: 60/40 for high/low

* improve bit length estimation: use decimal deviation for filtering

* add scislo test

* improve tolerance estimation: use 50 percentile + revert to normal mean for bitlength estimation

* add haar wavelet transform

* add median filter

* rename to Wavelet

* add signal generation with configurable snr for lab test

* add method for testdata generation

* prepare fsk test: generate messages and estimate parameters

* improve performance of plateau length filtering

* remove unused import

* improve robustness

* improve robustness

* add fsk error plot

* only append bit length if it surpasses minimum

* fix plot title

* improve noise level detection, prevent it from being too low

* integrate all modulations to test

* increase pause threshold for ook

* improve tolerance estimation

* improve noise detection: take maximum of all maxima of noise clusters

* improve scoring algorithm to prevent PSK misclassify as FSK

* use histogram based approach for center detection

* modulation detection with wavelets

* fix median filter when at end of data

* integrate modulation detection with wavelets

* improve robustness

* improve psk parameters

* improve psk threshold

* improve robustness

* swap psk angles for easier demod

* better xticks

* add message segmentation test and fix noise generation snr

* add error print

* update audi test

* fix runtime warning

* improve accuracy of center detection

* avoid warning

* remove unused functions

* fine tune fsk fft threshold

* update esaver test

* improve fsk fft threshold

* change test order

* update enocean test signal

* update enocean test signal

* enhance bit length estimation: use a threshold divisor histogram

* improve noise estimation: round to fourth digit

* update enocean signal

* consider special case if message pause is 0

* remove unused

* improve noise detection

* improve center detection

* improve center detection

* prevent warning

* refactor

* cythonize get_plateau_lengths

* improve syntax

* use c++ sort

* optimize PSK threshold

* optimize coverage

* fix buffer types

* integrate new auto detection routine

* update test

* remove unused stuff

* fix tests

* backward compat

* backward compat

* update test

* add threshold for large signals for performance

* update changelog

* make algorithm more robust against short bit length outliers

* make multi button for selecting auto detect options

* update unittest
2018-10-18 18:59:04 +02:00
Johannes Pohl
353868768d UI Upgrade of message type configuration (#532)
* first step of message type ui upgrade

* remove preselected index from ProtocolLabelDialog constructor

* remove selection changed for label

* move edit message type button to table

* remove delete button, functionality is now in table

* improve message type context menu

* add color selection to protocol label table

* allowing hiding of message types

* sync selection between message type table and message table

* make label visibility configurable in table

* enable deletion of labels in table

* update unittests

* fix selection bug

* update coveragerc

* support copy of labels to other message type

* avoid creating new object when reading message types from project

* fix test

* update changelog

* Make configuration button transparent

* selected label bold

* resize headers

* add show/hide all action

* same behaviour for label edits in tables

* adapt unittest

* cleanup on_table_selection_timer_timeout + update selection ui

* make current label and message type bold + add message type icon

* adapt unittest

* draw number of configured rules

* increase timeout for ci

* show num active rules only

* minor fixes

* increase timeout for ci

* sync show state

* disable grid

* close all -> close all files

* add close project action

* fix close project action

* clear message types on new project

* update changelog and project dialog buttons

* adapt unittests

* adapt unittests

* remove live update of qapp style to prevent segfault

* improve icon
2018-09-27 18:06:22 +02:00
Johannes Pohl
7f69d05f82 add version check and backward compatibility for bladerf 2018-09-11 15:14:59 +02:00
Johannes Pohl
6b52d0822b add native BladeRF support (#524)
* pxd until bladerf_enable_module

* wrap open and close

* wrap channel count

* wrap gain settings

* wrap sample rate setting

* wrap bandwidth and frequency setting

* wrap rx

* integrate rx

* use manual mode when setting gain

* set gain mode manual only for rx

* update changelog

* enable tx

* add bladerf to native tests

* add info about rbf
2018-09-07 15:06:05 +02:00
Johannes Pohl
aac089f238 prevent test failures on arch linux, add cleanup routine 2018-08-27 10:32:15 +02:00
Johannes Pohl
ae39de03b1 update unittest 2018-08-14 21:40:45 +02:00
Johannes Pohl
573b8211d3 update unittest 2018-08-14 21:32:19 +02:00
Johannes Pohl
cd3b1d64da rename signalFunctions -> signal_functions 2018-07-30 11:10:25 +02:00
Johannes Pohl
9b0f6db7a8 fix unittest for numpy 1.15 2018-07-24 21:21:14 +02:00
jopohl
2277fb7003 change base class 2018-07-19 07:54:45 +02:00
Johannes Pohl
735196752e make timers in tests single shot 2018-07-19 07:54:45 +02:00
Johannes Pohl
c781287a80 enhance ask modulation, use square root of magnitudes for display (#503)
* enhance ask modulation, use square root of magnitudes for display

* adapt unittests
2018-07-16 16:45:43 +02:00
Johannes Pohl
7161f1a698 refactor qttestcase 2018-07-13 16:54:36 +02:00
Johannes Pohl
90cd4a21e4 fix hiding for multiple selected rows in analysis (#499)
* fix #496 hiding for multiple selected rows

* update changelog

* update appveyor

* add log

* set project file read only

* use a dedicated file for cli project test

* copy to tmp

* cleanup file
2018-07-13 13:57:47 +02:00
Johannes Pohl
7fdc05ab01 Save antenna selection (#494)
* fix #493

* update changelog

* refactor open label dialog test
2018-07-08 15:30:10 +02:00
Johannes Pohl
929d4310e4 allow save and load of binary protocols (#488)
* allow save and load of binary protocols

* update changelog

* use vs2017 for appveyor

* update requirements

* update travis
2018-07-03 12:04:56 +02:00
Johannes Pohl
79bcb54eef adapt target num samples to new pause API 2018-06-26 09:48:22 +02:00
Johannes Pohl
5ac33fa30c Add alignment action in analysis (#458)
* add align action to gui

* initial message alignment

* consider alignment in diff and search

* add reset link for alignment

* consider alignment in setData

* rebuild icons + change placeholder text of search line edit

* catch None error

* increase timeout for ci

* fix restore selection + label adding for aligned messages

* consider alignment for labels

* consider alignment offset when calculating column count

* enhance show diff unittest

* scroll to alignment

* consider hidden labels when changing alignment

* update changelog
2018-06-24 21:02:37 +02:00
Johannes Pohl
683b963f58 increase timeout for ci 2018-06-22 17:25:34 +02:00
Johannes Pohl
33c3009f00 make relative external programs paths relative to project path (#471)
* make relative external programs paths relative to project path

* update changelog

* use realpath in unittest

* update unittests

* protect system commands like cmd.exe from being made relative

* increase timeout for ci

* remove x flag

* remove realpath
2018-06-22 11:49:55 +02:00
Johannes Pohl
3e621815de improve device selection in options, use a table instead of a list view (#469)
* improve device selection

* refresh gnuradio installed status + write changelog

* adapt unittest to new view

* reformat changelog

* optimize device table flags

* add qwait so model data gets called during test

* Revert "add qwait so model data gets called during test"

This reverts commit f1250b7c25.

* add to coveragerc
2018-06-20 19:36:13 +02:00
Johannes Pohl
55e4fad7e2 improve test 2018-06-19 10:41:51 +02:00
Johannes Pohl
543d7f3b5e compress larger test signals 2018-06-18 20:26:13 +02:00
Johannes Pohl
91f639f89e refactor unittest 2018-06-18 11:42:20 +02:00
Johannes Pohl
fdccc62364 increase timeout for ci 2018-06-17 23:28:41 +02:00
Johannes Pohl
5569b1b10a Prebuild device extensions (#462)
* precompile device extensions

* set lib path

* prevent double build

* download libs in travis

* fix unittest

* update path

* protect access

* adapt shared path to linux

* sort os listdir

* ensure libstdc++ loaded first

* change name

* remove required

* improve test

* add usrp test

* set shared library path when processes spawn

* test pypi release with travis

* test pypi release with travis

* test pypi release with travis

* skip cleanup

* fix pypi test link

* test wheelhouse build

* skip tests

* fix path

* fix dir

* cd repo

* quote var

* do not use for loop

* add missing quote

* quote dollar

* script deployment

* fix twine upload

* deploy libs only for windows

* add 32 bit support

* fix command

* disable 32 bit

* push version for test

* push ver

* prepare merge

* trigger build

* fix windows path

* improve shortcut

* remove debug

* edit copyright
2018-06-17 22:31:36 +02:00
Johannes Pohl
26e5bbb492 Add a CLI (#440)
* add argument parser for CLI

* add pause to cli

* parse messages to send

* add send function

* use while loop instead of hard sleep

* use logger for error msg

* use tabulator for progress bar

* prepare rx mode

* use Thread for Protocol Sniffer instead of qt signals

* adapt tests

* fix thread can only be started once error

* enable receiving from command line

* support send from file

* save gain correctly

* enable rx into file

* remove unused signal

* enable raw rx and file mode

* add support for device identifier

* add support for default pause

* enable abort sending witt ctrl c

* support encodings

* make logging multiprocessing aware and add autobuild extensions to cli

* move place

* fix sniffer when receiving multiple messages at once

* add test for modulator cli parsing and fix some bugs

* extend modulator test and fix another bug

* add unittests and reorder urh_cli structure

* add tests

* adapt CI to CLI tests

* force osx

* fix osx

* adapt close dialog method

* remove close dialog method

* test read messages to send

* centralize read messages method

* increase timeout for ci

* support loading of project files to load cli values

* add sleep for ci

* add cli to deployment

* replace static calls with ProjectManager Class

* use time sleep instead of qwait

* disable gc collect call

* disable gc collect for python 3.4 only

* gc collect only for osx

* simplify cleanup

* simplify cleanup

* advanced cleanup only for windows

* cleanup also for osx

* gc collect for osx

* add unittests

* consider frozen app path

* init multiprocessing first

* enable logging on cli for windows

* use log file handler for log

* add missing import
2018-06-01 09:59:53 +02:00
Johannes Pohl
cfbec470d3 Allow export of spectrogram and demodulated view (#437)
* add export for demodulated signal

* allow to export spectrogram

* improve initial names

* increase timeout for ci

* update coveragerc
2018-05-22 11:17:38 +02:00
Johannes Pohl
7407c6b375 Multi device support (#432)
* control device extensions with macros remove fallback logic

* wrap hackrf device list method

* add multi device support for hackrf

* fix argument order

* add multi dev support for rtlsdr

* add multi device support for lime sdr

* add multi device support for sdrplay

* multi device support for usrp
2018-05-03 16:47:50 +02:00
Johannes Pohl
a0469f11bf Add SoundCard Support (#433)
* add test for sound device lib

* add trace for missing portaudio

* optimize imports

* add test for pyaudio

* initial soundcard implementation with health check

* enable rx for soundcard

* enable tx for soundcard

* make sample rate configurable

* python 3.4 compat
2018-05-01 19:19:08 +02:00
Johannes Pohl
3214d8a459 adapt coveragerc 2018-04-20 17:49:21 +02:00
Johannes Pohl
e8311d1a7d add test for insert column in simulator 2018-04-20 17:49:21 +02:00
Johannes Pohl
ae3f174950 add unittest for editing constant ranges 2018-04-20 17:49:21 +02:00
Johannes Pohl
09026b9952 make endianness selectable in order column (#428)
* make endianness selectable in order column

* improve display for BE and LE

* add test for choosing endianness

* update coveragerc
2018-04-17 13:05:01 +02:00
Johannes Pohl
e322cef324 start rx/tx only when needed in simulator 2018-03-26 15:50:53 +02:00
Johannes Pohl
d1a75d1cea check result of external programs when receiving message 2018-03-26 15:50:53 +02:00
Johannes Pohl
bb8d8ab63a remove while loop in test 2018-03-21 16:09:32 +01:00
Johannes Pohl
98574c1129 Save num sending repeats (#415)
* save num sending repeats

* show device tab by default

* adapt unittest

* optimize teardown

* adapt travis conf

* update travis

* improve test

* add verbose flag

* remove options dialog test

* improve open recent test

* improve open recent test

* remove verbose flag

* set depth back
2018-03-21 15:19:10 +01:00
jopohl
f6296126ed increase timeout for tests 2018-03-20 22:44:37 +01:00
Johannes Pohl
cdc10d7d76 Improve CRC performance (#412)
* Find correct parameters for crc and datarange

* Adapt output to URH values

* Added bit2int method and a length fix

* Cython implementation of crc

* cython implementation for crc (first shot)

* Fixed cython crc algorithm and renamed old crc algorithm to reference_crc.
Added tests that compare results of old and new algorithm.

* Huge performance increase for crc bruteforce test

* Performance test with cython code within python

* Cleaned up

* - Removed padding of data to %8 bits
- Some bugfixes

* performance improvement for guess_standard_parameters_and_datarange

* minor updates

* Delta Improvement

* slight performance improvement of delta algorithm

* Delta improvement implemented and used by default

* Delta improvement implemented and used by default

* Delta improvement implemented and used by default

* Bugfix for homematic encoding/decoding
2018-03-20 15:18:44 +01:00
Johannes Pohl
00490c5229 optimize timeout for test 2018-03-11 23:51:02 +01:00
Johannes Pohl
79c8ac467e Optimize Tests 2018-03-11 22:19:55 +01:00