{"id":13812512,"url":"https://github.com/hallard/RadioHead","last_synced_at":"2025-05-14T22:30:43.275Z","repository":{"id":43135662,"uuid":"63909046","full_name":"hallard/RadioHead","owner":"hallard","description":"RadioHead Packet Radio library for embedded microprocessors","archived":false,"fork":false,"pushed_at":"2021-11-17T18:27:42.000Z","size":554,"stargazers_count":143,"open_issues_count":0,"forks_count":66,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-05-13T07:57:11.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hallard.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}},"created_at":"2016-07-21T23:35:28.000Z","updated_at":"2025-04-20T19:06:05.000Z","dependencies_parsed_at":"2022-09-22T06:41:39.408Z","dependency_job_id":null,"html_url":"https://github.com/hallard/RadioHead","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hallard%2FRadioHead","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hallard%2FRadioHead/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hallard%2FRadioHead/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hallard%2FRadioHead/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hallard","download_url":"https://codeload.github.com/hallard/RadioHead/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254239447,"owners_count":22037713,"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":[],"created_at":"2024-08-04T04:00:52.781Z","updated_at":"2025-05-14T22:30:42.496Z","avatar_url":"https://github.com/hallard.png","language":"C++","funding_links":[],"categories":["Protocols"],"sub_categories":["Radio Frequency Protocols"],"readme":"RadioHead Packet Radio library for embedded microprocessors\n===========================================================\n\n###Version 1.67\n\nThis is a fork of the original RadioHead Packet Radio library for embedded microprocessors. It provides a complete object-oriented library for sending and receiving packetized messages via a variety of common data radios and other transports on a range of embedded microprocessors.\n\n**Please read the full documentation and licensing from the original author [site][3]**\n\n### features added with this fork\n=================================\n\n**Compatible with boards**    \n\n[LoRasPI][10], [Raspberry PI Lora Gateway][12], [Dragino Lora GPS HAT][13]\n\n\u003cimg src=\"https://raw.githubusercontent.com/hallard/LoRasPI/master/images/LoRasPI-on-Pi.jpg\" height=\"25%\" width=\"25%\" alt=\"LoRasPI\"\u003e\u0026nbsp;\n\u003cimg src=\"https://raw.githubusercontent.com/hallard/RPI-Lora-Gateway/master/images/RPI-Lora-Gateway-mounted.jpg\" height=\"25%\" width=\"25%\" alt=\"Raspberry PI Lora Gateway/Node\"\u003e\u0026nbsp;\n\u003cimg src=\"http://wiki.dragino.com/images/d/d6/Lora_GPS_HAT.png\" height=\"25%\" width=\"25%\" alt=\"Raspberry PI Lora Gateway/Node\"\u003e   \n\n- Added moteino modem setting on RF69 to be compatible with lowpowerlab RF69 configuration library\n- Added possibility to work with no IRQ connected for RF69 and RF95\n  - for example to get one more GPIO free \n  - on Raspberry Pi, we do not have `attachInterrupt()` like with bcm2835 library\n- Added samples for multiples Raspberry Pi boards with RF69 and RF95 modules such as \n  - [LoRasPI][10], simple RFM9x or RFM69HCW shield\n  - [iC880A or Linklabs Raspberry PI shield][11] with RFM9x or RFM69HCW onboard \n  - [Raspberry PI Lora Gateway][12] with multiple RFM9x or RFM69HCW shield\n  - [Dragino Lora shield][13]\n  - Sample code are in [rf95][21], [rf69][20], [nrf24][22] and [multi_server][23], note that old sample NRF24 sample has been moved to nrf24 folder for consistency.\n- Added 2 samples test tools (for Raspberry PI) do detect RF69 and RF95 modules and check IRQ rising edge\n  - [spi_scan][9] sample code, scan and try to detect connected modules\n  - [irq_test][8] sample code, check a rising edge on a GPIO\n\nSample code for Raspberry PI is located under [RadioHead/examples/raspi][7] folder.\n\n### Installation on Raspberry PI\n================================\n\nClone repository\n```shell\ngit clone https://github.com/hallard/RadioHead\n```\n\nTo avoid system hangs/instability starting with kernel 4.14, disable all GPIO kernel interrupts by adding this line to your `/boot/config.txt`:\n```\ndtoverlay=gpio-no-irq\n```\nThis works around an issue with the design of the bcm2835 library and how it handles rising/falling edge detection events, but has some downsides as well.  For more information, see [this issue][30] and [this discussion][31].\n\n**Connection and pins definition**\n\nBoards pins (Chip Select, IRQ line, Reset and LED) definition are set in the new [RadioHead/examples/raspi/RasPiBoards.h][24] file. In your code, you need to define board used and then, include the file definition like this\n```cpp\n// LoRasPi board \n#define BOARD_LORASPI\n\n// Now we include RasPi_Boards.h so this will expose defined \n// constants with CS/IRQ/RESET/on board LED pins definition\n#include \"../RasPiBoards.h\"\n\n// Your code start here\n#ifdef RF_RST_PIN\n// Blah blah do reset line\n#endif\n\n```\n\nThen in your code you'll have exposed RF_CS_PIN, RF_IRQ_PIN, RF_RST_PIN and RF_LED_PIN and you'll be able to do some `#ifdef RF_LED_LIN` for example. See [rf95_client][25] sample code.\n\nSo you have 3 options to define the pins you want \n\n- The board you have is already defined so just need to define it your source code (as explained above)\n- You can add your board into [RasPiBoards.h][24] and then define it your source code as above\n- You can manually define pins in your code and remove the board definition and `#include \"../RasPiBoards.h\"`\n\nTo go further with examples :\n\ngo to example folder here spi_scan\n```shell\ncd RadioHead/examples/raspi/spi_scan\n```\nBuild executable\n```shell\nroot@pi03(rw):~/RadioHead/examples/raspi/spi_scan# make\ng++ -DRASPBERRY_PI -DBCM2835_NO_DELAY_COMPATIBILITY -c -I../../.. spi_scan.c\ng++ spi_scan.o -lbcm2835  -o spi_scan\nroot@pi03(rw):~/RadioHead/examples/raspi/spi_scan\n```\nAnd run \n```shell\nroot@pi03(rw):~/RadioHead/examples/raspi/spi_scan# ./spi_scan\nChecking register(0x42) with CS=GPIO06 =\u003e Nothing!\nChecking register(0x10) with CS=GPIO06 =\u003e Nothing!\nChecking register(0x42) with CS=GPIO08 =\u003e SX1276 RF95/96 (V=0x12)\nChecking register(0x10) with CS=GPIO08 =\u003e Nothing!\nChecking register(0x42) with CS=GPIO07 =\u003e Nothing!\nChecking register(0x10) with CS=GPIO07 =\u003e Nothing!\nChecking register(0x42) with CS=GPIO26 =\u003e Nothing!\nChecking register(0x10) with CS=GPIO26 =\u003e Nothing!\n```\nAnd voila! with [LoRasPi][10] board RFM95 dedected on SPI with GPIO8 (CE0)\n\n\nIf I'm doing same test with [PI Lora Gateway][12] with 2 RFM95 (one 433MHz and one 868MHz) and one RFMHW69 433MHz on board like this    \n\n\u003cimg src=\"https://raw.githubusercontent.com/hallard/RPI-Lora-Gateway/master/images/RPI-Lora-Gateway-mounted.jpg\" height=\"40%\" width=\"40%\" alt=\"Raspberry PI Lora Gateway/Node\"\u003e   \n\nHere are the results when trying to detect the onboard modules:\n\n```shell\nroot@pi01(rw):~/RadioHead/examples/raspi/spi_scan# ./spi_scan\nChecking register(0x42) with CS=GPIO06 =\u003e Nothing!\nChecking register(0x10) with CS=GPIO06 =\u003e Nothing!\nChecking register(0x42) with CS=GPIO08 =\u003e SX1276 RF95/96 (V=0x12)\nChecking register(0x10) with CS=GPIO08 =\u003e Nothing!\nChecking register(0x42) with CS=GPIO07 =\u003e SX1276 RF95/96 (V=0x12)\nChecking register(0x10) with CS=GPIO07 =\u003e Nothing!\nChecking register(0x42) with CS=GPIO26 =\u003e Unknown (V=0x01)\nChecking register(0x10) with CS=GPIO26 =\u003e SX1231 RFM69 (V=0x24)\n```\n\nVoila! 3 modules are seen, now let's try listenning packets with PI Lora [Gateway][12].\n\nMy setup has another Raspberry Pi with RFM95 868MHZ [LoRasPI][10] shield running [`rf95_client`][25] sample and some [ULPnode][6] prototypes always running with on board RFM69 configured as Group ID 69 on 433MHz. I don't have a Lora 433MHz sender running so we won't receive anything on this one.\n\nHere the results starting from scratch\n\n**Client side**    \n\n\u003cimg src=\"https://raw.githubusercontent.com/hallard/RadioHead/master/examples/raspi/pictures/rf95_client.png\" alt=\"RF95 client\"\u003e    \n\n**multi server side**    \n\n\u003cimg src=\"https://raw.githubusercontent.com/hallard/RadioHead/master/examples/raspi/pictures/multi_server.png\" alt=\"RF95 client\"\u003e   \n\nIt works! \n\n### Difference with original Author repo\n========================================\n\nDue to easier maintenance to keep in sync with original author lib, I've got 2 repo:    \n\n- My master one (this one) https://github.com/hallard/RadioHead that is the one you need if you want to use my projects or lib added features.\n-  The one above has been forked to https://github.com/ch2i/RadioHead where I put the original version released by the author.\n\nLike this, I can do Pull Request from [ch2i][4] to [hallard][1] to add new features added by the author to my version. This mean that this [one][4] is just a github copy version of the latest original done by Mike, I don't do any change on this one. I know it's not the best way, but I didn't found a better solution for now, if you have better idea, just let me know.\n\n[1]: https://github.com/hallard/RadioHead \n[2]: https://hallard.me\n[3]: http://www.airspayce.com/mikem/arduino/RadioHead/\n[4]: http://www.airspayce.com/mikem/arduino/RadioHead/RadioHead-1.67.zip\n[5]: https://github.com/ch2i/RadioHead \n[6]: http://hallard.me/category/ulpnode/ \n[7]: https://github.com/hallard/RadioHead/tree/master/examples/raspi\n[8]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/irq_test\n[9]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/spi_scan\n\n[10]: https://github.com/hallard/LoRasPI\n[11]: https://github.com/ch2i/iC880A-Raspberry-PI\n[12]: https://github.com/hallard/RPI-Lora-Gateway\n[13]: https://github.com/dragino/Lora\n\n[20]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/rf69\n[21]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/rf95\n[22]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/nrf24\n[23]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/multi_server\n[24]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/RasPiBoards.h\n[25]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/rf95/rf95_client.cpp\n\n[30]: https://github.com/raspberrypi/linux/issues/2550\n[31]: https://groups.google.com/forum/#!topic/bcm2835/Y3D1mmp6vew\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhallard%2FRadioHead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhallard%2FRadioHead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhallard%2FRadioHead/lists"}