{"id":13613392,"url":"https://github.com/peterhinch/micropython-radio","last_synced_at":"2025-08-31T03:32:27.644Z","repository":{"id":86072662,"uuid":"49563654","full_name":"peterhinch/micropython-radio","owner":"peterhinch","description":"Simple way to use an nRF24L01 radio to exchange arbitrary Python objects between two Pyboards","archived":false,"fork":false,"pushed_at":"2022-12-26T15:29:42.000Z","size":83,"stargazers_count":58,"open_issues_count":2,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-24T15:04:05.478Z","etag":null,"topics":["embedded","micropython","nrf24l01","protocol","radio"],"latest_commit_sha":null,"homepage":null,"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/peterhinch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2016-01-13T09:28:16.000Z","updated_at":"2025-06-15T03:10:22.000Z","dependencies_parsed_at":"2023-04-20T20:31:01.066Z","dependency_job_id":null,"html_url":"https://github.com/peterhinch/micropython-radio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peterhinch/micropython-radio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhinch%2Fmicropython-radio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhinch%2Fmicropython-radio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhinch%2Fmicropython-radio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhinch%2Fmicropython-radio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterhinch","download_url":"https://codeload.github.com/peterhinch/micropython-radio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhinch%2Fmicropython-radio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272934310,"owners_count":25017832,"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-08-31T02:00:09.071Z","response_time":79,"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":["embedded","micropython","nrf24l01","protocol","radio"],"created_at":"2024-08-01T20:00:45.764Z","updated_at":"2025-08-31T03:32:27.571Z","avatar_url":"https://github.com/peterhinch.png","language":"Python","funding_links":[],"categories":["精选驱动库","Libraries"],"sub_categories":["通讯类","Communications"],"readme":"# micropython-radio\n\nThis repo comprises two protocols for the nRF24L01+ radio module. Each\nimplements a bidirectional link between two radios.\n\n## radio-fast\n\nA driver for short fixed-length records. This is a thin layer over the official\ndriver which makes it easier to ensure mutually compatible configurations of\nthe radios. This is done by deploying a common config file to both nodes.\n\nThe nRF24L01 provides data integrity but successful reception is not guaranteed\nas radio outages can occur (see below).\n\nIn this protocol one radio acts as master (initiating communications) and the\nother acts as slave (responding to transmissions)\n\nSee [README](./radio-fast/README.md)\n\n## as_nrf_stream.py\n\nSee [README](./async/README.md)\n\nRadio links are inherently unreliable, not least since receiver and transmitter\nmay move out of range. The link may also be disrupted by radio frequency\ninterference. This driver mitigates this by ensuring that, in the event of a\nlink outage, data transfer resumes without loss when connectivity is restored.\n\nThe use of `uasyncio V3` stream I/O means that the interface matches that of\nobjects such as sockets and UARTs. Objects exchanged are `bytes` instances,\ntypically terminated by a newline character (`b'\\n'`). Lengths of the `bytes`\nobjects are arbitrary and are allowed to vary at runtime. Consequently it is\neasy to exchange Python objects via serialisation libraries such as `pickle`\nand `ujson`.\n\nThe underlying protocol's API hides the following details:\n 1. The radio hardware is half-duplex (it cannot simultaneously transmit and\n receive).\n 2. The chip has a 32 byte limit on message length.\n 3. To address point 1 the protocol is asymmetrical with a master/slave design\n which is transparent to the user.\n\nThe driver provides a symmetrical full-duplex interface in which either node\ncan initiate a transmission at any time. The cost relative to the `radio-fast`\nmodule is some loss in maximum throughput and an increase in latency. Gains\nare:\n * The ability to exchange relatively large, dynamic objects.\n * Data integrity with each message being correctly received exactly once.\n * A standard bidirectional (full duplex) stream interface.\n * Asynchronous code: in the event of an outage communication will inevitably\n stall for the duration, but other coroutines will continue to run.\n\n## Obsolete modules\n\nThe `as_nrf_stream` driver replaces the old `radio-pickle` and\n`async-radio-pickle` modules which pre-dated the `uasyncio` I/O interface. This\nmodule is simpler, smaller and more efficient. Lastly the old asynchronous\ndriver allowed duplicate messages to be received. The new protocol ensures that\neach record is received exactly once.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterhinch%2Fmicropython-radio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterhinch%2Fmicropython-radio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterhinch%2Fmicropython-radio/lists"}