On Habré, an
article about a radio module was recently published, in my opinion, it is unfairly deprived of attention to a 2.4 GHz device with an SPI interface. They are attracted by the price of two or three dollars apiece, and a ready communication protocol, including addressing, CRC, sending confirmation and other amenities.

The
RF-2400P modules from
Inhaos are built on a
BK2421 chip, which seems to be lapped up with the Nordic
NRF24L01 . Therefore, you can use the
Mirf library written for Nordic to work with them.
The task that I solved was to organize the exchange of data between several modules, so the logic of work used in Mirf and built on the interaction between a pair of modules was not very convenient. Instead, a virtual piece of memory was organized, synchronized by radio interface, which was used by several devices at the same time. The result was
such a library for arduino.

In addition to the RF-2400P modules, Inhaos offers a very nice USB “whistle”
RF-2410U built on the same BK2421 but already in conjunction with the
C8051F321 microcontroller, which comes with a stitched bootloader and can be
programmed via USB using the supplied bootloader.
')
In my opinion, it turns out to be a very affordable and interesting solution for a “smart home” system - a bunch of cheap radio modules, which, thanks to the price, can be embedded even in light bulbs and a compact control interface in the form of a “whistle”, which can be plugged into any computer without bothering with additional wires and the presence of a serial port.
RF-2400 Demo
To simplify the process of acquaintance with these devices and to illustrate their joint work, the following demo is presented to your attention.
Iron
- Client device - Arduino + RF-2400P
- Server device - arduino + RF-2400P
- Observer - Windows PC + RF-2410U
In principle, one can do without (1) or (3).
Soft
- Library RFSync and arduino scripts for the client and server side.
- Firmware for RF-2410U, and drivers for it.
- Client Windows application RF-2410U.
Work logic

- On the client board, the current time is recorded in the synchronized array at address 0.
- On the server board, after synchronization, the data read but address 0 is duplicated at address 5.
- After synchronization is completed, the client board reads the value at address 5 and calculates the time spent on synchronization.
- This whole
circus synchronization process is observed on a Windows machine with a RF-2410U connected module using a client application.
Launch
1. Connect the RF-2400P modules to the Arduino boards as follows:
Module | Arduino |
---|
Miso | 12 |
---|
MOSI | eleven |
---|
SCK | 13 |
---|
CE | eight |
---|
CSN | 7 |
---|
3.3 V | 3.3 V |
---|
GND | GND |
---|
2. Copy the
library code to the Arduino folder and flash the
client and
server scripts.
3. We observe data exchange through the serial interface.

4. Download the
firmware in the RF-2410U.
- make sure the module is not connected to the computer
- Run the firmware application .
- select firmware, click "Download"
- Insert the RF-2410U module into the USB port
- wait for the message Download Succeed

5. When connecting, RF-2410U will ask for the driver,
give it to him .
6. It remains to load the
client application, click the start button and watch the synchronization process in real time.
