|
1 | | -RadioHead Packet Radio library for embedded microprocessors |
2 | | -=========================================================== |
3 | | - |
4 | | -This 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. |
5 | | - |
6 | | -**Please read the full documentation and licensing from the original author [site][3]** |
7 | | - |
8 | | -### features added with this fork |
9 | | -================================= |
10 | | - |
11 | | -**Compatible with boards** |
12 | | - |
13 | | -[LoRasPI][10], [Raspberry PI Lora Gateway][12], [Dragino Lora GPS HAT][13] |
14 | | - |
15 | | -<img src="https://raw.githubusercontent.com/hallard/LoRasPI/master/images/LoRasPI-on-Pi.jpg" height="25%" width="25%" alt="LoRasPI"> |
16 | | -<img 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"> |
17 | | -<img src="http://wiki.dragino.com/images/d/d6/Lora_GPS_HAT.png" height="25%" width="25%" alt="Raspberry PI Lora Gateway/Node"> |
18 | | - |
19 | | -- Added moteino modem setting on RF69 to be compatible with lowpowerlab RF69 configuration library |
20 | | -- Added possibility to work with no IRQ connected for RF69 and RF95 |
21 | | - - for example to get one more GPIO free |
22 | | - - on Raspberry Pi, we do not have `attachInterrupt()` like with bcm2835 library |
23 | | -- Added samples for multiples Raspberry Pi boards with RF69 and RF95 modules such as |
24 | | - - [LoRasPI][10], simple RFM9x or RFM69HCW shield |
25 | | - - [iC880A or Linklabs Raspberry PI shield][11] with RFM9x or RFM69HCW onboard |
26 | | - - [Raspberry PI Lora Gateway][12] with multiple RFM9x or RFM69HCW shield |
27 | | - - [Dragino Lora shield][13] |
28 | | - - 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. |
29 | | -- Added 2 samples test tools (for Raspberry PI) do detect RF69 and RF95 modules and check IRQ rising edge |
30 | | - - [spi_scan][9] sample code, scan and try to detect connected modules |
31 | | - - [irq_test][8] sample code, check a rising edge on a GPIO |
32 | | - |
33 | | -Sample code for Raspberry PI is located under [RadioHead/examples/raspi][7] folder. |
34 | | - |
35 | | -### Installation on Raspberry PI |
36 | | -================================ |
37 | | - |
38 | | -Clone repository |
39 | | -```shell |
40 | | -git clone https://github.com/hallard/RadioHead |
41 | | -``` |
42 | | - |
43 | | -**Connection and pins definition** |
44 | | - |
45 | | -Boards 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 |
46 | | -```cpp |
47 | | -// LoRasPi board |
48 | | -#define BOARD_LORASPI |
49 | | - |
50 | | -// Now we include RasPi_Boards.h so this will expose defined |
51 | | -// constants with CS/IRQ/RESET/on board LED pins definition |
52 | | -#include "../RasPiBoards.h" |
53 | | - |
54 | | -// Your code start here |
55 | | -#ifdef RF_RST_PIN |
56 | | -// Blah blah do reset line |
57 | | -#endif |
58 | | - |
59 | | -``` |
60 | | - |
61 | | -Then 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. |
62 | | - |
63 | | -So you have 3 options to define the pins you want |
64 | | - |
65 | | -- The board you have is already defined so just need to define it your source code (as explained above) |
66 | | -- You can add your board into [RasPiBoards.h][24] and then define it your source code as above |
67 | | -- You can manually define pins in your code and remove the board definition and `#include "../RasPiBoards.h"` |
68 | | - |
69 | | -To go further with examples : |
70 | | - |
71 | | -go to example folder here spi_scan |
72 | | -```shell |
73 | | -cd RadioHead/examples/raspi/spi_scan |
74 | | -``` |
75 | | -Build executable |
76 | | -```shell |
77 | | -root@pi03(rw):~/RadioHead/examples/raspi/spi_scan# make |
78 | | -g++ -DRASPBERRY_PI -DBCM2835_NO_DELAY_COMPATIBILITY -c -I../../.. spi_scan.c |
79 | | -g++ spi_scan.o -lbcm2835 -o spi_scan |
80 | | -root@pi03(rw):~/RadioHead/examples/raspi/spi_scan |
81 | | -``` |
82 | | -And run |
83 | | -```shell |
84 | | -root@pi03(rw):~/RadioHead/examples/raspi/spi_scan# ./spi_scan |
85 | | -Checking register(0x42) with CS=GPIO06 => Nothing! |
86 | | -Checking register(0x10) with CS=GPIO06 => Nothing! |
87 | | -Checking register(0x42) with CS=GPIO08 => SX1276 RF95/96 (V=0x12) |
88 | | -Checking register(0x10) with CS=GPIO08 => Nothing! |
89 | | -Checking register(0x42) with CS=GPIO07 => Nothing! |
90 | | -Checking register(0x10) with CS=GPIO07 => Nothing! |
91 | | -Checking register(0x42) with CS=GPIO26 => Nothing! |
92 | | -Checking register(0x10) with CS=GPIO26 => Nothing! |
93 | | -``` |
94 | | -And voila! with [LoRasPi][10] board RFM95 dedected on SPI with GPIO8 (CE0) |
95 | | - |
96 | | - |
97 | | -If 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 |
98 | | - |
99 | | -<img 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"> |
100 | | - |
101 | | -Here are the results when trying to detect the onboard modules: |
102 | | - |
103 | | -```shell |
104 | | -root@pi01(rw):~/RadioHead/examples/raspi/spi_scan# ./spi_scan |
105 | | -Checking register(0x42) with CS=GPIO06 => Nothing! |
106 | | -Checking register(0x10) with CS=GPIO06 => Nothing! |
107 | | -Checking register(0x42) with CS=GPIO08 => SX1276 RF95/96 (V=0x12) |
108 | | -Checking register(0x10) with CS=GPIO08 => Nothing! |
109 | | -Checking register(0x42) with CS=GPIO07 => SX1276 RF95/96 (V=0x12) |
110 | | -Checking register(0x10) with CS=GPIO07 => Nothing! |
111 | | -Checking register(0x42) with CS=GPIO26 => Unknown (V=0x01) |
112 | | -Checking register(0x10) with CS=GPIO26 => SX1231 RFM69 (V=0x24) |
113 | | -``` |
114 | | - |
115 | | -Voila! 3 modules are seen, now let's try listenning packets with PI Lora [Gateway][12]. |
116 | | - |
117 | | -My 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. |
118 | | - |
119 | | -Here the results starting from scratch |
120 | | - |
121 | | -**Client side** |
122 | | - |
123 | | -<img src="https://raw.githubusercontent.com/hallard/RadioHead/master/examples/raspi/pictures/rf95_client.png" alt="RF95 client"> |
124 | | - |
125 | | -**multi server side** |
126 | | - |
127 | | -<img src="https://raw.githubusercontent.com/hallard/RadioHead/master/examples/raspi/pictures/multi_server.png" alt="RF95 client"> |
128 | | - |
129 | | -It works! |
130 | | - |
131 | | -### Difference with original Author repo |
132 | | -======================================== |
133 | | - |
134 | | -Due to easier maintenance to keep in sync with original author lib, I've got 2 repo: |
135 | | - |
136 | | -- 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. |
137 | | -- The one above has been forked to https://github.com/ch2i/RadioHead where I put the original version released by the author. |
138 | | - |
139 | | -Like 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. |
140 | | - |
141 | | -[1]: https://github.com/hallard/RadioHead |
142 | | -[2]: https://hallard.me |
143 | | -[3]: http://www.airspayce.com/mikem/arduino/RadioHead/ |
144 | | -[4]: http://www.airspayce.com/mikem/arduino/RadioHead/RadioHead-1.61.zip |
145 | | -[5]: https://github.com/ch2i/RadioHead |
146 | | -[6]: http://hallard.me/category/ulpnode/ |
147 | | -[7]: https://github.com/hallard/RadioHead/tree/master/examples/raspi |
148 | | -[8]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/irq_test |
149 | | -[9]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/spi_scan |
150 | | - |
151 | | -[10]: https://github.com/hallard/LoRasPI |
152 | | -[11]: https://github.com/ch2i/iC880A-Raspberry-PI |
153 | | -[12]: https://github.com/hallard/RPI-Lora-Gateway |
154 | | -[13]: https://github.com/dragino/Lora |
155 | | - |
156 | | -[20]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/rf69 |
157 | | -[21]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/rf95 |
158 | | -[22]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/nrf24 |
159 | | -[23]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/multi_server |
160 | | -[24]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/RasPiBoards.h |
161 | | -[25]: https://github.com/hallard/RadioHead/tree/master/examples/raspi/rf95/rf95_client.cpp |
162 | | - |
163 | | - |
| 1 | +RadioHead Packet Radio library for embedded microprocessors |
| 2 | +=========================================================== |
| 3 | + |
| 4 | +###Version 1.67 |
| 5 | + |
| 6 | +This is a copy 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. |
| 7 | + |
| 8 | +Please read the full documentation and licensing from the original author [site][3], here it's just a copy to keep in sync my custom featured [version][1] with this [original version][4]. |
| 9 | + |
| 10 | +**If you want to know what features have been added for my custom needs, please see my [repo version README][1]** |
| 11 | + |
| 12 | +[1]: https://github.com/hallard/RadioHead |
| 13 | +[2]: https://hallard.me |
| 14 | +[3]: http://www.airspayce.com/mikem/arduino/RadioHead/ |
| 15 | +[4]: http://www.airspayce.com/mikem/arduino/RadioHead/RadioHead-1.67.zip |
0 commit comments