Skip to content

Commit cc5658a

Browse files
committed
1.73 2017-03-04 Significant changes to RH_RF24 and its API. It is no longer possible to change the modulation scheme programatically: it proved impossible to cater for all the possible crystal frequencies, base frequency and modulation schemes. Instead you can use one of a small set of supplied radio configuration header files, or generate your own with Silicon Labs WDS application. Changing modulation scheme required editing RH_RF24.cpp to specify the appropriate header and recompiling. convert.pl is now redundant and removed from the distribution.
1.74 2017-03-08 Changed RHReliableDatagram so it would not ACK messages heard addressed to other nodes in promiscuous mode. Added RH_RF24::deviceType() to return the integer value of the connected device. Added documentation about how to connect RFM69 to an ESP8266. Tested OK. RH_RF24 was not correctly changing state in sleep() and setModeIdle(). Added example rf24_lowpower_client.pde showing how to put an arduino and radio into a low power mode between transmissions to save battery power. Improvements to RH_RF69::setTxPower so it now takes an optional ishighpowermodule flag to indicate if the connected module is a high power RFM69HW, and so set the power level correctly. Based on code contributed by bob.
1 parent f511f1f commit cc5658a

29 files changed

+2946
-234
lines changed

MANIFEST

+8-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ RadioHead/RH_RF22.cpp
3030
RadioHead/RH_RF22.h
3131
RadioHead/RH_RF24.cpp
3232
RadioHead/RH_RF24.h
33-
RadioHead/radio_config_Si4460.h
3433
RadioHead/RH_RF69.cpp
3534
RadioHead/RH_RF69.h
3635
RadioHead/RH_MRF89.cpp
@@ -81,6 +80,7 @@ RadioHead/examples/rf22/rf22_router_server3/rf22_router_server3.pde
8180
RadioHead/examples/rf22/rf22_router_test/rf22_router_test.pde
8281
RadioHead/examples/rf22/rf22_server/rf22_server.pde
8382
RadioHead/examples/rf24/rf24_client/rf24_client.pde
83+
RadioHead/examples/rf24/rf24_lowpower_client/rf24_lowpower_client.pde
8484
RadioHead/examples/rf24/rf24_reliable_datagram_client/rf24_reliable_datagram_client.pde
8585
RadioHead/examples/rf24/rf24_reliable_datagram_server/rf24_reliable_datagram_server.pde
8686
RadioHead/examples/rf24/rf24_server/rf24_server.pde
@@ -123,4 +123,10 @@ RadioHead/STM32ArduinoCompat/HardwareSPI.h
123123
RadioHead/STM32ArduinoCompat/wirish.cpp
124124
RadioHead/STM32ArduinoCompat/wirish.h
125125
RadioHead/STM32ArduinoCompat/README
126-
RadioHead/RH_RF24_property_data/convert.pl
126+
RadioHead/RH_RF24_property_data/convert.pl
127+
RadioHead/RF24configs/radio_config_Si4464_27_434_2GFSK_5_10.h
128+
RadioHead/RF24configs/radio_config_Si4464_30_915_2GFSK_10_20.h
129+
RadioHead/RF24configs/radio_config_Si4464_30_434_2GFSK_10_20.h
130+
RadioHead/RF24configs/radio_config_Si4464_30_915_2GFSK_5_10.h
131+
RadioHead/RF24configs/radio_config_Si4464_30_434_2GFSK_5_10.h
132+
RadioHead/RF24configs/README

RF24configs/README

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
This directory contains a selection of radio configuiration files for use by RH_RF24.cpp
2+
They were generated by Silicon Labs Wireless Development Suite (WDS) 3.2.11.0
3+
The configuration file controls all the basic frequency aand modulation parameters for the radio.
4+
The appropriate one for your application or sketch must be #included by RH_RF24.cpp
5+
6+
You can generate your own custom configuration file by generatng a new one with WDS,
7+
copying it to this directory with a unique anme and #include it in RH_RF24.cpp
8+
9+
The file names encode the basic parameters:
10+
11+
radio_config_Siaaaa_bb_ccc_dddd_ee_ff_gg.h
12+
13+
where
14+
aaaa = Chip typenukber eg 4464
15+
bb = Crytsyal frequency in MHz
16+
ccc = RF base frequency in MHz
17+
dddd = Modulation type eg 2GFSK
18+
ee = Data rate in kbps
19+
ff = Deviation in kHz

