Sending sensor data to Oracle Cloud with LoRaWan RAK Wireless and The Things Network | PART TWO

In the first part of this post series we explained the overall architecture of the solution.

Today we’re gonna be configuring the RAK Developer Kit 2 (Weather Kit) using this guide by giving a couple of tricks to get it working soon.


Once you have the gateway with the antennas and power supply correctly plugged in, once gateway the wireless access point is available, connect your laptop to the access point, ssh to the gateway default IP and run the gateway config tool:

ssh pi@
pi@'s password: 
Linux rak-gateway 4.19.97+ #1294 Thu Jan 30 13:10:54 GMT 2020 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

 ______  ___   _   __  _    _ _          _  IoT Made Easy
 | ___ \/ _ \ | | / / | |  | (_)        | |              
 | |_/ / /_\ \| |/ /  | |  | |_ _ __ ___| | ___  ___ ___ 
 |    /|  _  ||    \  | |/\| | | '__/ _ \ |/ _ \/ __/ __|
 | |\ \| | | || |\  \ \  /\  / | | |  __/ |  __/\__ \__ \
 \_| \_\_| |_/\_| \_/  \/  \/|_|_|  \___|_|\___||___/___/

Last login: Mon Apr 18 20:02:57 2022 from

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

pi@rak-gateway:~ $ sudo gateway-config 

Go to wifi-setup, configure wifi parameters and restart the gateway:

Restart the gateway.

Reconnect the laptop to the wifi and use a tool to obtain the IP of the gateway:

ssh again to the gateway and continue configuring it:

Edit the configuration:

Go to the end of the file and put the gateway_ID and server_address of TTN according to your gateway and region:

pi@rak-gateway:~ $ gateway-version
Raspberry Pi Zero W Rev 1.1, OS "10 (buster)", 4.19.97+.
RAKWireless gateway RAK7246 version 4.2.5R install from firmware.
Gateway ID: B8......CE.

Resrtart the gateway, ssh again and check logs:

pi@rak-gateway:~ $ tail -f /var/log/*.log


Goto TTN and create an account:

Log in, goto console, select a cluster, goto gateways and create a new gateway:

Put a name, description and blablabla. The important information to provide is remarked in red:
Once the gateway is added, soon it should be signaled as Connected, if not check the gateway logs:


Now, let’s create an application:

Click on the application created:

Add a device:

Provide the information requested:

AppEUI, DevEUI and AppKey can be created your own

That’s all for the second part. In the next chapter we’ll set up the device.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.