{"id":34842672,"url":"https://github.com/maxrt101/linux-sx1278","last_synced_at":"2026-05-22T22:35:19.039Z","repository":{"id":294555062,"uuid":"987310134","full_name":"maxrt101/linux-sx1278","owner":"maxrt101","description":"RA02 Driver for Linux using spidev.h","archived":false,"fork":false,"pushed_at":"2025-11-08T02:29:58.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-08T04:14:47.487Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxrt101.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-20T22:22:31.000Z","updated_at":"2025-11-08T02:30:02.000Z","dependencies_parsed_at":"2025-08-07T20:21:11.847Z","dependency_job_id":null,"html_url":"https://github.com/maxrt101/linux-sx1278","commit_stats":null,"previous_names":["maxrt101/linux-ra02","maxrt101/linux-sx1278"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxrt101/linux-sx1278","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Flinux-sx1278","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Flinux-sx1278/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Flinux-sx1278/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Flinux-sx1278/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxrt101","download_url":"https://codeload.github.com/maxrt101/linux-sx1278/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Flinux-sx1278/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28033469,"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-12-25T02:00:05.988Z","response_time":58,"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":[],"created_at":"2025-12-25T17:16:14.077Z","updated_at":"2025-12-25T17:16:14.678Z","avatar_url":"https://github.com/maxrt101.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SX1278 (RA01/RA-02) Driver for Linux\n\nSX1278 (RA01/RA-02) driver for Linux that uses linux spidev API.\nProvides C \u0026 Python APIs to send/receive data \u0026 configure the module.\n\n### Usage\n\n#### C API\n```C\nspi_t spi;\nspi_cfg_t spi_cfg;\n\nspi_cfg_default(\u0026spi_cfg);\nspi_init(\u0026spi, \u0026spi_cfg, \"/dev/spidev0.0\");\n\nsx1278_t trx;\nsx1278_cfg_t trx_cfg = {.spi = \u0026spi};\n\nsx1278_init(\u0026trx, \u0026trx_cfg);\n\n// Send some bytes\nuint8_t tx_data[] = {1, 2, 3, 4, 5};\nsx1278_send(\u0026sx1278, tx_data, sizeof(tx_data));\n\n// Run receive for 5s\nTIMEOUT_CREATE(timeout, 5000);\nuint8_t rx_data[RA02_MAX_PACKET_SIZE] = {0};\nsize_t size = sizeof(rx_data);\nsx1278_recv(sx1278, rx_data, \u0026size, \u0026timeout);\n\nsx1278_deinit(\u0026sx1278);\nspi_deinit(\u0026spi);\n```\n\n#### Python bindings\n```python\nimport sx1278\nra02.__init__('./liblinux-sx1278.so')\nspi = ra02.Spi('/dev/spidev0.0')\ntrx = ra02.Sx1278(spi)\n\n# Send some bytes\ntrx.send([1, 2, 3, 4, 5])\n\n# Run receive for 5s\ntrx.recv(sx1278.Timeout(5000))\n```\n\n### How to build\n#### Prerequisites\n - CMake (at least 3.27)\n - Aarch64 linux gnu toolchain (`aarch64-unknown-linux-gnu`/`aarch64-linux-gnu-gcc`)\n\n#### Steps\n - `cmake -B cmake-build-directory -S . -G \"Unix Makefiles\"`\n - `cmake --build cmake-build-directory`\n\n### How to run\nWarning: tested only on Raspberry PI, but theoretically work on any linux machine that has spidev interface.\n\n#### For Raspberry PI:\n| Name | Pin # | Pin name |\n|:------:|:-------:|:--------:|\n| MOSI | 19    |  GPIO12  |\n| MISO | 21    |  GPIO13  |\n| SCK  | 23    |  GPIO14  |\n| NSS  | 24    |  GPIO11  |\n| GND  | Any   |   GND    |\n| 3.3V | 1     |   3V3    |\n\nAfter connecting add `dtoverlay=spi0-hw-cs` at the end of `/boot/firmware/config.txt`.\nReboot the device.\n\nTo send a packet run `./linux_ra02.so /dev/spidev0.0 send 1 2 3 4 5`.\nWhere `1 2 3 4 5` are individual bytes of packet payload (in decimal).\n\nTo receive a packet run `./linux_ra02.so /dev/spidev0.0 recv 5000`.\nWhere `5000` is receiver timeout in milliseconds.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxrt101%2Flinux-sx1278","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxrt101%2Flinux-sx1278","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxrt101%2Flinux-sx1278/lists"}