{"id":15290595,"url":"https://github.com/28757b2/cc1101-python","last_synced_at":"2025-10-11T02:43:13.645Z","repository":{"id":45942186,"uuid":"329702918","full_name":"28757B2/cc1101-python","owner":"28757B2","description":"Python interface to the CC1101 Linux device driver","archived":false,"fork":false,"pushed_at":"2022-09-24T18:53:49.000Z","size":110,"stargazers_count":23,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-30T07:02:03.601Z","etag":null,"topics":["cc1101","python","radio-frequency-communication","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/28757B2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-14T18:35:45.000Z","updated_at":"2025-07-19T17:46:26.000Z","dependencies_parsed_at":"2022-09-24T18:42:17.725Z","dependency_job_id":null,"html_url":"https://github.com/28757B2/cc1101-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/28757B2/cc1101-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/28757B2%2Fcc1101-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/28757B2%2Fcc1101-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/28757B2%2Fcc1101-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/28757B2%2Fcc1101-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/28757B2","download_url":"https://codeload.github.com/28757B2/cc1101-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/28757B2%2Fcc1101-python/sbom","scorecard":{"id":2813,"data":{"date":"2025-08-11","repo":{"name":"github.com/28757B2/cc1101-python","commit":"0b50cbac8ca72eea9b5283475178ab88597edab2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T12:55:56.189Z","repository_id":45942186,"created_at":"2025-08-14T12:55:56.190Z","updated_at":"2025-08-14T12:55:56.190Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005967,"owners_count":26084004,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cc1101","python","radio-frequency-communication","raspberry-pi"],"created_at":"2024-09-30T16:08:44.213Z","updated_at":"2025-10-11T02:43:13.625Z","avatar_url":"https://github.com/28757B2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cc1101-python\r\n\r\nThis project provides an interface to the [CC1101 Linux Driver](https://github.com/28757B2/cc1101-driver) to allow receiving and transmitting packets from Python.\r\n\r\n## Setup\r\n\r\n    pip3 install cc1101-python\r\n\r\n# Command Line\r\n\r\n    python3 -m cc1101 {tx,rx,config,reset}\r\n\r\n## config\r\nRetreive the current configuration from the driver.\r\n\r\n`rx` and `tx` print the human-readable configuration options.\r\n\r\n`rx_raw` and `tx_raw` print the register values of the CC1101 for the current RX and TX configs.\r\n\r\n`dev_raw` prints the current register values of the hardware.\r\n\r\n## reset\r\nClear the RX and TX configs and reset the radio hardware.\r\n\r\n## tx/rx\r\n\r\nTransmits or receives packets.\r\n\r\n###  Common Options\r\n\r\n#### `device`\r\nThe path to a `/dev/cc1101.x.x` interface provided by the driver.\r\n\r\n#### `frequency`\r\nThe frequency to receive/transmit on. Valid values are 300-348, 387-464 and 779-928 MHz.\r\n\r\n#### `modulation`\r\nThe modulation scheme to use. Valid values are OOK, FSK_2, FSK_4, GFSK, MSK.\r\n\r\n#### `baud_rate`\r\nThe data rate in kBaud to receive/transmit packets. Valid values are within the range 0.6-500 and depend on modulation:\r\n\r\n| Modulation | Baud Rate |\r\n|------------|-----------|\r\n| OOK / GFSK | 0.6 - 250 |\r\n| 2FSK       | 0.6 - 500 |\r\n| 4FSK       | 0.6 - 300 |\r\n| MSK        | 26 - 500  |\r\n\r\n#### `--sync_word`\r\nThe Sync Word to use, specified as a two or four byte hexadecimal value (e.g `0f0f`). If four bytes are used, the upper and lower two bytes must be the same (e.g `0f0f0f0f`) \r\n\r\nIn RX, the device searches for the specified sync word to begin reception. Set `0x00` to disable the sync word.\r\n\r\nIn TX, the sync word is preprended to each packet.\r\n\r\n#### `--deviation`\r\nWhen using an FSK modulation, sets the deviation in kHz either side of the provided frequency to use for modulation. \r\n\r\n### `rx` Options\r\n\r\n#### `packet_length`\r\nThe number of bytes the radio will receive once RX is triggered, either via sync word or carrier sense threshold. \r\n\r\n#### `--bandwidth`\r\nSets the receive bandwidth in kHz. Valid values are\r\n\r\n    58,67,81,101,116,135,162,203,232,270,325,406,464,541,650,812\r\n\r\n#### `--carrier-sense`\r\nSets the carrier sense threshold in dB required to begin RX. Carrier sense can be set to a relative or an absolute value. When a sync word is provided, RX only begins when the carrier sense is above the threshold and the sync word has been received.\r\n\r\nNot specifying a value disables carrier sense.\r\n\r\nRelative values are `+6`, `+10` and `+14`. These cause the radio to begin RX when the Received Signal Strength Indicator (RSSI) suddenly increases by this value. This is the easiest mode to use for basic RX.\r\n\r\nAbsolute values are `-7` to `7` dB. These values cause the radio to begin RX when the RSSI exceeds the absolute value specified by `--magn-target` +/- the carrier-sense value. Using absolute carrier sense will likely require adjusting the `--magn-target`, `--max-lna-gain` and `--max-dvga-gain` experimentally until the required RSSI range is reached. `--out-format rssi` can be used to help find this. See Section 17.4 of the [CC1101 Datasheet](https://www.ti.com/lit/ds/symlink/cc1101.pdf) for examples.\r\n\r\n#### `--magn-target`\r\nSets the target channel filter amplitude in dB. Valid values are:\r\n\r\n    24, 27, 30, 33, 36, 38, 40, 42\r\n\r\n#### `--max-lna-gain`\r\nDecreases the maximum LNA gain by approximately the specified amount in dB.\r\n\r\nValid values are:\r\n\r\n    0, 3, 6, 7, 9, 12, 15, 17\r\n\r\n#### `--max-dvga-gain`\r\nDecreases the maximum DVGA gain by approximately the specified amount in dB.\r\n\r\nValid values are:\r\n\r\n    0, 6, 12, 18\r\n\r\n#### `--block`\r\nHold the device handle open while receiving. This prevents another process from using or reconfiguring the device, but prevents multiplexing of RX/TX on a single device between two processes. \r\n\r\n#### `--out-format`\r\nSet the output format. \r\n\r\n`info` prints the packet received count, Received Signal Strength Indictator (RSSI) and the hexadecimal representation of each packet as it is received.\r\n\r\n`hex` prints the packet as hexadecimal.\r\n\r\n`bin` outputs the raw packet bytes to stdout. This is useful for piping into other tools.\r\n\r\n`rssi` continually outputs the current value of RSSI.\r\n\r\n### `tx` Options\r\n\r\n#### `frequency`\r\nFrequency to transmit on. In TX mode, frequencies are by default restricted to 315/433/868/915 MHz +/- 1MHz, which allows specifying TX Power as one of the dBm values listed in [TI DN013](https://www.ti.com/lit/an/swra151a/swra151a.pdf). This checking can be disabled by using the `--raw` flag.\r\n\r\n#### `tx_power`\r\nThe power in dBm to use for transmission. Values must match one of the values in the appropriate frequency table of [TI DN013](https://www.ti.com/lit/an/swra151a/swra151a.pdf).\r\n\r\n#### `packet`\r\nA sequence of bytes in hexadecimal form to transmit using the CC1101.\r\n\r\n#### `--raw`\r\nIn `--raw` mode, `tx_power` is provided as a single byte in hexadecimal, which will be directly set in the CC1101's `PATABLE`. Any valid frequency value can be used.\r\n\r\n## RX Example\r\n    python3 -m cc1101 rx /dev/cc1101.0.0 433 OOK 1 64\r\n\r\n## TX Example\r\n    python3 -m cc1101 tx /dev/cc1101.0.0 433 OOK 1 1.4 0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f\r\n\r\n# Python Library\r\nThese examples show how to integrate the CC1101 into Python programs.\r\n\r\n## Receive\r\n```python\r\nfrom time import sleep\r\nfrom binascii import hexlify\r\n\r\nfrom cc1101.config import RXConfig, Modulation\r\nfrom cc1101 import CC1101\r\n\r\nrx_config = RXConfig.new(frequency=434, modulation=Modulation.OOK, baud_rate=1, sync_word=0x0000, packet_length=64)\r\nradio = CC1101(\"/dev/cc1101.0.0\", rx_config, blocking=True)\r\n\r\nwhile True:\r\n    packets = radio.receive()\r\n\r\n    for packet in packets:\r\n        print(f\"Received - {hexlify(packet)}\")\r\n    \r\n    sleep(0.1)\r\n```\r\n\r\n\r\n## Transmit\r\n```python\r\nfrom binascii import unhexlify\r\n\r\nfrom cc1101.config import TXConfig, Modulation\r\nfrom cc1101 import CC1101\r\n\r\ntx_config = TXConfig.new(frequency=434, modulation=Modulation.OOK, baud_rate=1, tx_power=0.1)\r\nradio = CC1101(\"/dev/cc1101.0.0\")\r\n\r\nradio.transmit(tx_config, unhexlify(\"0f0f0f0f0f0f0f0f0f0f0f\"))\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F28757b2%2Fcc1101-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F28757b2%2Fcc1101-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F28757b2%2Fcc1101-python/lists"}