### Execute Installation Script and Run Packet Forwarder Source: https://docs.rakwireless.com/product-categories/wislink/rak2247/quickstart This snippet shows the commands to execute the main installation script ('install.sh') and then navigate to the packet forwarder directory to run the 'lora_pkt_fwd' executable. This is the final step to get the gateway operational. ```shell sudo ./install.sh cd /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd sudo ./lora_pkt_fwd ``` -------------------------------- ### Example: Install NRF52840 Support Package Source: https://docs.rakwireless.com/product-categories/accessories/rakdap1/quickstart This is an example of how to install the NRF52840 support package for pyOCD, typically used for RAK4630 modules. ```bash pyocd pack --i nrf52840 ``` -------------------------------- ### List Installed pyOCD Packages Source: https://docs.rakwireless.com/product-categories/accessories/rakdap1/quickstart This command displays a list of all support packages that have been installed for pyOCD, allowing you to verify which packages are available for use. ```bash pyocd pack -s ``` -------------------------------- ### Install libusb and pkgconfig on macOS using Homebrew Source: https://docs.rakwireless.com/product-categories/software-apis-and-libraries/rakpios/quickstart After installing Homebrew, this command installs the `libusb` and `pkgconfig` libraries, which are often required for low-level USB device interaction and build system configuration. It utilizes Homebrew's `install` command. ```shell brew install pkgconfig libusb ``` -------------------------------- ### Install Make and GCC Tools (Debian/Ubuntu) Source: https://docs.rakwireless.com/product-categories/wisgate/rak7271-rak7371/quickstart Installs the essential build tools 'make' and 'gcc' required for compiling software on Debian-based systems. These are fundamental for building applications from source. ```bash sudo apt install make ``` ```bash sudo apt install gcc ``` -------------------------------- ### Arduino IDE 'Hello World' Example for RAK11162 Source: https://docs.rakwireless.com/product-categories/wisblock/rak11162/quickstart A basic Arduino sketch that prints 'Hello' to the serial monitor every 5 seconds. This example is used to test the RAK11162 setup and firmware upload process. It requires the RAKwireless RUI STM32 Boards to be installed in the Arduino IDE. ```c++ void setup() { Serial.begin(115200); } void loop() { Serial.println("Hello"); delay(5000); } ``` -------------------------------- ### Install pyOCD Support Package Source: https://docs.rakwireless.com/product-categories/accessories/rakdap1/quickstart This command installs necessary support packages (MDK files) required by pyOCD to flash and debug specific microcontrollers. Replace `` with the appropriate package name for your RAKwireless product. ```bash pyocd pack --i ``` -------------------------------- ### Example rpiboot Output on macOS Source: https://docs.rakwireless.com/product-categories/software-apis-and-libraries/rakpios/quickstart This is an example of the expected output when the `rpiboot` command successfully connects to and mounts the eMMC storage of a Raspberry Pi Compute Module. It shows the bootloader loading process and confirmation of successful connection. ```shell rak@RAK7391 usbboot % sudo ./rpiboot Password: RPIBOOT: build-date Sep 20 2022 version 20220815~145439 2472aaf9 Waiting for BCM2835/6/7/2711... Loading embedded: bootcode4.bin Sending bootcode.bin Successful read 4 bytes Waiting for BCM2835/6/7/2711... Loading embedded: bootcode4.bin Second stage boot server Loading embedded: start4.elf File read: start4.elf Second stage boot server done rak@RAK7391 usbboot % ``` -------------------------------- ### Compile and Upload Basic Example with Arduino for RAK3112 Source: https://docs.rakwireless.com/product-categories/wisduo/rak3112-module/quickstart This example demonstrates how to set up the Arduino IDE for the RAK3112, compile a simple program that prints 'Hello' to the serial monitor, and upload it to the device. It requires the RAK3112 to be added to the Arduino IDE. ```arduino void setup() { Serial.begin(115200); } void loop() { Serial.println("Hello"); delay(5000); } ``` -------------------------------- ### Navigate to Gateway Software Directory (Linux/Raspberry Pi) Source: https://docs.rakwireless.com/product-categories/wisgate/rak7271-rak7371/quickstart This command changes the current directory to the 'rak_common_for_gateway' directory, which is where the software was cloned. Subsequent installation commands should be run from this directory. ```bash cd ~/rak_common_for_gateway ``` -------------------------------- ### Install Packet Forwarder Files using Shell Script Source: https://docs.rakwireless.com/product-categories/wislink/rak2247/quickstart This snippet shows the commands to copy the necessary shell scripts and the packet forwarder directory to the installation location. It ensures that the 'set_eui.sh', 'update_gwid.sh', and 'start.sh' scripts are in the correct path within the packet forwarder directory, and then copies the entire packet forwarder structure to '/opt/ttn-gateway/'. ```shell cp ../set_eui.sh packet_forwarder/lora_pkt_fwd/ cp ../update_gwid.sh packet_forwarder/lora_pkt_fwd/ cp ../start.sh packet_forwarder/lora_pkt_fwd/ mkdir -p /opt/ttn-gateway/ cp -rf packet_forwarder /opt/ttn-gateway/ ``` -------------------------------- ### Sample Portainer Service Deployment Script (Bash) Source: https://docs.rakwireless.com/product-categories/software-apis-and-libraries/rakpios/tools This sample script demonstrates how to load the compressed Portainer image and start the Portainer service during the initial boot process. ```bash # Example: stage2-rak/.04-pre-install-containers/files/run-once-services/portainer.sh.sample #!/bin/bash # Load Portainer image docker load -i /usr/local/etc/images/container-tar-portainer.tar # Start Portainer service docker run -d -p 8000:8000 -p 9443:9443 --name portainer -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.16.0 echo "Portainer service started." ``` -------------------------------- ### RUI3 AT Command Format Examples Source: https://docs.rakwireless.com/product-categories/software-apis-and-libraries/rui3/at-command-manual Demonstrates the standard format for RUI3 AT commands and their expected output structures. Includes examples for querying command information, executing commands, getting values, and setting values. ```text AT+XXX? AT+XXX AT+XXX=? AT+XXX= ``` ```text AT+XXX= ``` -------------------------------- ### Check pyOCD Version Source: https://docs.rakwireless.com/product-categories/accessories/rakdap1/quickstart After installing pyOCD, this command can be used to verify the installation and check the installed version of the tool. ```bash pyocd --version ``` -------------------------------- ### Install pyOCD Source: https://docs.rakwireless.com/product-categories/accessories/rakdap1/quickstart This command installs the pyOCD tool, a Python-based utility for programming and debugging embedded systems using SWD. It requires pip3 to be installed. ```bash pip3 install pyocd ``` -------------------------------- ### Apply WiFi Configuration and Connect (NetworkManager) Source: https://docs.rakwireless.com/product-categories/wisgate/rak7391/quickstart These commands apply the new WiFi connection settings by setting ownership and permissions, reloading NetworkManager configurations, and activating the specified WiFi connection. This sequence ensures the device connects to the configured WiFi network. ```bash sudo chown -R root:root /etc/NetworkManager/system-connections/RAK.nmconnection sudo chmod -R 600 /etc/NetworkManager/system-connections/RAK.nmconnection sudo nmcli con reload sudo nmcli con up RAK ``` -------------------------------- ### Install adafruit-nrfutil on Linux Source: https://docs.rakwireless.com/product-categories/wisblock/rak3401/quickstart Installs the adafruit-nrfutil package using pip3 for Linux systems. This is a prerequisite for updating the RAK4631 bootloader. ```bash sudo pip3 install adafruit-nrfutil or pip3 install --user adafruit-nrfutil ``` -------------------------------- ### Flash Bootloader using pyocd Source: https://docs.rakwireless.com/product-categories/wisduo/bastwan/quickstart This command flashes the bootloader onto the RAK3244 BastWAN board using the pyocd tool. Ensure pyocd is installed and the correct bootloader file is specified. This process requires a Jlink debugger and proper wiring. ```shell pyocd flash -t atsaml21j18a bootloader-bast-wan-v3.4.0.bin ``` -------------------------------- ### Install Homebrew Package Manager on macOS Source: https://docs.rakwireless.com/product-categories/software-apis-and-libraries/rakpios/quickstart This command installs the Homebrew package manager on macOS, which is a prerequisite for installing other development tools and libraries. It downloads and executes a script from the official Homebrew GitHub repository. ```shell /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### Configure Application EUI (AT Command) Source: https://docs.rakwireless.com/product-categories/wisnode/rak7200/quickstart Sets the Application EUI for the RAK7200 device. Replace 'XXXX' with your actual Application EUI obtained from the network console. ```text at+set_config=lora:app_eui:XXXX ``` -------------------------------- ### Example: Erase NRF52840 Chip Flash Source: https://docs.rakwireless.com/product-categories/accessories/rakdap1/quickstart This is an example of how to erase the flash memory of an NRF52840 chip using pyOCD, commonly associated with RAK4630 modules. ```bash pyocd erase -t nrf52840 --chip ``` -------------------------------- ### Compile and Upload RAK4631-R Example in Visual Studio Source: https://docs.rakwireless.com/product-categories/wisblock/rak4631-r/quickstart This snippet details the process of compiling and uploading an example project to the RAK4631-R board using Visual Studio. It involves selecting the correct solution configuration, platform, and serial port before initiating the build and upload process. Ensure the RAK4631-R is in BOOT mode for successful flashing. ```text Solution Configuration field: **Release** Solution Platforms field: **x86** Serial Portfield: Choose the RAK4631-R COM port detected in the **Windows Device Manager**. ``` -------------------------------- ### Install Python 3 (Linux) Source: https://docs.rakwireless.com/product-categories/accessories/rakdap1/quickstart This command installs Python 3 on a Linux system using the apt package manager, commonly found on Debian-based distributions. ```bash sudo apt-get install python3 ``` -------------------------------- ### Install RAK Gateway Software Without ChirpStack (Linux/Raspberry Pi) Source: https://docs.rakwireless.com/product-categories/wisgate/rak7271-rak7371/quickstart This command installs the RAK gateway software but specifically excludes the installation of ChirpStack, an open-source LoRaWAN Network Server. This is useful if a different network server solution is preferred or already installed. ```bash sudo ./install.sh --chirpstack=not_install ``` -------------------------------- ### Clone and Compile SX1302 HAL Software (Git) Source: https://docs.rakwireless.com/product-categories/wisgate/rak7271-rak7371/quickstart Clones the sx1302_hal software repository from GitHub using git clone and then compiles the software using the 'make' command after navigating into the directory. ```bash sudo git clone https://github.com/Lora-net/sx1302_hal.git cd sx1302_hal sudo make ``` -------------------------------- ### Install Homebrew and Python (macOS) Source: https://docs.rakwireless.com/product-categories/accessories/rakdap1/quickstart These commands are used to install Homebrew, a package manager for macOS, and then install Python 3. It also includes instructions for setting the PATH environment variable, which might differ for Apple M chips. ```bash ruby -e $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh) export PATH="/usr/local/opt/python/libexec/bin:$PATH" # For Apple M chips: # export PATH="/opt/homebrew/opt/python/libexec/bin:$PATH" # or # export PATH="/opt/homebrew/opt/python@3/libexec/bin:$PATH" brew install python python --version brew install libusb ``` -------------------------------- ### Enable OpenVPN Service on Startup Source: https://docs.rakwireless.com/product-categories/software-apis-and-libraries/wisgateos/openvpn-configuration Configures the system to automatically start the OpenVPN service when the instance boots up. ```bash sudo systemctl enable openvpn ``` -------------------------------- ### Download and Extract SX1302 HAL Software Source: https://docs.rakwireless.com/product-categories/wisgate/rak7271-rak7371/quickstart Downloads the V2.0.1 version of the sx1302_hal software archive from the Semtech repository using wget and then extracts the contents using the tar command. ```bash wget https://github.com/Lora-net/sx1302_hal/archive/V2.0.1.tar.gz tar -zxvf V2.0.1.tar.gz ```