A couple of BorosRF2 Dual nRF24L01 Hats arrived earlier in the week. After some testing with my nRF24L01 Test application I have added compile-time configuration options for the two nRF24L01 sockets to my Azure IoT Hub nRF24L01 Field Gateway.
public sealed class StartupTask : IBackgroundTask
{
private const string ConfigurationFilename = "config.json";
private const byte MessageHeaderPosition = 0;
private const byte MessageHeaderLength = 1;
// nRF24 Hardware interface configuration
#if CEECH_NRF24L01P_SHIELD
private const byte RF24ModuleChipEnablePin = 25;
private const byte RF24ModuleChipSelectPin = 0;
private const byte RF24ModuleInterruptPin = 17;
#endif
#if BOROS_RF2_SHIELD_RADIO_0
private const byte RF24ModuleChipEnablePin = 24;
private const byte RF24ModuleChipSelectPin = 0;
private const byte RF24ModuleInterruptPin = 27;
#endif
#if BOROS_RF2_SHIELD_RADIO_1
private const byte RF24ModuleChipEnablePin = 25;
private const byte RF24ModuleChipSelectPin = 1;
private const byte RF24ModuleInterruptPin = 22;
#endif
private readonly LoggingChannel logging = new LoggingChannel("devMobile Azure IotHub nRF24L01 Field Gateway", null, new Guid("4bd2826e-54a1-4ba9-bf63-92b73ea1ac4a"));
private readonly RF24 rf24 = new RF24();
This version supports one nRF24L01 device socket active at a time.
Enabling both nRF24L01 device sockets broke outbound message routing in a prototype branch with cloud to device(C2D) messaging support. This functionality is part of an Over The Air(OTA) device provisioning implementation I’m working o.