Skip to content

Commit

Permalink
1.73 2017-03-04 Significant changes to RH_RF24 and its API. It is no …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
MFornander committed Apr 10, 2017
1 parent f511f1f commit cc5658a
Show file tree
Hide file tree
Showing 29 changed files with 2,946 additions and 234 deletions.
10 changes: 8 additions & 2 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ RadioHead/RH_RF22.cpp
RadioHead/RH_RF22.h
RadioHead/RH_RF24.cpp
RadioHead/RH_RF24.h
RadioHead/radio_config_Si4460.h
RadioHead/RH_RF69.cpp
RadioHead/RH_RF69.h
RadioHead/RH_MRF89.cpp
Expand Down Expand Up @@ -81,6 +80,7 @@ RadioHead/examples/rf22/rf22_router_server3/rf22_router_server3.pde
RadioHead/examples/rf22/rf22_router_test/rf22_router_test.pde
RadioHead/examples/rf22/rf22_server/rf22_server.pde
RadioHead/examples/rf24/rf24_client/rf24_client.pde
RadioHead/examples/rf24/rf24_lowpower_client/rf24_lowpower_client.pde
RadioHead/examples/rf24/rf24_reliable_datagram_client/rf24_reliable_datagram_client.pde
RadioHead/examples/rf24/rf24_reliable_datagram_server/rf24_reliable_datagram_server.pde
RadioHead/examples/rf24/rf24_server/rf24_server.pde
Expand Down Expand Up @@ -123,4 +123,10 @@ RadioHead/STM32ArduinoCompat/HardwareSPI.h
RadioHead/STM32ArduinoCompat/wirish.cpp
RadioHead/STM32ArduinoCompat/wirish.h
RadioHead/STM32ArduinoCompat/README
RadioHead/RH_RF24_property_data/convert.pl
RadioHead/RH_RF24_property_data/convert.pl
RadioHead/RF24configs/radio_config_Si4464_27_434_2GFSK_5_10.h
RadioHead/RF24configs/radio_config_Si4464_30_915_2GFSK_10_20.h
RadioHead/RF24configs/radio_config_Si4464_30_434_2GFSK_10_20.h
RadioHead/RF24configs/radio_config_Si4464_30_915_2GFSK_5_10.h
RadioHead/RF24configs/radio_config_Si4464_30_434_2GFSK_5_10.h
RadioHead/RF24configs/README
19 changes: 19 additions & 0 deletions RF24configs/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
This directory contains a selection of radio configuiration files for use by RH_RF24.cpp
They were generated by Silicon Labs Wireless Development Suite (WDS) 3.2.11.0
The configuration file controls all the basic frequency aand modulation parameters for the radio.
The appropriate one for your application or sketch must be #included by RH_RF24.cpp

You can generate your own custom configuration file by generatng a new one with WDS,
copying it to this directory with a unique anme and #include it in RH_RF24.cpp

The file names encode the basic parameters:

radio_config_Siaaaa_bb_ccc_dddd_ee_ff_gg.h

where
aaaa = Chip typenukber eg 4464
bb = Crytsyal frequency in MHz
ccc = RF base frequency in MHz
dddd = Modulation type eg 2GFSK
ee = Data rate in kbps
ff = Deviation in kHz
516 changes: 516 additions & 0 deletions RF24configs/radio_config_Si4464_27_434_2GFSK_5_10.h

Large diffs are not rendered by default.

516 changes: 516 additions & 0 deletions RF24configs/radio_config_Si4464_30_434_2GFSK_10_20.h

Large diffs are not rendered by default.

516 changes: 516 additions & 0 deletions RF24configs/radio_config_Si4464_30_434_2GFSK_5_10.h

Large diffs are not rendered by default.

516 changes: 516 additions & 0 deletions RF24configs/radio_config_Si4464_30_915_2GFSK_10_20.h

Large diffs are not rendered by default.

516 changes: 516 additions & 0 deletions RF24configs/radio_config_Si4464_30_915_2GFSK_5_10.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion RHGenericDriver.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RHGenericDriver.cpp
//
// Copyright (C) 2014 Mike McCauley
// $Id: RHGenericDriver.cpp,v 1.20 2017/01/12 23:58:00 mikem Exp $
// $Id: RHGenericDriver.cpp,v 1.21 2017/03/04 00:59:41 mikem Exp $

#include <RHGenericDriver.h>

Expand Down
4 changes: 3 additions & 1 deletion RHGenericDriver.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RHGenericDriver.h
// Author: Mike McCauley (mikem@airspayce.com)
// Copyright (C) 2014 Mike McCauley
// $Id: RHGenericDriver.h,v 1.18 2017/01/12 23:58:00 mikem Exp $
// $Id: RHGenericDriver.h,v 1.19 2017/03/08 09:30:47 mikem Exp mikem $

#ifndef RHGenericDriver_h
#define RHGenericDriver_h
Expand Down Expand Up @@ -296,6 +296,8 @@ class RHGenericDriver

/// Channel activity detected
volatile bool _cad;

/// Channel activity timeout in ms
unsigned int _cad_timeout;

private:
Expand Down
7 changes: 4 additions & 3 deletions RHReliableDatagram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Author: Mike McCauley (mikem@airspayce.com)
// Copyright (C) 2011 Mike McCauley
// $Id: RHReliableDatagram.cpp,v 1.16 2017/01/12 23:58:00 mikem Exp $
// $Id: RHReliableDatagram.cpp,v 1.17 2017/03/08 09:30:47 mikem Exp mikem $

#include <RHReliableDatagram.h>

Expand Down Expand Up @@ -122,9 +122,10 @@ bool RHReliableDatagram::recvfromAck(uint8_t* buf, uint8_t* len, uint8_t* from,
// Never ACK an ACK
if (!(_flags & RH_FLAGS_ACK))
{
// Its a normal message for this node, not an ACK
if (_to != RH_BROADCAST_ADDRESS)
// Its a normal message not an ACK
if (_to ==_thisAddress)
{
// Its for this node and
// Its not a broadcast, so ACK it
// Acknowledge message with ACK set in flags and ID set to received ID
acknowledge(_id, _from);
Expand Down
2 changes: 1 addition & 1 deletion RH_ASK.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RH_ASK.h
//
// Copyright (C) 2014 Mike McCauley
// $Id: RH_ASK.h,v 1.16 2016/07/07 00:02:53 mikem Exp $
// $Id: RH_ASK.h,v 1.17 2017/03/04 00:59:41 mikem Exp $

#ifndef RH_ASK_h
#define RH_ASK_h
Expand Down
2 changes: 1 addition & 1 deletion RH_NRF51.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// Per: nRF51_Series_Reference_manual v3.0.pdf
// Copyright (C) 2012 Mike McCauley
// $Id: RH_NRF51.cpp,v 1.4 2017/02/01 21:46:02 mikem Exp mikem $
// $Id: RH_NRF51.cpp,v 1.4 2017/02/01 21:46:02 mikem Exp $

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

Expand Down
2 changes: 1 addition & 1 deletion RH_RF22.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RH_RF22.h
// Author: Mike McCauley (mikem@airspayce.com)
// Copyright (C) 2011 Mike McCauley
// $Id: RH_RF22.h,v 1.31 2016/08/17 01:53:21 mikem Exp $
// $Id: RH_RF22.h,v 1.32 2017/03/04 00:59:41 mikem Exp $
//

#ifndef RH_RF22_h
Expand Down
Loading

0 comments on commit cc5658a

Please sign in to comment.