{"id":13576829,"url":"https://github.com/dernasherbrezon/sdr-server","last_synced_at":"2025-04-04T18:07:14.087Z","repository":{"id":41338722,"uuid":"327714907","full_name":"dernasherbrezon/sdr-server","owner":"dernasherbrezon","description":"High performant TCP server for rtl-sdr","archived":false,"fork":false,"pushed_at":"2025-01-28T08:31:25.000Z","size":584,"stargazers_count":196,"open_issues_count":0,"forks_count":19,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-03-28T17:08:15.719Z","etag":null,"topics":["libvolk","rtl-sdr"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dernasherbrezon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"dernasherbrezon"}},"created_at":"2021-01-07T20:13:17.000Z","updated_at":"2025-03-23T18:39:51.000Z","dependencies_parsed_at":"2023-09-24T11:01:39.156Z","dependency_job_id":"3f41d26b-6a92-4e55-a68b-a84e9a66fe77","html_url":"https://github.com/dernasherbrezon/sdr-server","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dernasherbrezon%2Fsdr-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dernasherbrezon%2Fsdr-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dernasherbrezon%2Fsdr-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dernasherbrezon%2Fsdr-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dernasherbrezon","download_url":"https://codeload.github.com/dernasherbrezon/sdr-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"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":["libvolk","rtl-sdr"],"created_at":"2024-08-01T15:01:14.711Z","updated_at":"2025-04-04T18:07:14.068Z","avatar_url":"https://github.com/dernasherbrezon.png","language":"C","funding_links":["https://github.com/sponsors/dernasherbrezon"],"categories":["C"],"sub_categories":[],"readme":"# About [![CMake](https://github.com/dernasherbrezon/sdr-server/actions/workflows/cmake.yml/badge.svg)](https://github.com/dernasherbrezon/sdr-server/actions/workflows/cmake.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=dernasherbrezon_sdr-server\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=dernasherbrezon_sdr-server)\n\n![design](/docs/dsp.jpg?raw=true)\n\n## Key features\n\n * Share available RF bandwidth between several independent clients:\n   * Total bandwidth can be 2016000 samples/sec at 436,600,000 hz\n   * One client might request 48000 samples/sec at 436,700,000 hz\n   * Another client might request 96000 samples/sec at 435,000,000 hz\n * Several clients can access the same band simultaneously\n * Output saved onto disk or streamed back via TCP socket\n * Output can be gzipped (by default = true)\n * Output will be decimated to the requested bandwidth\n * Clients can request overlapping RF spectrum\n * Rtl-sdr starts only after first client connects (i.e. saves solar power \u0026etc). Stops only when the last client disconnects\n * MacOS and Linux (Debian Raspberrypi)\n \n## Design\n\n![design](/docs/threads.png?raw=true)\n\n * Each client has its own dsp thread\n * Each dsp thread executes [Frequency Xlating FIR Filter](http://blog.sdr.hu/grblocks/xlating-fir.html)\n * Only RTL-SDRs are supported\n \n## API\n\n * Defined in the [api.h](https://github.com/dernasherbrezon/sdr-server/blob/main/src/api.h)\n * Clients can connect and send request to initiate listening:\n   * center_freq - this is required center frequency. For example, 436,700,000 hz\n   * sampling_rate - required sampling rate. For example, 48000\n   * band\\_freq - first connected client can select the center of the band. All other clients should request center\\_freq within the currently selected band\n   * destination - \"0\" - save into file on local disk, \"1\" - stream back via TCP socket\n * To stop listening, clients can send SHUTDOWN request or disconnect\n \n## Queue\n\n![design](/docs/queue.png?raw=true)\n\nThe data between rtl-sdr worker and the dsp workers is passed via queue. This is bounded queue with pre-allocated memory blocks. It has the following features:\n\n * Thread-safe\n * If no free blocks (consumer is slow), then the last block will be overriden by the next one\n * there is a special detached block. It is used to minimize synchronization section. All potentially long operations on it are happening outside of synchronization section.\n * Consumer will block and wait until new data produced\n \n## Configuration\n\nSample configuration can be found in tests:\n\n[https://github.com/dernasherbrezon/sdr-server/blob/main/test/resources/configuration.config](https://github.com/dernasherbrezon/sdr-server/blob/main/test/resources/configuration.config)\n\n## Performance\n\nIs good. Some numbers in ```test/perf_xlating.c```\n \n## Dependencies\n\nsdr-server depends on several libraries:\n\n * [librtlsdr](https://github.com/dernasherbrezon/librtlsdr). Version \u003e=0.5.4 is required.\n * [libairspy](https://github.com/airspy/airspyone_host/)\n * [libhackrf](https://github.com/greatscottgadgets/hackrf)\n * [libconfig](https://hyperrealm.github.io/libconfig/libconfig_manual.html)\n * libz. Should be installed in every operational system\n * libm. Same\n \nAll dependencies can be easily installed from [leosatdata APT repository](https://leosatdata.com/apt):\n\n```\nsudo apt-get install curl lsb-release\ncurl -fsSL https://leosatdata.com/r2cloud.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/r2cloud.gpg\nsudo bash -c \"echo 'deb [signed-by=/usr/share/keyrings/r2cloud.gpg] http://apt.leosatdata.com $(lsb_release --codename --short) main' \u003e /etc/apt/sources.list.d/r2cloud.list\"\nsudo apt-get update\nsudo apt-get install librtlsdr-dev libconfig-dev\n```\n\n## Build\n\nTo build the project execute the following commands:\n\n```\nmkdir build\ncd build\ncmake ..\nmake\n```\n\n## Install\n\nsdr-server can be installed from [leosatdata APT repository](https://leosatdata.com/apt):\n\n```\nsudo apt-get install sdr-server\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdernasherbrezon%2Fsdr-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdernasherbrezon%2Fsdr-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdernasherbrezon%2Fsdr-server/lists"}