{"id":21054646,"url":"https://github.com/bemasher/rtlcap","last_synced_at":"2025-05-15T22:34:18.073Z","repository":{"id":57568401,"uuid":"48010881","full_name":"bemasher/rtlcap","owner":"bemasher","description":"A app which provides rtl_sdr-flavored interaction with an rtl_tcp instance.","archived":false,"fork":false,"pushed_at":"2018-03-04T01:39:50.000Z","size":19,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T16:12:49.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bemasher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-15T01:00:34.000Z","updated_at":"2024-05-08T16:45:06.000Z","dependencies_parsed_at":"2022-08-28T08:20:29.825Z","dependency_job_id":null,"html_url":"https://github.com/bemasher/rtlcap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemasher%2Frtlcap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemasher%2Frtlcap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemasher%2Frtlcap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemasher%2Frtlcap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bemasher","download_url":"https://codeload.github.com/bemasher/rtlcap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254433552,"owners_count":22070492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T16:15:53.330Z","updated_at":"2025-05-15T22:34:14.945Z","avatar_url":"https://github.com/bemasher.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Purpose\nTo implement an rtl-sdr signal capture tool similar to `rtl_sdr` but using `rtl_tcp` instead of direct access to the dongle. We also include a squelch mechanism for ignoring blocks of samples that don't meet a specified power level.\n\n[![AGPLv3 License](http://img.shields.io/badge/license-AGPLv3-blue.svg?style=flat)](http://choosealicense.com/licenses/agpl-3.0/)\n\n### Requirements\n * GoLang \u003e=1.2 (Go build environment setup guide: http://golang.org/doc/code.html)\n * rtl-sdr\n   * Windows: [pre-built binaries](http://sdr.osmocom.org/trac/attachment/wiki/rtl-sdr/RelWithDebInfo.zip)\n   * Linux: [source and build instructions](http://sdr.osmocom.org/trac/wiki/rtl-sdr)\n\n### Building\nThis project requires the package [`github.com/bemasher/rtltcp`](http://godoc.org/github.com/bemasher/rtltcp), which provides a means of controlling and sampling from rtl-sdr dongles via the `rtl_tcp` tool. This package will be automatically downloaded and installed when getting rtlcap. The following command should be all that is required to install rtlcap:\n\n\tgo get github.com/bemasher/rtlcap\n\nThis will produce the binary `$GOPATH/bin/rtlcap`. For convenience it's common to add `$GOPATH/bin` to the path.\n\n### Usage\nAvailable command-line flags are as follows:\n\n```\nUsage of rtlcap:\n  -agcmode\n    \tenable/disable rtl agc\n  -blocksize int\n    \tnumber of samples per block (default 4096)\n  -bytes value\n    \tnumber of bytes to capture\n  -centerfreq value\n    \tcenter frequency to receive on (default 100M)\n  -directsampling\n    \tenable/disable direct sampling\n  -duration duration\n    \tlength of time to capture\n  -freqcorrection int\n    \tfrequency correction in ppm\n  -gainbyindex uint\n    \tset gain by index\n  -o string\n    \tfilename to write samples to (default \"/dev/null\")\n  -offsettuning\n    \tenable/disable offset tuning\n  -quietsquelch\n    \tsuppress log output messages for squelched blocks\n  -rtlxtalfreq uint\n    \tset rtl xtal frequency\n  -samplerate value\n    \tsample rate (default 2.4M)\n  -server string\n    \taddress or hostname of rtl_tcp instance (default \"127.0.0.1:1234\")\n  -squelch float\n    \tminimum mean level a sample block must be to commit to disk\n  -testmode\n    \tenable/disable test mode\n  -tunergain float\n    \tset tuner gain in dB\n  -tunergainmode\n    \tenable/disable tuner gain\n  -tunerxtalfreq uint\n    \tset tuner xtal frequency\n```\n\nRunning is as simple as starting an `rtl_tcp` instance and then starting rtlcap:\n\n```bash\n# Terminal A\n$ rtl_tcp\n\n# Terminal B\n$ rtlcap\n```\n\n### Sensitivity\nKeep in mind that if you are very close to the signal source it may be necessary to disable the tuner's AGC and set a fixed gain, this can be done using the following flags:\n\n```\nrtlcap -tunergainmode=false -tunergain=10.0\n```\n\nOr with `-gainbyindex`:\n\n```\nrtlcap -tunergainmode=false -gainbyindex=15\n```\n\n### Squelch\nThe `-squelch` flag is particularly useful for capturing intermittent signals. In order to use the squelch flag you need to know what the usual noise floor power level is. Once you've adjusted your sensitivity to produce a reasonable power level for the signal you're attempting to capture you can run rtlcap without specifying a filename with the `-o` flag to discard samples but display the minimum and maximum average power level for each block received over the last second:\n\n```\nrtlcap -centerfreq=912M -tunergainmode=false -gainbyindex=29\n05:19:00.310460 Min: 0.000 Max: 0.670\n05:19:01.334456 Min: 0.659 Max: 0.669\n05:19:02.294447 Min: 0.659 Max: 0.668\n05:19:03.318420 Min: 0.659 Max: 0.670\n05:19:04.342942 Min: 0.660 Max: 0.671\n05:19:05.302277 Min: 0.659 Max: 0.669\n05:19:06.326606 Min: 0.659 Max: 0.669\n05:19:07.287502 Min: 0.658 Max: 0.720\n05:19:08.310351 Min: 0.659 Max: 0.717\n05:19:09.334315 Min: 0.659 Max: 0.670\n05:19:10.294277 Min: 0.658 Max: 0.669\n05:19:11.318409 Min: 0.659 Max: 0.668\n05:19:12.342544 Min: 0.659 Max: 0.670\n05:19:13.302414 Min: 0.659 Max: 0.669\n```\n\nFrom the above output we can tell that the noise floor is approximately at 0.671, setting `-squelch=0.672` would discard any sample blocks whose average power level is below 0.672. Once you know a suitable squelch level, be sure to specify an output file with `-o` to capture the signal.\n\n```\nrtlcap -centerfreq=912M -tunergainmode=false -gainbyindex=29 -squelch=0.672 -bytes=25M\n```\n\nThe above flags will capture 25MB worth of signal, keeping only blocks which satisfy the squelch level.\n\n### License\nThe source of this project is licensed under Affero GPL v3.0. According to [http://choosealicense.com/licenses/agpl-3.0/](http://choosealicense.com/licenses/agpl-3.0/) you may:\n\n#### Required:\n\n * **Disclose Source:** Source code must be made available when distributing the software. In the case of LGPL, the source for the library (and not the entire program) must be made available.\n * **License and copyright notice:** Include a copy of the license and copyright notice with the code.\n * **Network Use is Distribution:** Users who interact with the software via network are given the right to receive a copy of the corresponding source code.\n * **State Changes:** Indicate significant changes made to the code.\n\n#### Permitted:\n\n * **Commercial Use:** This software and derivatives may be used for commercial purposes.\n * **Distribution:** You may distribute this software.\n * **Modification:** This software may be modified.\n * **Patent Grant:** This license provides an express grant of patent rights from the contributor to the recipient.\n * **Private Use:** You may use and modify the software without distributing it.\n\n#### Forbidden:\n\n * **Hold Liable:** Software is provided without warranty and the software author/license owner cannot be held liable for damages.\n * **Sublicensing:** You may not grant a sublicense to modify and distribute this software to third parties not included in the license.\n\n### Feedback\nIf you have any general questions or feedback leave a comment below. For bugs, feature suggestions and anything directly relating to the program itself, submit an issue in github or email me.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemasher%2Frtlcap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbemasher%2Frtlcap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemasher%2Frtlcap/lists"}