Cross-platform, completely new design, huge amount of new features!
Gateway is the main node serving the wireless network.
The gateway can be one of two types: Serial Gateway or Ethernet Gateway.
Serial Gateway connects to the computer via USB.
Ethernet Gateway connects to your computer over LAN or Wi-Fi.
To build a gateway, you need an Arduino board and a wireless module NRF24L01+.
The gateway must be connected to a computer via USB, so you must have Arduino with
USB interface onboard. NRF24L01+ is powered by 3.3V, so the easiest option is
to make the gateway with the Arduino Uno, Nano or Mega, which has 3.3V voltage regulator.
If you have a Board without 3.3V stabilizer, you can use an external stabilizer.
The voltage regulator may be different, so the connection here is conditionally. The Arduino Pro Mini has no USB interface, so you will also need a Serial-USB converter.
NRF24L01+ module is very picky to the power supply. If you encounter a bad connection quality, or a complete lack of connection - most likely there is a problem with the power supply. The fix is fairly easy. So just add a capacitor between +3.3V and GND pins on the NRF24L01+. The capacitor should be put as close as possible to the NRF24L01+ module. You need to find the value of capacitor empirically in range between .3.3 uF - 47 uF. There is no exact recipe, in different situations need different capacitor.
To build Ethernet Gateway, that would work over LAN, you need an Arduino board, NRF24L01+ module and an Ethernet module (W5100 or ENC28J60).
Ethernet Gateway, that would work over Wi-Fi, can be assembled from ESP8266 and NRF24L01+ module.
When the gateway is assembled, it remains to flash the firmware.
Download the desired firmware from the link below:
Serial Gateway Ethernet Gateway (LAN) Ethernet Gateway (Wi-Fi)
For flashing firmware you need MySensors libraries
Download MySensors libraries
You can configure some settings before flashing, in the MySensors library. Open libraries\MySensors\MyConfig.h file in the text editor. These settings will apply to the gateway and node, too. Here is a description for the most important ones.
This pins are connected to NRF24L01. By default they are configured to CE 9, CS 10, but it is better to use CE 7, CS 8, because these pins are typically less used for other purposes. Schema above shows the connection of the module to these pins.
Frequency channel of the wireless network (0 to 127). Some channels may be occupied by neighboring WiFi routers. You can figure out what channels are not busy, if you flash frequencies scanner to the gateway.
It is the power of the transmitter. If you do not plan to connect devices at a distance, you can set RF24_PA_LOW to weaken the signal, or leave RF24_PA_MAX to get the maximum signal level and correspondingly the maximum range of communication.
This parameter specifies the data transmission speed between devices. Recommended to leave a minimum speed of RF24_250KBPS, as it will be better to communication quality, while in the actual performance of the network effect is not too noticeable. At a RF24_250KBPS speed you will receive up to 200 messages per second. If you need a higher data transfer rate, place RF24_1MBPS or RF24_2MBPS.
DEFAULT_RX_LED_PIN, DEFAULT_TX_LED_PIN, DEFAULT_ERR_LED_PIN
These parameters specify the pins to which you can connect three LEDs. RX led will be blinking, when the gateway gets something from the network. TX - when the gateway transmits the message to the network. ERR - when an error occurred in the transmission. For example, node that the message is intended is not available. Put for example RX_LED_PIN 6, TX_LED_PIN 5, ERR_LED_PIN 4, and connect the LEDs (don't forget to use resitor on each led).