Skip to content

Commit 2af44fc

Browse files
committed
Merge branch 'master' of https://github.com/nRF24/RF24
2 parents 11298d5 + 124892b commit 2af44fc

File tree

9 files changed

+31
-13
lines changed

9 files changed

+31
-13
lines changed

.github/workflows/build_linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
config-options:
1414
- "--soc=BCM2835 --driver=RPi"
1515
- "--soc=BCM2836 --driver=RPi"
16-
- "--soc=BCM2835 --driver=wiringPi --extra-cflags=-I/usr/local/include"
16+
# - "--soc=BCM2835 --driver=wiringPi --extra-cflags=-I/usr/local/include"
1717
- "--driver=SPIDEV"
1818

1919
steps:
@@ -28,7 +28,7 @@ jobs:
2828
- name: provide WiringPi
2929
if: ${{ matrix.config-options == '--soc=BCM2835 --driver=wiringPi --extra-cflags=-I/usr/local/include' }}
3030
run: |
31-
git clone https://github.com/CoRfr/WiringPi
31+
git clone https://github.com/WiringPi/WiringPi
3232
cd WiringPi/wiringPi
3333
CC="arm-linux-gnueabihf-gcc -marm -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard" V=1 make -j5
3434
sudo make install

COMMON_ISSUES.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,19 @@ Example issues: [#264](https://github.com/nRF24/RF24/issues/264)
4646

4747
For reliability, please use Electrolytic or Tantalum capacitors. Ceramic
4848
capacitors may not be good enough (depending on the manufacturing source).
49+
50+
### my PA/LNA module fails to transmit
51+
You may find variants of the nRF24L01 transceiver that are marketed as “nRF24L01+PA+LNA”. These modules are distinct in the fact that they come with a detachable (SMA-type) antenna. They employ seperate RFX24C01 IC with the antenna for enhanced Power Amplification (PA) and Low Noise Amplification (LNA) features. While they boast greater range with the same functionality, they are subject to a couple lesser known (and lesser advertised) drawbacks:
52+
53+
1. Stronger power source. Below is a chart of advertised current requirements that many MCU boards’ 3V regulators may not be able to provide (after supplying power to internal components).
54+
| Specification | Value |
55+
|:-------------:|:-----:|
56+
| Emission mode current(peak) | 115 mA |
57+
| Receive Mode current(peak) | 45 mA |
58+
| Power-down mode current | 4.2 µA |
59+
60+
2. Needs shielding from electromagnetic interference. Shielding usually works best when it has a path to ground (GND pin), but this connection to the GND pin is not required. It is important that the sheilding does not touch any current carrying parts.
61+
- Professionals tend to use a faraday cage/mesh to implement electromagnetic shielding, but it can be pricey for this scenario.
62+
- A quick do-it-yourself solution (as proof-of-concept) would be to wrap the PA/LNA module with electrical tape and then wrap foil around the electrical tape (for shielding) while being very careful to not let the foil touch any current carrying parts (like the GPIO pins, the antenna mount, and the soldier joints for the antenna mount). <br>
63+
See [![ghetto_shielding_1.png](https://github.com/nRF24/RF24/blob/master/images/ghetto_sheilding_1.png)](https://github.com/nRF24/RF24/blob/master/images/ghetto_sheilding_1.png)
64+
and [![ghetto_shielding_2.png](https://github.com/nRF24/RF24/blob/master/images/ghetto_sheilding_2.png)](https://github.com/nRF24/RF24/blob/master/images/ghetto_sheilding_2.png)

RF24.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ void RF24::print_address_register(const char* name, uint8_t reg, uint8_t qty)
416416
printf_P(PSTR("\r\n"));
417417
}
418418

419-
#endif
419+
#endif // !defined(MINIMAL)
420420

421421
/****************************************************************************/
422422

@@ -754,7 +754,7 @@ bool RF24::begin(void)
754754
write_register(DYNPD, 0); // disable dynamic payloads by default (for all pipes)
755755
dynamic_payloads_enabled = false;
756756
write_register(EN_AA, 0x3F); // enable auto-ack on all pipes
757-
write_register(EN_RXADDR, 0); // close all RX pipes
757+
write_register(EN_RXADDR, 3); // only open RX pipes 0 & 1
758758
setPayloadSize(32); // set static payload size to 32 (max) bytes by default
759759
setAddressWidth(5); // set default address length to (max) 5 bytes
760760

@@ -1354,8 +1354,8 @@ void RF24::enableAckPayload(void)
13541354

13551355
IF_SERIAL_DEBUG(printf("FEATURE=%i\r\n", read_register(FEATURE)));
13561356

1357-
// Enable dynamic payload on pipes 0
1358-
write_register(DYNPD, read_register(DYNPD) | _BV(DPL_P0));
1357+
// Enable dynamic payload on pipes 0 & 1
1358+
write_register(DYNPD, read_register(DYNPD) | _BV(DPL_P1) | _BV(DPL_P0));
13591359
dynamic_payloads_enabled = true;
13601360
ack_payloads_enabled = true;
13611361
}

RF24.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2174,7 +2174,7 @@ class RF24 {
21742174
* | 8 | IRQ | - | - | - | - | - | - |
21752175
*
21762176
* @li [0] https://learn.sparkfun.com/tutorials/tiny-avr-programmer-hookup-guide/attiny85-use-hints
2177-
* @li [1] http://highlowtech.org/?p=1695
2177+
* @li [1] http://highlowtech.org/?p=1695 The ATTiny2313 is unsupported due to lack of sufficient memory resources.
21782178
* @li [2] http://littlewire.github.io/
21792179
* <br><br><br>
21802180
*
@@ -2258,6 +2258,8 @@ class RF24 {
22582258
* http://highlowtech.org/?p=1695 <br>
22592259
* See the included rf24ping85 example for pin info and usage
22602260
*
2261+
* @warning The ATTiny2313 is unsupported due to lack of sufficient memory resources
2262+
*
22612263
* Some versions of Arduino IDE may require a patch to allow use of the full program space on ATTiny<br>
22622264
* See https://github.com/TCWORLD/ATTinyCore/tree/master/PCREL%20Patch%20for%20GCC for ATTiny patch
22632265
*

examples/MulticeiverDemo/MulticeiverDemo.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ uint64_t address[6] = {0x7878787878LL,
3838
// transmit and only 1 node to receive, we will use a negative value in our
3939
// role variable to signify this node is a receiver.
4040
// role variable is used to control whether this node is sending or receiving
41-
char role = 'R'; // 0-5 = TX node; any negative number = RX node
41+
char role = 'R'; // integers 0-5 = TX node; character 'R' or integer 82 = RX node
4242

4343
// For this example, we'll be using a payload containing
4444
// a node ID number and a single integer number that will be incremented
@@ -195,4 +195,4 @@ void setRole() {
195195
// So, use varying delay between retry attempts and 15 (at most) retry attempts
196196
radio.setRetries(((role * 3) % 12) + 3, 15); // maximum value is 15 for both args
197197
}
198-
} // setRole
198+
} // setRole

examples/rf24_ATTiny/rf24ping85/rf24ping85.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ void loop() {
196196
radio.stopListening(); // put in TX mode
197197

198198
radio.writeFast(&payload, sizeof(payload)); // load response to TX FIFO
199-
bool report = radio.txStandBy(150); // keep retrying for 150 ms
199+
radio.txStandBy(150); // keep retrying for 150 ms
200200

201201
radio.startListening(); // put back in RX mode
202202
}

examples_linux/multiceiverDemo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ int main(int argc, char** argv) {
8181

8282
// to use different addresses on a pair of radios, we need a variable to
8383
// uniquely identify which address this radio will use to transmit
84-
unsigned int nodeNumber = 'R'; // 0 uses address[0] to transmit, 1 uses address[1] to transmit
84+
unsigned int nodeNumber = 'R'; // integers 0-5 = TX node; character 'R' or integer 82 = RX node
8585

8686
bool foundArgNode = false;
8787
if (argc > 1) {
@@ -94,7 +94,7 @@ int main(int argc, char** argv) {
9494
else if (strcmp(argv[1], "-n") == 0 || strcmp(argv[1], "--node") == 0) {
9595
// "-n" or "--node" has been specified
9696
foundArgNode = true;
97-
if ((argv[2][0] - 48) < 6) {
97+
if ((argv[2][0] - 48) < 6 && (argv[2][0] - 48) >= 0) {
9898
nodeNumber = argv[2][0] - 48;
9999
}
100100
else if (argv[2][0] == 'R' || argv[2][0] == 'r') {
@@ -270,4 +270,4 @@ void printHelp(string progName) {
270270
<< " -n {0,1,2,3,4,5,r,R}, --node {0,1,2,3,4,5,r,R}"
271271
<< "\n\t\t\t0-5 specifies the identifying node ID number for the TX role."
272272
<< "\n\t\t\t'r' or 'R' specifies the RX role." << endl;
273-
}
273+
}

images/ghetto_sheilding_1.png

1.31 MB
Loading

images/ghetto_sheilding_2.png

1.18 MB
Loading

0 commit comments

Comments
 (0)