RAK7246G Quick Start Guide
Prerequisites
What Do You Need?
- RAK7246/RAK7246G WisGate Developer D0/D0+ Gateway
- 16 GB SD card (included) + Card Reader
- 5 V at least 2.5 A Micro USB Power Supply (not included)
- A Windows/Mac OS/Linux Computer
- Latest RAK7246G Firmware
The SIM card slot of the cellular versions is not hot-swappable. Make sure the gateway is switched off before inserting or ejecting the SIM card.
What's Included in the Package?
Figure 1: RAK7246G package contentsProduct Configuration
Accessing Your Gateway
After burning the firmware image onto the SD Card, make sure you have inserted the SD card into the RAK7246/RAK7246G WisGate Developer D0/D0+ Gateway and have the LoRa and GPS Antenna connected. To learn more on how to burn the image, check the Learn section.
After which, you can now safely power on the gateway. In this section, several ways to access the gateway are provided to have different alternatives for you to choose from depending on the availability of the requirements needed.
Before powering the Raspberry Pi 4, you should connect the LoRa and GPS antennas. Not doing so might damage the boards.
Wi-Fi AP Mode
By default, the gateway will work in Wi-Fi AP Mode, which means you can find an SSID named Rakwireless_XXXX on your PC Wi-Fi network list.
Figure 1: RAKwireless access pointXXXX is the last 2 bytes of your RAK7244 WiFi MAC address. Connect to this Wi-Fi SSID using the password provided below. Take note also of the default IP address of the gateway provided below as this will be needed in connecting via SSH.
- Wi-Fi Password: rakwireless
- Default IP Address:
192.168.230.1
Log in to the Gateway
Windows OS
SSH (Secure Shell) is typically used to log in to a remote machine and execute commands. There are a lot of free and good SSH Clients out there namely Putty, BitVise SSH Client, MobaXterm and many more. Feel free to choose one that fits your needs. But for this guide, you will be using Putty.
Figure 1: Putty software for SSH in Windows- It will then prompt you to enter the username and password. The default username and password are provided below:
- Username: pi
- Password: raspberry
Figure 1: Command line after log inMac OS
Open the Terminal of Mac OS. Launch the Terminal application, which is found in /Applications/Utilities/ directory. But you can also launch it from Spotlight - press Command + Spacebar, type Terminal, and then return.
Figure 1: Opening Terminal in Mac OSOpen the terminal of Mac OS. Enter root mode by typing the following command:
sudo -i
Figure 1: SSH in Mac OSIf you are not in root mode, enter ssh pi@192.168.230.1 in the terminal to log in to your gateway, the default password is raspberry.
Figure 1: Log in successful notificationLinux OS
If the OS of your PC is Linux, you should do the same as the Mac OS, except for the root mode.
Accessing the Internet
Assuming you have successfully logged into your gateway using SSH, enter the following command in the command line:
sudo gateway-config
You will now then see a page the same as Figure 8.
Figure 1: Configuration options for the gateway- Set pi password- used to set/change the password of the gateway.
- Set RAK Gateway Channel Plan - used to configure the frequency, on which the gateway will operate, and the LoRaWAN server which the gateway will work with.
- Restart packet-forwarder - used to restart the LoRa packet forwarder.
- Edit packet-forwarder config - used to open the
global_conf.jsonfile, to edit LoRaWAN parameters manually. - Configure WIFI - used to configure the Wi-Fi settings to connect to a network.
- Configure LAN - used to configure the Ethernet adapter settings.
Connect through Wi-Fi
If you want to connect through Wi-Fi, it can easily be done with the wireless capabilities of the Raspberry Pi Zero W by choosing 5 Configure Wifi. By default, the RAK7246/RAK7246G WisGate Developer D0/D0+ Gateway works in Wi-Fi AP Mode.
For the gateway to connect to the router, it must work in Wi-Fi Client Mode.
Figure 1: Configuration options for Wi-FiThere are 5 options to choose from in the Wi-Fi configuration menu:
- Enable AP Mode/Disable Client Mode - the gateway will work in Wi-Fi Access Point Mode after rebooting while the Wi-Fi Client Mode will be disabled (this is the default mode).
- Enable Client Mode/Disable AP Mode - the gateway will work in Wi-Fi Client mode after rebooting, while Wi-FI AP Mode will be disabled.
- Modify SSID and pwd for AP Mode - used to modify the SSID and password of the Wi-Fi AP. Only works if the Wi-Fi AP Mode is enabled.
- Add New SSID for Client - used if you want to connect to a new Wi-Fi Network. Only works in Wi-Fi Client mode.
- Change Wi-Fi Country - used to modify the resident country to match Wi-Fi standards.
To enable Wi-Fi Client Mode, you have to disable first the AP Mode.
Once Wi-Fi AP Mode has been disabled by choosing 2 Enable Client Mode/Disable AP Mode, you can now then connect to a new Wi-Fi Network by choosing 4 Add New SSID for Client.
Figure 1: Add a new SSID- Start by selecting your country of residence.
Figure 1: Selecting country of residence- Enter the SSID of the network you want to connect.
Make sure to input the correct Wi-Fi SSID and password, or you will not be able to connect to the RAK7246/RAK7246G again via SSH in Wi-Fi AP Mode. If stuck in this situation, follow this procedure listed in the Reverting Back to Wi-Fi AP Mode section, which is applicable for all Raspberry Pi based gateways to work again in Wi-Fi AP mode.
Figure 1: SSID of the network you want to connect- Type the password. If there is none, leave it empty.
Figure 1: Password of the Wi-FiOptional Configurations
The configurations under this section are only optional and situational.
Reverting Back to Wi-Fi AP Mode
If you have entered either or both incorrect Wi-Fi SSID and password in the Wi-Fi Client Mode setup for the RAK7244C WisGate Developer D4+ Gateway to connect to the router, follow these set of steps for you to work again in Wi-Fi AP Mode and redo the setup.
- Remove the SD card from your RAK7244C WisGate Developer D4+ Gateway and insert it into your PC. Your PC should be able to detect it same as Figure 16.
Figure 1: Creating rak_ap file to your SD card- Using your Command Prompt or Terminal, navigate to your SD Card and type this command to generate the
rak_apfile.
cd > rak_ap
- Check if the
rak_apfile is created successfully. If so, re-insert the SD card into your RAK7246/RAK7246G WisGate Developer D0/D0+ Gateway and it should work again in Wi-Fi AP Mode.
Configuring the Gateway
-
Assuming you have successfully logged into your gateway using SSH, enter the following command in the command line:
sudo gateway-config
Then you will see a page like Figure 17.
Figure 1: Gateway configuration options- Set pi password - used to set/change the password of the gateway.
- Setup RAK Gateway Channel Plan - used to configure the frequency, on which the gateway will operate, and the LoRaWAN Server which the gateway will work with.
- Restart packet-forwarder - used to restart the LoRa packet forwarder.
- Edit packet-forwarder config- used to open the
global_conf.jsonfile, to edit LoRaWAN parameters manually. - Configure WIFI - used to configure the Wi-Fi settings in order to connect to a network.
- Configure LAN - used to configure the Ethernet adapter settings.
A unique ID will be generated for the gateway. This is also called gateway EUI and is essential for registering the gateway with any LoRa Network Server (TTN and ChirpStack).
There is also another way to get your gateway ID, just enter the command below in the command line:
sudo gateway-version
Figure 1: Gateway ID using the command lineSetting a New Password for the Gateway
It is a good security practice to change the default password raspberry, which is the same on all Raspberry Pi devices.
- First, choose 1 Set pi password option.
Figure 1: Set Pi password- Next, press Yes. You will be asked to enter your new password twice then press Enter.
Figure 1: Confirm password change- A success message for changing the password will then pop up.
Figure 1: Successful password changeSetup RAK Gateway Channel Plan
This menu allows you to select your LoRa frequency band and one of the two available Networks Server options by choosing 2 Setup RAK Gateway Channel Plan.
Figure 1: Choosing channel planYou can choose one of two supported LoRa servers here: TTN or ChirpStack.
Server is TTN
Figure 1: TTN server- TTN (The Things Network) - If you choose TTN as the LoRa Server, you will see a page the same as shown in Figure 27. Visit LoRa Alliance Regional Parameters for more information on your local frequency plan. This will allow you to choose the correct plan.
Figure 1: Selecting the TTN channel planAfter choosing the correct frequency, a success message will appear, as shown in Figure 25.
Figure 1: Successfully changed the frequencyWhen a channel plan is selected, the gateway is configured to connect to the nearest cluster to the region. If new clusters are presented, the channel plans will be updated. For now, the only available clusters are as follows:
- Europe: eu1.cloud.thethings.network
- Australia: au1.cloud.thethings.network
- North America: nam1.cloud.thethings.network
If you want to use TTN for LoRa Network server, you can skip the If the Server is ChirpStack section and head to registering the gateway in TTN.
Server is Chirpstack
Figure 1: Chirpstack serverChirpStack - If you choose Chirpstack as your LoRa Server, you will see the following page with two options available:
- ChirpStack Channel Plan Configuration - used to configure your Regional Frequency Band.
- ChirpStack ADR Configure - used to enable/disable the Adaptive Data Rate (ADR) functionality.
Figure 1: Configure ChirpStack channel planFirst, select 1 ChirpStack Channel-plan configuration for configuring your frequency channel.
Figure 1: Regional frequency band optionThen set the IP address of the ChirpStack.
Figure 1: Default LoRaServer IP addressThe default IP Address is 127.0.0.1. If you want to use an external ChirpStack, you need to set it to its IP Address.
- If you have instead selected Chirpstack ADR Configure, you can enable/disable the Adaptive Data Rate (ADR) functionality.
Figure 1: Chirpstack ADR Enable/DisableIf you want to use ChirpStack for LoRa Network server, refer to the LoRaWAN Network Server Guide documentation under Connecting with ChirpStack section.
