Commit Graph

22 Commits

Author SHA1 Message Date
Vasil Velichkov 46c90bec99 Various python3 related changes
- Use relative import for grgsm's modules
- Convert map to list
- Remove the hier_block.py workaround as as gnuradio 3.7 is no longer
  supported in this branch

Change-Id: I5ca8fd340823996e8c444aaf18ddacd85c92ab1c
2021-05-03 07:14:00 +02:00
Vasil Velichkov 54580d148d Filter out SoapyAudio devices
When gr-osmosdr is compiled with SoapySDR support and SoapyAudio is
installed the audio device is picked as a first choice when detecting
devices but grgsm tools are not able to work with audio devices. So in
such cases the user has to always specify the correct SDR device in the
args parameter which is a bit inconvenient.

When args is not specified call osmosdr.device_find to get all devices
and filter out unspported ones like SoapyAudio devices. When args is
specifed just try to create osmosdr.source with whatever value has been
specified.

Add -l and --list-devices command line option that prints information
about all detected devices.

Example commands:
  grgsm_capture --list-devices
  grgsm_capture --list-devices --args=nofake
  grgsm_capture --args=uhd,type=b210 -a 111 capture.cfile
  grgsm_livemon --args=rtl
  grgsm_livemon --args=uhd,type=b210

Change-Id: Ib84081041ca6c2bc18b9da0c32bac9d3ecef65ca
2019-05-03 00:20:34 +03:00
Vasil Velichkov fb1f65c572 grgsm_scanner: Add --debug option
When set the stdout and stderr won't be redirected to /dev/null which
will facilitate resolving issues

Change-Id: I11e99facb5a1ab9c9bfee3c314a91a74f98a2523
2018-09-11 08:13:23 +00:00
Piotr Krysik ea44d98558 Commenting out a line causeing crash on HackRF 2018-06-02 12:27:58 +02:00
Piotr Krysik 3dfa11b89e Making arfcn<->freq conversions more robust and uptading apps depending on it 2017-09-06 17:48:38 +02:00
Petter Reinholdtsen 1eeb1b4a2b Fix fatal typo in channel_info.__repr__().
The format list is one value too short.  Add the missing %s.
2017-08-27 05:39:47 +00:00
Piotr Krysik 3138f90f6e Merge branch 'scanner-str-repr' of https://github.com/petterreinholdtsen/gr-gsm into petterreinholdtsen-scanner-str-repr
# Conflicts:
#	apps/grgsm_scanner
2017-08-26 11:43:11 +02:00
Piotr Krysik aed9f5cc80 Fixed problems resulting from Nones returned when no such frequency or ARFCN exists. 2017-08-26 11:25:53 +02:00
Piotr Krysik 8a771785ca Merge branch 'reuse-scanner' of https://github.com/petterreinholdtsen/gr-gsm into petterreinholdtsen-reuse-scanner 2017-08-26 11:00:00 +02:00
Petter Reinholdtsen 284282ef68 Change channel_info to provide both __str__ and __repr__.
The __str__() function should be used for pretty-printing of the
class, while __repr__ should be used to print a complete
representation of the class.  Earlier __repr__ would not include all
the information in the class.
2017-08-24 11:33:03 +02:00
Petter Reinholdtsen 6a7dc449e5 Restructure grgsm_scanner to allow its reuse from python
Split the main() function into do_scan() and argument_parser() and
move the result printing into a function pointer passed to do_scan().
This allow the scanner to be reused as a library from python.

Here is one way to reuse it:

  import imp
  scanner = imp.load_source('scanner', '/usr/bin/grgsm_scanner')
  (options, args) = scanner.argument_parser().parse_args()
  list = scanner.do_scan(options.samp_rate, options.band, options.speed,
                         options.ppm, options.gain, options.args)
  print list
2017-08-24 10:46:43 +02:00
Piotr Krysik a6268a5bc1 Big update of copyright statements so they can be automatically processed to produce debian/copyright file 2017-08-23 16:02:19 +02:00
Piotr Krysik dd86a9986f Fix (hack) of lack of text output of the scanner 2017-03-30 10:53:58 +02:00
Piotr Krysik 881b6c3139 Added gain option to the wideband_scanner - so changing gain parameter have effect 2017-03-30 10:53:25 +02:00
Roman Khassraf a5f5a31559 Fixes incorrect arguments in wideband_scanner 2016-11-20 22:11:46 +01:00
Roman Khassraf 98af2c97e1 Reflecting changes of arfcn module, re-ordering of output code to prevent messages about reattached kernel driver 2016-09-23 07:26:13 +02:00
Piotr Krysik fe538eba62 Changes to apps after frequency offset correction major change 2016-07-18 18:14:49 +02:00
Piotr Krysik 388bc0d1cf Corrections of parameters of clock_offset_control block 2016-07-15 14:17:05 +02:00
Piotr Krysik 6577ec215e Update applications to work with new gsm_input block 2016-07-15 13:21:09 +02:00
Piotr Krysik 773a194c32 Big change of the universal control channels demapper:
-simplification of the universal demapper,
-addition of hierarhical blocks for each of the demappers - so they also look well and readable in python,
-addition of helper script for compilation of the demappers.
2016-05-20 12:45:54 +02:00
Piotr Krysik 7185b6664f Added ability to supply device arguments as parameter to applications.
Change adressing #140 enhancement request.
It is possible to select rtl-sdr dongle:
-with device index through commanline parameter: `--args="rtl=1"` (where 1 is the device index). Caution: device index is not unique identifier and it changes on each connection of the dongle.
-with devices serial number, the commandline option in this case has following form: `--args="rtl=00000001"` (where 00000001 is the serial number).

NOTE: You can set the serial number with use of:
```sh
rtl_eeprom -s <serial_number>
```
2016-02-14 20:24:54 +01:00
Piotr Krysik 332e0b5c6b Changes of names of applications
-removed 'airprobe' from names completely,
-removed '.py' from names,
-moved programs that don't use gr-gsm blocks to the 'apps/helpers' directory.
2016-02-13 18:37:32 +01:00