This article is the second in a series that started here.
Detailed setup instructions can be found at RAK’s site: https://doc.rakwireless.com/quick-start/rak7204-lora-environmental-sensor/rak7204-lora-environmental-sensor
There’s not a lot in the box besides the sensor itself.
The sensor ships with the battery disconnected. First you must remove the cover and connect the battery. Warning: I found it quite difficult to subsequently disconnect the battery.
Per RAK’s instructions, the RAK7204 is setup using a USB-serial connection to a PC and the RAK Serial Port Tool. This is a Windows-only tool. Urgh. In 2019. Let’s hope the impending new decade is better.
Using the RAK Serial Port Tool you can determine the current firmware version. In my case it was 188.8.131.52.H. Per RAK’s firmware update instructions, firmware versions 3 and above do not require a bootloader upgrade. However firmware version 184.108.40.206.H.T was available so I updated using the RAK Upgrade Tool.
Using the at+set_config=lora:region:AU915 AT command I changed the region from the default EU868 to the desired AU915.
With the at+set_config=lora:send_interval:1:30 AT command I temporarily adjusted the send interval to 30 seconds for the purposes of testing.
I retained defaults for all other LoRa settings: LoRaWAN work mode, Class A, OTAA join mode and so forth.
The Things Network Registration
RAK has excellent instructions for adding the RAK7204 as an application device in the The Things Network: https://doc.rakwireless.com/rak7204-lora-environmental-sensor/connecting-to-the-things-network
In my case I created an application called uncannier-home.
And created one rak7204 device within that application.
Per RAK’s instructions, you then need to use the Serial Port Tool and AT commands to correctly set the Device EUI, Application EUI and Application Key in your RAK7204. Your device should then join with TTN and the registration is complete.
The joining and data can be observed on your TTN application.
On the RAK7204 console.
And on your TTN gateway traffic.
RAK covers payload decoding here: https://doc.rakwireless.com/rak7204-lora-environmental-sensor/analyzing-the-data-from-rak7204
With the RAK7204 and my RAK2245, I achieve a maximum range of ~150m, under the following conditions:
- using the little antenna that comes packaged with my RAK2245.
- with my RAK2245 gateway inside my house.
- with numerous trees and buildings obscuring line-of-sight.
- with the RAK7204 spreading factor at the default of 7 and bandwidth at the default of 125kHz; this results in a nominal sensitivity of -126dBm.
- with the RAK7204 transmit power at +5dBm as reported by the at+get_config=lora:status AT command.
- giving the RAK7204 multiple transmit opportunities for an occasional success.
According to the Silicon Labs’ Simple Range Calculator this should result in a range of ~4.5km outdoors and ~780m indoors. Assuming a gain of 0dB for each antenna (in lieu of any actual specifications from RAK).
In later articles I will experiment with an outdoor antenna for the gateway and with adjusting parameters such as the transmit power, spreading factor and bandwidth.