RF24configs/radio_config_Si4464_27_434_2GFSK_5_10.h

+516
Large diffs are not rendered by default.

RF24configs/radio_config_Si4464_30_434_2GFSK_10_20.h

+516
Large diffs are not rendered by default.

RF24configs/radio_config_Si4464_30_434_2GFSK_5_10.h

+516
Large diffs are not rendered by default.

RF24configs/radio_config_Si4464_30_915_2GFSK_10_20.h

+516
Large diffs are not rendered by default.

RF24configs/radio_config_Si4464_30_915_2GFSK_5_10.h

+516
Large diffs are not rendered by default.

RHGenericDriver.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RHGenericDriver.cpp
22
//
33
// Copyright (C) 2014 Mike McCauley
4-
// $Id: RHGenericDriver.cpp,v 1.20 2017/01/12 23:58:00 mikem Exp $
4+
// $Id: RHGenericDriver.cpp,v 1.21 2017/03/04 00:59:41 mikem Exp $
55

66
#include <RHGenericDriver.h>
77

RHGenericDriver.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RHGenericDriver.h
22
// Author: Mike McCauley ([email protected])
33
// Copyright (C) 2014 Mike McCauley
4-
// $Id: RHGenericDriver.h,v 1.18 2017/01/12 23:58:00 mikem Exp $
4+
// $Id: RHGenericDriver.h,v 1.19 2017/03/08 09:30:47 mikem Exp mikem $
55

66
#ifndef RHGenericDriver_h
77
#define RHGenericDriver_h
@@ -296,6 +296,8 @@ class RHGenericDriver
296296

297297
/// Channel activity detected
298298
volatile bool _cad;
299+
300+
/// Channel activity timeout in ms
299301
unsigned int _cad_timeout;
300302

301303
private:

RHReliableDatagram.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010
// Author: Mike McCauley ([email protected])
1111
// Copyright (C) 2011 Mike McCauley
12-
// $Id: RHReliableDatagram.cpp,v 1.16 2017/01/12 23:58:00 mikem Exp $
12+
// $Id: RHReliableDatagram.cpp,v 1.17 2017/03/08 09:30:47 mikem Exp mikem $
1313

1414
#include <RHReliableDatagram.h>
1515

@@ -122,9 +122,10 @@ bool RHReliableDatagram::recvfromAck(uint8_t* buf, uint8_t* len, uint8_t* from,
122122
// Never ACK an ACK
123123
if (!(_flags & RH_FLAGS_ACK))
124124
{
125-
// Its a normal message for this node, not an ACK
126-
if (_to != RH_BROADCAST_ADDRESS)
125+
// Its a normal message not an ACK
126+
if (_to ==_thisAddress)
127127
{
128+
// Its for this node and
128129
// Its not a broadcast, so ACK it
129130
// Acknowledge message with ACK set in flags and ID set to received ID
130131
acknowledge(_id, _from);

RH_ASK.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RH_ASK.h
22
//
33
// Copyright (C) 2014 Mike McCauley
4-
// $Id: RH_ASK.h,v 1.16 2016/07/07 00:02:53 mikem Exp $
4+
// $Id: RH_ASK.h,v 1.17 2017/03/04 00:59:41 mikem Exp $
55

66
#ifndef RH_ASK_h
77
#define RH_ASK_h

RH_NRF51.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// Per: nRF51_Series_Reference_manual v3.0.pdf
44
// Copyright (C) 2012 Mike McCauley
5-
// $Id: RH_NRF51.cpp,v 1.4 2017/02/01 21:46:02 mikem Exp mikem $
5+
// $Id: RH_NRF51.cpp,v 1.4 2017/02/01 21:46:02 mikem Exp $
66

77
// Set by Arduino IDE and RadioHead.h when compiling for nRF51 or nRF52 chips:
88

RH_RF22.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RH_RF22.h
22
// Author: Mike McCauley ([email protected])
33
// Copyright (C) 2011 Mike McCauley
4-
// $Id: RH_RF22.h,v 1.31 2016/08/17 01:53:21 mikem Exp $
4+
// $Id: RH_RF22.h,v 1.32 2017/03/04 00:59:41 mikem Exp $
55
//
66

77
#ifndef RH_RF22_h

0 commit comments

Comments
 (0)