{"id":24102779,"url":"https://github.com/tperale/sx127x","last_synced_at":"2025-06-16T23:34:55.738Z","repository":{"id":88558168,"uuid":"301729069","full_name":"tperale/sx127x","owner":"tperale","description":"📡 Radio driver for the Semtech SX127X LoRa transceiver working on contiki-ng operating system.","archived":false,"fork":false,"pushed_at":"2022-04-11T12:03:27.000Z","size":157,"stargazers_count":1,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T16:14:54.544Z","etag":null,"topics":["contiki","contiki-ng","lora","sx1272","tsch"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tperale.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}},"created_at":"2020-10-06T13:05:10.000Z","updated_at":"2022-05-30T07:48:38.000Z","dependencies_parsed_at":"2023-03-05T00:30:45.080Z","dependency_job_id":null,"html_url":"https://github.com/tperale/sx127x","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/tperale%2Fsx127x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tperale%2Fsx127x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tperale%2Fsx127x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tperale%2Fsx127x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tperale","download_url":"https://codeload.github.com/tperale/sx127x/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252912997,"owners_count":21824066,"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":["contiki","contiki-ng","lora","sx1272","tsch"],"created_at":"2025-01-10T18:37:46.188Z","updated_at":"2025-05-07T16:14:59.403Z","avatar_url":"https://github.com/tperale.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SX127X LoRa transceiver driver for [contiki-ng](https://github.com/contiki-ng/contiki-ng) OS\r\n\r\nThis driver was developped as a means of studying the effectiveness of \r\nthe [TSCH](https://tools.ietf.org/html/rfc7554) protocol in conjunction with LoRa.\r\n\r\n## Install\r\n\r\nThis driver is aimed to be included as a submodule of your *contiki-ng* project \r\nand must be refered in your project `Makefile`.\r\n\r\nRun the following command in the folder where you want to include the driver.\r\n\r\n```\r\ngit submodule add https://github.com/tperale/sx127x.git\r\n```\r\n\r\n## How to use\r\n\r\nIf you add this driver in the `/arch/dev/` folder of *contiki-ng* (where all\r\nthe device driver should be) as a submodule, add the following line to your\r\n`Makefile`.\r\n\r\n```\r\nMODULES += $(CONTIKI_NG_DRIVERS_DIR)/sx127x/src\r\n```\r\n\r\nBut you can add it whereever you want as long as you refer it from the makefile.\r\n\r\nIf you are using this driver in conjunction with contiki mac protocol you should \r\nmake the driver available through the contiki NETSTACK and refer it in your\r\n`project-conf.h` file.\r\n\r\n```\r\n#define NETSTACK_CONF_RADIO sx1272_radio_driver\r\n```\r\n\r\n## Using this driver with TSCH\r\n\r\nThis driver was developped to be used with the TSCH MAC protocol. Since LoRa is\r\nnot supported out of the box by contiki some modification to the protocol were\r\nneeded and are available in this patched version of contiki\r\n([tperale/contiki-ng](https://github.com/tperale/contiki-ng)) that allow longer\r\ntimeslot to be used with precise transmission duration calculation.\r\n\r\n```\r\n#define TSCH_CONF_DEFAULT_HOPPING_SEQUENCE (uint8_t[]){ 0, 1, 2 }\r\nextern int tsch_packet_duration(size_t len); \r\n#define TSCH_PACKET_DURATION(len) tsch_packet_duration(len) \r\n```\r\n\r\nSo far only three channels are implemented, see the \r\n[wiki](https://github.com/tperale/sx127x/wiki/Channels-informations) page for more\r\ninformataion on channels.\r\n\r\n## Supported hardware\r\n\r\nThis driver was developped to work with the Zolertia RE-MOTE devboard but should \r\nwork with any platform supported by contiki-ng.\r\nIf you are using this driver with a different board make sure to modify the\r\nplatform specific variable.\r\n\r\n\r\n```\r\n#define SX1272_SPI_CONTROLLER_CONF ...\r\n#define SX1272_SPI_SCK_PORT_CONF ...\r\n#define SX1272_SPI_SCK_CONF ...\r\n#define SX1272_SPI_MISO_PORT_CONF ...\r\n#define SX1272_SPI_MISO_CONF ...\r\n#define SX1272_SPI_MOSI_PORT_CONF ...\r\n#define SX1272_SPI_MOSI_CONF ...\r\n#define SX1272_SPI_CS_PORT_CONF ...\r\n#define SX1272_SPI_CS_CONF ...\r\n```\r\n\r\nMore information on the Zolertia RE-MOTE platform specific pinout in the\r\n[wiki](https://github.com/tperale/sx127x/wiki/Usage-with-Zolertia-Zoul-RE-MOTE-rev-b) page.\r\n\r\n# Credits\r\n\r\n* [RIOT-OS](https://github.com/RIOT-OS/RIOT) providing bulletproof SX127X radio driver that served as inspiration while implementing this project.\r\n* [contiki-ng](https://github.com/contiki-ng/contiki-ng)\r\n* [contiki-ng-lora](https://github.com/dtu-ese/contiki-ng-lora) project following the same goal as mine (test TSCH over LoRa)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftperale%2Fsx127x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftperale%2Fsx127x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftperale%2Fsx127x/lists"}