{"id":15042631,"url":"https://github.com/unixb0y/cpy-cc1101","last_synced_at":"2025-04-10T00:32:32.141Z","repository":{"id":63213542,"uuid":"159808630","full_name":"unixb0y/CPY-CC1101","owner":"unixb0y","description":"CPY-CC1101 a CircuitPython library for CC1101 RF Transceivers. I use it with a CC1101 Arduino module connected trough SPI to an Adafruit M4 Express.","archived":false,"fork":false,"pushed_at":"2023-12-23T08:06:11.000Z","size":54,"stargazers_count":33,"open_issues_count":0,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T02:13:30.776Z","etag":null,"topics":["433mhz","circuitpython","feather-m4","ticc1101"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unixb0y.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-30T10:39:18.000Z","updated_at":"2025-03-12T20:08:02.000Z","dependencies_parsed_at":"2025-04-10T00:31:43.742Z","dependency_job_id":null,"html_url":"https://github.com/unixb0y/CPY-CC1101","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/unixb0y%2FCPY-CC1101","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unixb0y%2FCPY-CC1101/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unixb0y%2FCPY-CC1101/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unixb0y%2FCPY-CC1101/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unixb0y","download_url":"https://codeload.github.com/unixb0y/CPY-CC1101/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248135734,"owners_count":21053748,"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":["433mhz","circuitpython","feather-m4","ticc1101"],"created_at":"2024-09-24T20:47:39.287Z","updated_at":"2025-04-10T00:32:32.117Z","avatar_url":"https://github.com/unixb0y.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README #\n\nCPY-CC1101 is a simple Python library for the [CC1101](http://www.ti.com/product/CC1101) RF Transceiver written for [CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/what-is-circuitpython) so that it runs on Adafruits new CircuitPython-supporting devices like the Feather M0 and M4.\nI use it on an Adafruit Feather M4 Express with a [CC1101 Arduino module](https://www.amazon.com/Solu-Wireless-Transceiver-Antenna-Arduino/dp/B00XDL9838/ref=pd_sbs_147_6?_encoding=UTF8\u0026psc=1\u0026refRID=51K5G4WS9ZPJVE7HC2MW) connected trough SPI.\n\nExample code for a receiver:\n\n```python\nfrom cpc.cpc import *\n\nmyspi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)\ncs = DigitalInOut(board.D9)\ngdo0 = DigitalInOut(board.D10)\n\nrx = CC1101(myspi, cs, gdo0, 50000, 434400000, \"666A\")\n# SPI object, Chip Select Pin, baudrate, frequency in Hz, Syncword\n\nrx.setupRX()\nwhile True:\n\trx.receiveData(0x19)\n```\n\nExample code for a transmitter:\n```python\nfrom cpc.cpc import *\n\nmyspi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)\ncs = DigitalInOut(board.D9)\ngdo0 = DigitalInOut(board.D10)\n\nrx = CC1101(myspi, cs, gdo0, 50000, 434400000, \"666A\")\n# SPI object, Chip Select Pin, baudrate, frequency in Hz, Syncword\n\nrx.setupTX()\nrx.sendData(\"0000111100001111\", \"666A\")\n```\n\n* Transmitting data is done through the `sendData(bitstring, syncword)` function. It takes a string of payload data bits to transmit and a sync word of 16 bits that is prepended to the payload data. The file `code_tx.py` is some simple bare-bones code that just does TX and also works fine, but I would just use `cpc.py`.\n* The receiver works easily as well, like shown above with `receiveData(length)`. You should simply pass the length of the data that should be received as a number.\n\n* **TO DO:** Actually use the baudrate parameter of the constructor, right now it doesn't do anything and the rate is hardcoded in `MDMCFG4` and `MDMCFG3`.\n\nYou can have multiple antennas by just using a single SPI object and passing it to the various CC1101 objects.\n\n```python\nmyspi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)\n\ncs_a = DigitalInOut(board.D9)\ncs_b = DigitalInOut(board.D6)\nrx = CC1101(myspi, cs_a, gdo0_a, 50000, 434400000, \"666A\")\ntx = CC1101(myspi, cs_b, gdo0_b, 50000, 434400000, \"666A\")\n\n# then do stuff with either one of the antennas, but only AFTER creating both CC1101 objects.\n\n```\n\nFor more details or questions, feel free to contact me, open an issue and first of all, have a look at the [official documentation / datasheet](http://www.ti.com/lit/ds/symlink/cc1101.pdf)!  \n\nResources for RollJam, which can be implemented with this library:  \nhttps://www.rtl-sdr.com/tag/rolljam/  \nhttp://spencerwhyte.blogspot.com/2014/03/delay-attack-jam-intercept-and-replay.html?m=1  \nhttps://samy.pl/defcon2015/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funixb0y%2Fcpy-cc1101","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funixb0y%2Fcpy-cc1101","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funixb0y%2Fcpy-cc1101/lists"}