Giter VIP home page Giter VIP logo

rak_common_for_gateway's Introduction

rak_common_for_gateway

Introduction

The aim of this project is to help users to use the RAK Raspberry Pi Developer Gateway more easily. The User Guide can be get from our Web(https://docs.rakwireless.com/Introduction/).

Supported platforms

This project currently provides support for the below platforms.

  • RAK831(Choose RAK2245)
  • RAK2245
  • RAK7243/RAK7244 no LTE
  • RAK7243/RAK7244 with LTE
  • RAK833(USB)(Choose RAK2247 USB)
  • RAK2247(USB)
  • RAK833(SPI)(Choose RAK2247 SPI)
  • RAK2247(SPI)
  • RAK2246
  • RAK7248 no LTE (RAK2287 + raspberry pi)
  • RAK7248 with LTE (RAK2287 + LTE + raspberry pi)
  • RAK2287(USB)
  • RAK7271(Choose RAK2287 USB)
  • RAK5146(USB)
  • RAK7371(Choose RAK5146 USB)
  • RAK5146(SPI)
  • RAK5146(SPI) with LTE

Installation procedure

step1 : Download and install latest Raspberry Pi OS Lite

step2 : Use "sudo raspi-config" command, enable spi and i2c interface, disable login shell over serial and enable serial port hardware.

step3 : Clone the installer and start the installation (More installation options can be found in "sudo ./install.sh --help").

  $ sudo apt update; sudo apt install git -y
  $ git clone https://github.com/RAKWireless/rak_common_for_gateway.git ~/rak_common_for_gateway
  $ cd ~/rak_common_for_gateway
  $ sudo ./install.sh

step4 : Next you will see some messages as follow. Please select the corresponding hardware model.

  Please select your gateway model:
  *	 1.RAK2245
  *	 2.RAK7243/RAK7244 no LTE
  *	 3.RAK7243/RAK7244 with LTE
  *	 4.RAK2247(USB)
  *	 5.RAK2247(SPI)
  *	 6.RAK2246
  *	 7.RAK7248 no LTE (RAK2287 SPI + raspberry pi)
  *	 8.RAK7248 with LTE (RAK2287 SPI + LTE + raspberry pi)
  *	 9.RAK2287 USB
  *	 10.RAK5146 USB
  *	 11.RAK5146 SPI
  *	 12.RAK5146 SPI with LTE
  Please enter 1-12 to select the model:

step5 : Wait a moment and the installation is complete.

step6 : reboot your gateway.

step7 : Now you can use "sudo gateway-config" to configure your gateway.

Docker

If you want to build or use docker image, you can access https://github.com/RAKWireless/udp-packet-forwarder repository.

rak_common_for_gateway's People

Contributors

bluetailcat avatar fomi-rak avatar nmaas87 avatar rakzhuqi avatar scobber avatar sheng2216 avatar taylorisagoodboy avatar tvelev avatar vulet avatar xoseperez avatar zhuqi77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rak_common_for_gateway's Issues

Is there a way to set the gateway in station mode, and add alternative options?

I'm trying to implement a standlong gateway which also has a RAK2287 onboard. I have set the gateway to disable the AP and operate in station mode.
I now want to do a few things:

  1. Use an USB wifi dongle as an AP to enable local connections to the device for configuration purposes
  2. Use the ethernet port to connect an IP camera, with the endpoint being the RPi

To do this I imagine I need to set the Pi up as a DHCP server on both interfaces, but trying to do so seems to make the system very unstable and it no longer connects as a station.

I used this guide (https://maker.pro/raspberry-pi/projects/how-to-make-a-raspberry-pi-3-hotspot-and-build-a-stand-alone-network) to help me configure it as a WiFi AP substituting the on-board wifi interface (wlan0) with the external one (wlan1).

Is there something else I need to do to make this work?

Install script not working for TTN

When running the main install script sudo ./install.sh and selecting RAK2245, the installer seems to proceed with a complete setup for Chirpstack and skips any TTN configurations. Running sudo gateway-config and selecting Server is TTN still does not add anything to /opt/ttn-gateway/. ttn-gateway.service is also missing once the install is finished.

spam to syslog

master branch
raspberrypi 4
rak2287(spi + gps)

Fill the /var/log/syslog:
Oct 28 23:55:55 raspberrypi ttn-gateway[2277]: WARNING: [gps] read() returned value 0
Oct 28 23:55:55 raspberrypi ttn-gateway[2277]: WARNING: [gps] read() returned value 0
Oct 28 23:55:55 raspberrypi ttn-gateway[2277]: WARNING: [gps] read() returned value 0
Oct 28 23:55:55 raspberrypi ttn-gateway[2277]: WARNING: [gps] read() returned value 0

~100MB per minute

Raspberry RAK2245´96 board

Hi,
i ve bougt a wrong version of RAK2245.
I would like to us with raspi zero w. I used this repo for raspi setup and the device is wired as descriped from the User manual RAK2245 96 board with the standart pinouts of raspi zero. But it´s not running.
Have you any idea? is the standart pinmap changed?

What i´ve done.

./test_loragw_reg

  • Beginning of test for loragw_reg.c

ERROR: CONCENTRATOR UNCONNECTED
IMPLICIT_PAYLOAD_LENGHT = 0 (should be 197)
FRAME_SYNCH_PEAK2_POS = 0 (should be 11)
PREAMBLE_SYMB1_NB = 0 (should be 49253)
ADJUST_MODEM_START_OFFSET_SF12_RDX4 = 0 (should be 3173)
IF_FREQ_1 = 0 (should be -1947)
End of test for loragw_reg.c

pi@rak-gateway:/opt/ttn-gateway/lora_gateway $ sudo ./reset_lgw.sh stop
Accessing concentrator reset pin through GPIO7...
pi@rak-gateway:/opt/ttn-gateway/lora_gateway $ sudo ./reset_lgw.sh start
Accessing concentrator reset pin through GPIO7...

Thanks for help
Regadrs,
Patrik

RAK2246 tx gain table configuration

I'm adding support for the RAK2246 module to the https://github.com/brocaar/chirpstack-concentratord project (chirpstack/chirpstack-concentratord#5).

I noticed that the configuration for the EU868 and US915 band have 8 entries in the tx gain table, the other bands have 16 entries in the tx gain table. The 8 entries are the same for the EU868 and US915 band and also the 16 entries for the other bands are the same.

Is this correct?

This might be related to #12 which is about the RAK2245.

RAK2287 USB?

Could RAK2287 support the mPCIe to USB Board or is there something on the hardware level that would stop that?

Installation issue RAK5146(USB) with TTN

After having the RAK5146(USB) / RAK5146-226 installed in TTN mode and added it to TTN, no data ever arrives.
I needed to manually change the "server_address": "router.us.thethings.network" to eu1.cloud.thethings.network - otherwise it never comes online. Do I need to change anything else?

systemd-timesyncd.service not working

Trying to install rak common, but fails with a Failed to set ntp: NTP not supported

Tried reinstalling systemd-timesyncd, but the install process for rak common. After reinstalling timesyncd, but before rak common

● systemd-timesyncd.service - Network Time Synchronization
     Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-12-25 01:44:16 UTC; 28s ago
       Docs: man:systemd-timesyncd.service(8)
   Main PID: 20659 (systemd-timesyn)
     Status: "Initial synchronization to time server 172.104.13.118:123 (0.debian.pool.ntp.org)."
      Tasks: 2 (limit: 4915)
        CPU: 113ms
     CGroup: /system.slice/systemd-timesyncd.service
             └─20659 /lib/systemd/systemd-timesyncd

Dec 25 01:44:16 rak-gateway systemd[1]: Starting Network Time Synchronization...
Dec 25 01:44:16 rak-gateway systemd[1]: Started Network Time Synchronization.
Dec 25 01:44:16 rak-gateway systemd-timesyncd[20659]: Initial synchronization to time server 172.104.13.118:123 (0.debian>

If I check after installing rak common, it returns

systemctl status systemd-timesyncd.service

● systemd-timesyncd.service
     Loaded: masked (Reason: Unit systemd-timesyncd.service is masked.)
     Active: inactive (dead) since Sat 2021-12-25 01:46:23 UTC; 32s ago
   Main PID: 20659 (code=exited, status=0/SUCCESS)
     Status: "Idle."
        CPU: 117ms

Dec 25 01:44:16 rak-gateway systemd[1]: Starting Network Time Synchronization...
Dec 25 01:44:16 rak-gateway systemd[1]: Started Network Time Synchronization.
Dec 25 01:44:16 rak-gateway systemd-timesyncd[20659]: Initial synchronization to time server 172.104.13.118:123 (0.debian>
Dec 25 01:46:23 rak-gateway systemd[1]: Stopping Network Time Synchronization...
Dec 25 01:46:23 rak-gateway systemd[1]: systemd-timesyncd.service: Succeeded.
Dec 25 01:46:23 rak-gateway systemd[1]: Stopped Network Time Synchronization.

RAK2247 SPI failed to start concentrator

Hi! After few hours of thinking what's wrong, I've noticed that RESET PIN is still in high state. In /var/log/syslog there is an error:

ERROR: Failed to load fw 1
ERROR: Version of calibration firmware not expected, actual:0 expected:2
ERROR: failed to start the concentrator

I have to comment line:

echo "$SX1301_RESET_BCM_PIN" > /sys/class/gpio/unexport
in

/opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/start.sh

After that, reset stay low after one high state and module start to works fine.

RAK833 - USB - failed to start the concentrator

Unfortunately, it's not working for me

I have a USB adapter for the RAK833 which is directly connected to the Raspberry. I always get the following error message:
failed to start the concentrator

I have already tested it with a Raspberry Pi 3 and 4.
As well as with the distribution buster and stretch

Mar 27 22:50:49 rak-gateway systemd[1]: ttn-gateway.service: Service RestartSec=5s expired, scheduling restart.
Mar 27 22:50:49 rak-gateway systemd[1]: ttn-gateway.service: Scheduled restart job, restart counter is at 6.
Mar 27 22:50:49 rak-gateway systemd[1]: Stopped The Things Network Gateway.
Mar 27 22:50:49 rak-gateway systemd[1]: Started The Things Network Gateway.
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: *** Beacon Packet Forwarder for Lora Gateway ***
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: Version: 4.0.1
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: *** Lora concentrator HAL library version info ***
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: Version: 5.0.1;
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: ***
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Little endian host
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: found global configuration file global_conf.json, parsing it
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: lorawan_public 1, clksrc 1
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: no configuration for LBT
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: antenna_gain 0 dBi
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Configuring TX LUT with 16 indexes
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: radio 0 enabled (type SX1257), center frequency 867500000, RSSI offset -166.000000, tx enabled 1, tx_notch_freq 0
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: radio 1 enabled (type SX1257), center frequency 868500000, RSSI offset -166.000000, tx enabled 0, tx_notch_freq 0
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Lora multi-SF channel 0>  radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Lora multi-SF channel 1>  radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Lora multi-SF channel 2>  radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Lora multi-SF channel 3>  radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Lora multi-SF channel 4>  radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Lora multi-SF channel 5>  radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Lora multi-SF channel 6>  radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Lora multi-SF channel 7>  radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: gateway MAC address is configured to 0000000000000000
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: server hostname or IP address is configured to "router.eu.thethings.network"
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: upstream port is configured to "1700"
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: downstream port is configured to "1700"
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: downstream keep-alive interval is configured to 10 seconds
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: statistics display interval is configured to 30 seconds
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: upstream PUSH_DATA time-out is configured to 100 ms
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: packets received with a valid CRC will be forwarded
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: packets received with a CRC error will NOT be forwarded
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: packets received with no CRC will NOT be forwarded
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: Auto-quit after 20 non-acknowledged PULL_DATA
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: found local configuration file local_conf.json, parsing it
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: redefined parameters will overwrite global parameters
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: local_conf.json does not contain a JSON object named SX1301_conf
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: gateway MAC address is configured to XXXXXXXXXXX
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: packets received with a valid CRC will be forwarded
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: packets received with a CRC error will NOT be forwarded
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: INFO: packets received with no CRC will NOT be forwarded
Mar 27 22:50:50 rak-gateway ttn-gateway[792]: ERROR: [main] failed to start the concentrator
Mar 27 22:50:50 rak-gateway systemd[1]: ttn-gateway.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 22:50:50 rak-gateway systemd[1]: ttn-gateway.service: Failed with result 'exit-code'.

Chirpstack not installed on RPi CM4

During installation of the RAK 2245 on a Raspberry Pi Compute Model 4

  • Installation went smooth without error
  • However Chirpstack is not installed

After some investigation the cause was found

  • RPi CM4 is not "OKed" during installation
  • do_get_rpi_model() checks the rpi model (see ~/rak_common_for_gateway/rak/rak/shell_script/rak_common.sh)
  • Added the following line in do_get_rpi_model() to allow ChirpStack to be installed on the RPi CM4 as well
    # Added for support of the "Raspberry Pi Compute Module 4 Rev 1.0" (DeBuffel)
    if [ $model -eq 255 ]; then
        text=`tr -d '\0' </proc/device-tree/model | grep -a 'Pi Compute Module 4'`
        if [ ! -z "$text" ]; then
            model=4
        fi
    fi

ChirpStack and RAK gateway work fine after the above changes (CM4 with RAK2245 hat)
See also https://forum.rakwireless.com/t/installation-rak2245-chirpstack-not-installed/4432

packet_forwarder version number not updated

At least for RAK2245, the packet_forwarder version number is stuck at 4.0.1 and doesn't update when the baseline code is updated. Should be 4.2.3R, according to the JSON file, but the file
./lora/packet_forwarder/VERSION seems to be the value used to set VERSION in the Makefile, and its value is incorrect. Looks like that file is in one of the packages downloaded with "apt". You might consider modifying the Makefile so that the version number is set from the JSON file rather than the file named "VERSION", so there would only one place to edit to change the version number when the baseline code is update.

How to enble the Node-Red for RAK7243 gateway

Hi,

I am using RAK7243 with LTE and RAK2245 and use the firmware(RAK7243_Latest_Firmware) from RAK website.
I would like to enable the Node-Red for Chirpstack. So can you please guide me how to enable the Node-Red?

Thanks,
Ar-Myn

/opt/ttn-gateway/packet_forwarder compile failure: missing directory

It appears that the install process was modified so that the source code copied into /opt/ttn-gateway during the install process does not include /opt/ttn-gateway/lora_gateway. As a result, attempts to "cd /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd; make clean; make" fail because the files needed in /opt/ttn-gateway/lora_gateway aren't there. It looks like the "cp" that should be there in the "install.sh" file has been misplaced and is avoided, as the "else" clause of an "if".

This can be fixed manually once you know where to look, but it would be very helpful if the install.sh script were modified to copy BOTH the packet_forwarder and lora_gateway directories to /opt/ttn-gateway during the install process.

Is lora_pkt_fwd.c really able to settimeofday?

Line 2705 in lora_pkt_fwd.c generates the following compiler warning (my line #'s differ) on Raspberry Pi Buster running a RAK2245 PiHat.

src/lora_pkt_fwd.c: In function ‘modify_os_time’:
src/lora_pkt_fwd.c:2773:15: warning: implicit declaration of function ‘settimeofday’; did you mean ‘gettimeofday’? [-Wimplicit-function-declaration]
     int ret = settimeofday(&tv, NULL);
               ^~~~~~~~~~~~
               gettimeofday

The settimeofday() procedure does seem to be defined in <sys/time.h> in the same way as gettimeofday() is, so I don't know why there's a warning. But the implication is that the program really won't set the system time of day from GPS. (I can't test as my GPS isn't working.)

makefile for packetforwarder

i am trying to makefile for packet forwarder but error is coming "config.h " not found.
any help will be appreciated

Please replace the default lora_pkt_fwd

Several people are facing problems with the default lora_pkt_fwd packet forwarder when using the gateway with OTAA end nodes and chirpstack.
The problem consists in a JoinRequest and JoinAccept loop where the packet forwarder doesn't send the JoinAccept ACK message back to the end nodes.
This problem was solved by replacing the defaut packet forwarder for mp_pkt_fwd, provided by Jac Kersing (https://github.com/kersing/packet_forwarder).

This solution was validated by more people in chirpstack forum.
I validated it using the latest available RAK 7246G firmware, in October 24, 2020.

domain_name_server for eth0 in /etc/dhcpcd.conf is not setting

After configuring LAN IP address domain_name_server is not set in /etc/dhcpcd.conf. As a default google DNS can set or asked for user DNS ?
Example;

WARNING:Do not delete or modify the following 5 lines!!!

RAK_eth0_IP

interface eth0
static ip_address=192.168.1.10
static routers=192.168.1.1
static domain_name_servers=8.8.8.8 8.8.4.4

Boot failure after rak_common_for_gateway install: hangs with mmc1: new high speed ...

I'm trying to set up a LoRa gateway on a previously-installed RPi-3B+ Buster system. I just received a new RAK2245.

I2C and SPI enabled.

I installed the gateway software on a RPi-3B+ running Buster; updated/upgrades OS software before gateway install. I followed the gateway install instructions (./install.sh), and the installation seemed to have completed successfully; I identified the hardware as RAK2245. Reset the hostname to my device's hostname using raspi-config and rebooted. (first reboot after installing 2245 hardware)

Boot now hangs. The startup log screen flows normally for a couple of seconds, then the system hangs with:
"mmc1: new high speed SDIO card at address 0001"
This was preceded a few lines earlier with a message
"mmc1: queuing unknown CIS tuple 0x80 (2 bytes)"
followed by the same message with 3, 3, and 7 bytes.

Powered off and removed the 2245 hardware, thinking that might be the problem. NOPE! With the hardware removed, the system still hangs at the same place with the same messages!

So, this appears to be a software issue, not a hardware issue. Anyone else see this? Any idea of a parameter I can change in gateway config files to let me boot up again, with or without the 2245 installed?

Install fails due to missing packages

The current chirpstack/install.sh references non-existing versions of the .deb packages.

The following locations are currently valid (version numbers must be changed in two places in the script, sigh).

wget https://artifacts.chirpstack.io/packages/3.x/deb/pool/main/c/chirpstack-application-server/chirpstack-application-server_3.7.0_linux_armv7.deb
wget https://artifacts.chirpstack.io/packages/3.x/deb/pool/main/c/chirpstack-gateway-bridge/chirpstack-gateway-bridge_3.6.0_linux_armv7.deb
wget https://artifacts.chirpstack.io/packages/3.x/deb/pool/main/c/chirpstack-network-server/chirpstack-network-server_3.6.0_linux_armv7.deb

Instead of hard coded versions, the installer should reference latest, which should be a redirect to latest version on the site.

global_conf.json: No such file or directory

I'm getting this error message: can't read /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/global_conf.json: No such file or directory

when I run sudo gateway-config” => Setup RAK Gateway LoRa concentrator for a Chirpstack server. I was running this last week without any problem so I expect the update yesterday introduced an error.

Fix lora_pkt_fwd.c strncpy bounds compiler warning message

This may seem trivial, but compiler warnings concern me, since they're flagging potential problems that could arise when the code is executing. The "strncpy" warning messages in lora_pkt_fwd.c, for example, alert you that the strncpy could end up with a string that is not null-terminated, and in execution the error would be hard to trace down.

The following patch just reduces the max number of characters to be copied by 1, leaving room for the null termination, and eliminating the compiler warning:

/opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/src# diff -u /home/hdtodd/Installs/rak_common_for_gateway-4.2.3/lora/rak2245/lora_pkt_fwd.c lora_pkt_fwd.c

--- /home/hdtodd/Installs/rak_common_for_gateway-4.2.3/lora/rak2245/lora_pkt_fwd.c 2020-08-05 15:51:03.954335595 -0400
+++ lora_pkt_fwd.c 2020-08-23 10:34:17.645247812 -0400
@@ -693,7 +693,7 @@
/* server hostname or IP address (optional) */
str = json_object_get_string(conf_obj, "server_address");
if (str != NULL) {
- strncpy(serv_addr, str, sizeof serv_addr);
+ strncpy(serv_addr, str, (sizeof serv_addr)-1);
MSG("INFO: server hostname or IP address is configured to "%s"\n", serv_addr);
}

@@ -750,7 +750,7 @@
/* GPS module TTY path (optional) */
str = json_object_get_string(conf_obj, "gps_tty_path");
if (str != NULL) {
- strncpy(gps_tty_path, str, sizeof gps_tty_path);
+ strncpy(gps_tty_path, str, (sizeof gps_tty_path)-1);
MSG("INFO: GPS serial port path is configured to "%s"\n", gps_tty_path);
}
lora_pkt_fwd-patch.txt

Where to see sensor data sent from node

Hi,
My sensor node has joined in the LoRa RAK2243 gateway.
At the web-based platform, I go to Application->AppB (I created this)->Devices->ContLashSens3 (I created this).

Then I go to DEVICE DATA tab and LORAWAN FRAMES tab. I can see that there are update (as attached). My sensor node sends data to the gateway every 10s.

Screenshot from 2021-08-26 12-55-40
Screenshot from 2021-08-26 12-57-01

But where can I see the data sent by my node?

Hope to hear from you soon.

Regards,

Balena OS ?

Has anyone been able to run it with Balena OS ?

how to retransmit data in LoRa with the "RAK2245 Pi HAT" of the RAK7244C ?

Hello, I have a university project with the rak7244c, on which I have to pass the "RAK2245 Pi HAT" as a device.
The Rak is not connected to the internet and I have to retransmit the data to another gateway.
The problem is that I receive the data in LoRa and I have to retransmit it in LoRa too.
Unfortunately I have never worked on LoRa and I have no idea how to make the "RAK2245 Pi HAT" retransmit in LoRa.

Is it possible? If yes, do you have any information on how to do it?

STAT packet is dropped by TheThingsNetwork

there is an issue with the way the stat packet is built. the "temp" parameter is not part of the protocol specification and the connection is ignored on transmit

dca6ffffffffffff >< 172.20.1.248    UNCLASS   168 :: {"stat":{"time":"2020-06-23 03:19:40 UTC","lati":-10.05907,"long":10.89303,"alti":5,"rxnb":0,"rxok":0,"rxfw":0,"ackr":0.0,"dwnb":0,"txnb":0,"temp":30.0}} ::
Socket Timeout timed out

when the temp param of this data structure is filtered. then the stat packet is accepted.

this applies to
Raspberry Pi 4 Model B Rev 1.2, OS "10 (buster)", 4.19.97-v7l+.
RAKWireless gateway RAK2287 version 4.2.1R install from firmware.

Rpi not connecting through Eth0

Hello,

I have tested two different raspberry pi boards with this code, and both were unable to connect to the internet via Ethernet. in sysconf/set_ip.sh static ip addresses are set. By removing the static ip i am able to connect. What is the reason for the static ip addresses?

Install doesn't work for RAK7248/RAK2287

Hi, I'm trying to get a RAK2287 plugged into the pi hat working.
As there is no option for a plain RAK2287 I choose the RAK7248 no LTE option.
Install completed OK but the concentrator fails to start.
I suspect the install script has an bug as it appears to install the SX1301 packet forwarder from the RAK7243 repository rather than the SX1302 packet forwarder.

Any suggestions?

thanks

GPS does not work on RAK831 Pilot Gateway

When using the LoraServer OS, the GPS works from the LoraServer website, the GPS works. However, I installed the rak_common_for_gateway and did not make modifications. The GPS does not work with this installation on the RAK831 Pilot Gateway.

RAK 2287 USB (current repo on RPi4B) - MCU version mismatch (expected: 00.02.06, got:V01.00.00) and a following ACK type error + read REQ_MULTIPLE_SPI ack

I've got the RAK 2287 USB module here which is plugged into a Raspberry Pi 4B (4 MB RAM) on the latest Raspberry Pi OS.
I've tested the standard ARMHF as well as the ARM64 release (fresh installs).

So far I've not been able to make it work with the latest (current) github code available, while following the "Installation procedure" steps to the letter.

After writing the SDCard I enabled SPI, etc. as described in Step 2 of the "Installation procedure" for the "rak_common_for_gateway" repository.
Then I cloned the repo and ran the install.sh ("sudo ./install.sh --chirpstack=not_install" -- without the chirpstack backend as I have this running for month).

I've selected the gateway model as "9" ("9.RAK2287 USB") for "RAK2287 USB". Everything seems to be ok (compile,...) except for the errors thrown by the "ttn-gateway" when it is actually started.
The RAK2287 USB I have here has no GPS (at least there is no u.FL connector on the board to connect a GPS antenna).

Here is the rest of the log right before the first WARNING and the following ERROR lines (the full log can be found below):

[...]
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Connect to MCU
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: WARNING: MCU version mismatch (expected:00.02.06, got:V01.00.00)
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Concentrator MCU version is V01.00.00
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: MCU status: sys_time:1887454 temperature:-0.0oC
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: ERROR: received wrong ACK type (0xFF)
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: ERROR: failed to read REQ_MULTIPLE_SPI ack
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: ERROR: [main] failed to start the concentrator
Jan 12 18:31:48 rak-gateway systemd[1]: ttn-gateway.service: Main process exited, code=exited, status=1/FAILURE
Jan 12 18:31:48 rak-gateway systemd[1]: ttn-gateway.service: Failed with result 'exit-code'.
[...]

Please help. What could be the issue?
Is there another configuation parameter I should know and change which is currently not handled by the script where I have selected the correct device (RAK2287 USB)?

Here is everything I can provide ...starting with the basic USB details...

"sudb lsusb" output (looks perfect to me: 0483:5740 STMicroelectronics Virtual COM Port):

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 05af:0906 Jing-Mold Enterprise Co., Ltd 2.4G Dongle
Bus 001 Device 003: ID 0483:5740 STMicroelectronics Virtual COM Port
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

"sudo dmesg | grep -i tty" output:

[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708_fb.fbswap=1 smsc95xx.macaddr=E4:5F:01:76:70:69 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=tty1 root=PARTUUID=f514dbcb-02 rootfstype=ext4 fsck.repair=yes rootwait modules-load=dwc2,g_ether
[    0.001810] printk: console [tty1] enabled
[    1.586317] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2
[    3.302189] systemd[1]: Created slice system-getty.slice.
[    5.918326] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device

In the following logs and config files I've removed a part of the gateway id which seems to be read from the device itself.

Here is the relevant /var/log/syslog section...

Jan 12 18:31:47 rak-gateway systemd[1]: Started The Things Network Gateway.
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: *** Packet Forwarder ***
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: Version: 2.0.1
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: *** SX1302 HAL library version info ***
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: Version: 2.0.1;
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: ***
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Little endian host
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: found configuration file global_conf.json, parsing it
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: global_conf.json does contain a JSON object named SX130x_conf, parsing SX1302 parameters
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: com_type USB, com_path /dev/ttyACM0, lorawan_public 1, clksrc 0, full_duplex 0
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: antenna_gain 0 dBi
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Configuring legacy timestamp
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: no configuration for SX1261
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Configuring Tx Gain LUT for rf_chain 0 with 16 indexes for sx1250
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: radio 0 enabled (type SX1250), center frequency 867500000, RSSI offset -215.399994, tx enabled 1, single input mode 0
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: radio 1 enabled (type SX1250), center frequency 868500000, RSSI offset -215.399994, tx enabled 0, single input mode 0
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Lora multi-SF channel 0>  radio 1, IF -400000 Hz, 125 kHz bw, SF 5 to 12
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Lora multi-SF channel 1>  radio 1, IF -200000 Hz, 125 kHz bw, SF 5 to 12
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Lora multi-SF channel 2>  radio 1, IF 0 Hz, 125 kHz bw, SF 5 to 12
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Lora multi-SF channel 3>  radio 0, IF -400000 Hz, 125 kHz bw, SF 5 to 12
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Lora multi-SF channel 4>  radio 0, IF -200000 Hz, 125 kHz bw, SF 5 to 12
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Lora multi-SF channel 5>  radio 0, IF 0 Hz, 125 kHz bw, SF 5 to 12
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Lora multi-SF channel 6>  radio 0, IF 200000 Hz, 125 kHz bw, SF 5 to 12
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Lora multi-SF channel 7>  radio 0, IF 400000 Hz, 125 kHz bw, SF 5 to 12
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7, Explicit header
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: gateway MAC address is configured to AA555A0000000000
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: server hostname or IP address is configured to "192.168.20.44"
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: upstream port is configured to "1700"
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: downstream port is configured to "1700"
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: downstream keep-alive interval is configured to 10 seconds
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: statistics display interval is configured to 30 seconds
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: upstream PUSH_DATA time-out is configured to 100 ms
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: packets received with a valid CRC will be forwarded
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: packets received with a CRC error will NOT be forwarded
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: packets received with no CRC will NOT be forwarded
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: GPS serial port path is configured to ""
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Reference latitude is configured to 0.000000 deg
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Reference longitude is configured to 0.000000 deg
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Reference altitude is configured to 0 meters
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Beaconing period is configured to 0 seconds
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Beaconing signal will be emitted at 869525000 Hz
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Beaconing channel number is set to 1
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Beaconing channel frequency step is set to 0Hz
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Beaconing datarate is set to SF9
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Beaconing modulation bandwidth is set to 125000Hz
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Beaconing TX power is set to 27dBm
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: global_conf.json does contain a JSON object named debug_conf, parsing debug parameters
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: got 2 debug reference payload
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: reference payload ID 0 is 0xCAFE1234
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: reference payload ID 1 is 0xCAFE2345
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: setting debug log file name to loragw_hal.log
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: found configuration file local_conf.json, parsing it
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: gateway MAC address is configured to E45F01FFFE[........]
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: packets received with a valid CRC will be forwarded
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: packets received with a CRC error will NOT be forwarded
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: packets received with no CRC will NOT be forwarded
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: Opening USB communication interface
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Configuring TTY
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Flushing TTY
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Setting TTY in blocking mode
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Connect to MCU
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: WARNING: MCU version mismatch (expected:00.02.06, got:V01.00.00)
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: Concentrator MCU version is V01.00.00
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: INFO: MCU status: sys_time:1887454 temperature:-0.0oC
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: ERROR: received wrong ACK type (0xFF)
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: ERROR: failed to read REQ_MULTIPLE_SPI ack
Jan 12 18:31:48 rak-gateway ttn-gateway[5532]: ERROR: [main] failed to start the concentrator
Jan 12 18:31:48 rak-gateway systemd[1]: ttn-gateway.service: Main process exited, code=exited, status=1/FAILURE
Jan 12 18:31:48 rak-gateway systemd[1]: ttn-gateway.service: Failed with result 'exit-code'.

Here is the /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/global_conf :
Due to the not existing GPS antenna connector I've set "gps_tty_path" to blank. With "/dev/ttyAMA0" the issue is the same.

{
    "SX130x_conf": {
        "com_type": "USB",
        "com_path": "/dev/ttyACM0",
        "lorawan_public": true,
        "clksrc": 0,
        "antenna_gain": 0, /* antenna gain, in dBi */
        "full_duplex": false,
        "fine_timestamp": {
            "enable": false,
            "mode": "all_sf" /* high_capacity or all_sf */
        },
        "radio_0": {
            "enable": true,
            "type": "SX1250",
            "freq": 867500000,
            "rssi_offset": -215.4,
            "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
            "tx_enable": true,
            "tx_freq_min": 863000000,
            "tx_freq_max": 870000000,
            "tx_gain_lut":[
                {"rf_power": 12, "pa_gain": 1, "pwr_idx": 4},
                {"rf_power": 13, "pa_gain": 1, "pwr_idx": 5},
                {"rf_power": 14, "pa_gain": 1, "pwr_idx": 6},
                {"rf_power": 15, "pa_gain": 1, "pwr_idx": 7},
                {"rf_power": 16, "pa_gain": 1, "pwr_idx": 8},
                {"rf_power": 17, "pa_gain": 1, "pwr_idx": 9},
                {"rf_power": 18, "pa_gain": 1, "pwr_idx": 10},
                {"rf_power": 19, "pa_gain": 1, "pwr_idx": 11},
                {"rf_power": 20, "pa_gain": 1, "pwr_idx": 12},
                {"rf_power": 21, "pa_gain": 1, "pwr_idx": 13},
                {"rf_power": 22, "pa_gain": 1, "pwr_idx": 14},
                {"rf_power": 23, "pa_gain": 1, "pwr_idx": 16},
                {"rf_power": 24, "pa_gain": 1, "pwr_idx": 17},
                {"rf_power": 25, "pa_gain": 1, "pwr_idx": 18},
                {"rf_power": 26, "pa_gain": 1, "pwr_idx": 19},
                {"rf_power": 27, "pa_gain": 1, "pwr_idx": 22}
            ]
        },
        "radio_1": {
            "enable": true,
            "type": "SX1250",
            "freq": 868500000,
            "rssi_offset": -215.4,
            "rssi_tcomp": {"coeff_a": 0, "coeff_b": 0, "coeff_c": 20.41, "coeff_d": 2162.56, "coeff_e": 0},
            "tx_enable": false
        },
        "chan_multiSF_All": {"spreading_factor_enable": [ 5, 6, 7, 8, 9, 10, 11, 12 ]},
        "chan_multiSF_0": {"enable": true, "radio": 1, "if": -400000},
        "chan_multiSF_1": {"enable": true, "radio": 1, "if": -200000},
        "chan_multiSF_2": {"enable": true, "radio": 1, "if":  0},
        "chan_multiSF_3": {"enable": true, "radio": 0, "if": -400000},
        "chan_multiSF_4": {"enable": true, "radio": 0, "if": -200000},
        "chan_multiSF_5": {"enable": true, "radio": 0, "if":  0},
        "chan_multiSF_6": {"enable": true, "radio": 0, "if":  200000},
        "chan_multiSF_7": {"enable": true, "radio": 0, "if":  400000},
        "chan_Lora_std":  {"enable": true, "radio": 1, "if": -200000, "bandwidth": 250000, "spread_factor": 7,
                           "implicit_hdr": false, "implicit_payload_length": 17, "implicit_crc_en": false, "implicit_coderate": 1},
        "chan_FSK":       {"enable": true, "radio": 1, "if":  300000, "bandwidth": 125000, "datarate": 50000}
    },

    "gateway_conf": {
        "gateway_ID": "AA555A0000000000",
        /* change with default server address/ports */
        "server_address": "192.168.20.44",
        "serv_port_up": 1700,
        "serv_port_down": 1700,
        /* adjust the following parameters for your network */
        "keepalive_interval": 10,
        "stat_interval": 30,
        "push_timeout_ms": 100,
        /* forward only valid packets */
        "forward_crc_valid": true,
        "forward_crc_error": false,
        "forward_crc_disabled": false,
        /* GPS configuration */
        /* "gps_tty_path": "/dev/ttyAMA0", */
        "gps_tty_path": "",
        /* GPS reference coordinates */
        "ref_latitude": 0.0,
        "ref_longitude": 0.0,
        "ref_altitude": 0,
        /* Beaconing parameters */
        "beacon_period": 0,     /* disable class B beacon, set to 128 enable beacon */
        "beacon_freq_hz": 869525000,
        "beacon_freq_nb": 1,
        "beacon_freq_step": 0,
        "beacon_datarate": 9,
        "beacon_bw_hz": 125000,
        "beacon_power": 27
    },

    "debug_conf": {
        "ref_payload":[
            {"id": "0xCAFE1234"},
            {"id": "0xCAFE2345"}
        ],
        "log_file": "loragw_hal.log"
    }
}

Here is the /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/local_conf.json to set the actual GW-ID :

{
        "gateway_conf": {
                "gateway_ID": "E45F01FFFE[........]"
        }
}

Problem using RAK2247

Hello everyone,

I'm currently trying to use the RAK2247 with he CM3+, running the Raspberry OS Lite but a few seconds/minutes(?) after the installation is completed i lose my SSH connection with it and cannot get in anymore unless I remove the rak2247. Also, the gateway_ID in the global_conf.json is still "0000000000000000" instead of that mixture of my ethernet mac.

My Configuration:

  • (CM3+)[https://www.raspberrypi.org/products/compute-module-3-plus/]
  • (Raspberry OS Lite)[https://www.raspberrypi.org/downloads/raspberry-pi-os/]
  • Connected through SSH
  • Network access using cable (eth0), the board has no WiFi.

Problem:
After I lost the connection, looks like the board is rebooting itself after it shutdown (by itself). This is the ping result:

$ ping 192.168.0.114
PING 192.168.0.114 (192.168.0.114): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
ping: sendto: No route to host
Request timeout for icmp_seq 4
ping: sendto: Host is down
[...]
Request timeout for icmp_seq 21
ping: sendto: Host is down
Request timeout for icmp_seq 22
ping: sendto: Host is down
Request timeout for icmp_seq 23
Request timeout for icmp_seq 24
Request timeout for icmp_seq 25
Request timeout for icmp_seq 26
Request timeout for icmp_seq 27
Request timeout for icmp_seq 28
ping: sendto: No route to host
Request timeout for icmp_seq 29
ping: sendto: Host is down
[...]

The only way I can connect back to it is by removing the RAK2247.

Thinking...
In my opinion, this might be related to this:

step5 : Wait a moment and the installation is complete.If your gateway uses a wired connection, please reconfigure the LAN's IP address using "sudo gateway-config" after the installation is complete.
But, what should I do?

Screen Shot 2020-10-06 at 15 57 56

Or it might be related to changes in the kernel? I noticed that the kernel name has rak-gateway in it and also the /boot/config.txt changed.

Steps to reproduce:

  1. Fresh install Raspberry OS Lite
  2. Connect the raspberry to the router using an Ethernet Cable
  3. Connect to it through SSH
  4. sudo apt-get update && sudo apt-get upgrade -y, then reboot
  5. Follow (Installation Procedure)[https://github.com/RAKWireless/rak_common_for_gateway#installation-procedure], selecting option 6.RAK2247(USB).
  6. After the installation is completed, after a while, i can't connect to it anymore unless I remove the rak2247.

Logs:
Before Installation:

$ uname -a
Linux raspberrypi 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux

After:

$ uname -a
Linux rak-gateway 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux
$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.114  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::c948:efaf:719:404f  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:80:f4:c5  txqueuelen 1000  (Ethernet)
        RX packets 4079  bytes 1784545 (1.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4261  bytes 3866857 (3.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2728  bytes 5129684 (4.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2728  bytes 5129684 (4.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
$ lsusb
Bus 001 Device 005: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC
[...]
$ sudo ./install.sh 
Please select your gateway model:
*       1.RAK831
*       2.RAK2245
*       3.RAK7243/RAK7244 no LTE
*       4.RAK7243/RAK7244 with LTE
*       5.RAK833(USB)
*       6.RAK2247(USB)
*       7.RAK833(SPI)
*       8.RAK2247(SPI)
*       9.RAK2246
*       10.RAK2287(SPI)
*       11.RAK2285
Please enter 1-11 to select the model:6
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
/home/pi/rak_common_for_gateway/rak /home/pi/rak_common_for_gateway
Removed /etc/systemd/system/multi-user.target.wants/hciuart.service.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version (1:2.20.1-2+deb10u3).
The following additional packages will be installed:
  libi2c0 libjq1 libonig5 libpcap0.8 lrzsz read-edid
Suggested packages:
  libi2c-dev python-smbus default-mta | postfix | mail-transport-agent sysvinit-core
The following NEW packages will be installed:
  dialog i2c-tools jq libi2c0 libjq1 libonig5 libpcap0.8 lrzsz minicom monit ppp read-edid
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,733 kB of archives.
After this operation, 5,604 kB of additional disk space will be used.
Get:1 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf dialog armhf 1.3-20190211-1 [250 kB]
Get:2 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf libi2c0 armhf 4.1-1 [9,348 B]
Get:3 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf i2c-tools armhf 4.1-1 [71.7 kB]
Get:4 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf libonig5 armhf 6.9.1-1 [150 kB]
Get:5 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf libjq1 armhf 1.5+dfsg-2+b1 [119 kB]
Get:6 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf jq armhf 1.5+dfsg-2+b1 [59.3 kB]
Get:7 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf libpcap0.8 armhf 1.8.1-6 [124 kB]
Get:8 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf lrzsz armhf 0.12.21-10 [79.8 kB]
Get:9 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf minicom armhf 2.7.1-1 [250 kB]
Get:10 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf monit armhf 1:5.25.2-3 [291 kB]
Get:11 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf ppp armhf 2.4.7-2+4.1+deb10u1 [312 kB]     
Get:12 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf read-edid armhf 3.0.2-1 [15.4 kB]          
Fetched 1,733 kB in 7s (259 kB/s)                                                                                       
Selecting previously unselected package dialog.
(Reading database ... 40845 files and directories currently installed.)
Preparing to unpack .../00-dialog_1.3-20190211-1_armhf.deb ...
Unpacking dialog (1.3-20190211-1) ...
Selecting previously unselected package libi2c0:armhf.
Preparing to unpack .../01-libi2c0_4.1-1_armhf.deb ...
Unpacking libi2c0:armhf (4.1-1) ...
Selecting previously unselected package i2c-tools.
Preparing to unpack .../02-i2c-tools_4.1-1_armhf.deb ...
Unpacking i2c-tools (4.1-1) ...
Selecting previously unselected package libonig5:armhf.
Preparing to unpack .../03-libonig5_6.9.1-1_armhf.deb ...
Unpacking libonig5:armhf (6.9.1-1) ...
Selecting previously unselected package libjq1:armhf.
Preparing to unpack .../04-libjq1_1.5+dfsg-2+b1_armhf.deb ...
Unpacking libjq1:armhf (1.5+dfsg-2+b1) ...
Selecting previously unselected package jq.
Preparing to unpack .../05-jq_1.5+dfsg-2+b1_armhf.deb ...
Unpacking jq (1.5+dfsg-2+b1) ...
Selecting previously unselected package libpcap0.8:armhf.
Preparing to unpack .../06-libpcap0.8_1.8.1-6_armhf.deb ...
Unpacking libpcap0.8:armhf (1.8.1-6) ...
Selecting previously unselected package lrzsz.
Preparing to unpack .../07-lrzsz_0.12.21-10_armhf.deb ...
Unpacking lrzsz (0.12.21-10) ...
Selecting previously unselected package minicom.
Preparing to unpack .../08-minicom_2.7.1-1_armhf.deb ...
Unpacking minicom (2.7.1-1) ...
Selecting previously unselected package monit.
Preparing to unpack .../09-monit_1%3a5.25.2-3_armhf.deb ...
Unpacking monit (1:5.25.2-3) ...
Selecting previously unselected package ppp.
Preparing to unpack .../10-ppp_2.4.7-2+4.1+deb10u1_armhf.deb ...
Unpacking ppp (2.4.7-2+4.1+deb10u1) ...
Selecting previously unselected package read-edid.
Preparing to unpack .../11-read-edid_3.0.2-1_armhf.deb ...
Unpacking read-edid (3.0.2-1) ...
Setting up monit (1:5.25.2-3) ...
Setting up libi2c0:armhf (4.1-1) ...
Setting up read-edid (3.0.2-1) ...
Setting up libpcap0.8:armhf (1.8.1-6) ...
Setting up dialog (1.3-20190211-1) ...
Setting up i2c-tools (4.1-1) ...
Setting up ppp (2.4.7-2+4.1+deb10u1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/pppd-dns.service → /lib/systemd/system/pppd-dns.service.
Setting up minicom (2.7.1-1) ...
Setting up lrzsz (0.12.21-10) ...
Setting up libonig5:armhf (6.9.1-1) ...
Setting up libjq1:armhf (1.5+dfsg-2+b1) ...
Setting up jq (1.5+dfsg-2+b1) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for systemd (241-7~deb10u4+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for mime-support (3.62) ...
Copy Rak file success!
/home/pi/rak_common_for_gateway
/home/pi/rak_common_for_gateway/ap /home/pi/rak_common_for_gateway
Reading package lists... Done
Building dependency tree       
Reading state information... Done
iproute2 is already the newest version (4.20.0-2).
iw is already the newest version (5.0.1-1).
iw set to manually installed.
procps is already the newest version (2:3.3.15-2).
util-linux is already the newest version (2.33.1-0.1).
The following additional packages will be installed:
  dns-root-data dnsmasq-base libhavege1
Suggested packages:
  apparmor
The following NEW packages will be installed:
  dns-root-data dnsmasq dnsmasq-base haveged hostapd libhavege1
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,106 kB of archives.
After this operation, 2,865 kB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian buster/main armhf dnsmasq-base armhf 2.80-1+rpt1 [400 kB]
Get:2 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf hostapd armhf 2:2.7+git20190128+0c1e29f-6+deb10u2 [629 kB]
Get:3 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf dns-root-data all 2019031302 [5,396 B]      
Get:5 http://archive.raspberrypi.org/debian buster/main armhf dnsmasq all 2.80-1+rpt1 [16.5 kB]                         
Get:4 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf libhavege1 armhf 1.9.1-7 [23.0 kB]    
Get:6 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf haveged armhf 1.9.1-7 [33.0 kB]
Fetched 1,106 kB in 2s (480 kB/s)  
Selecting previously unselected package hostapd.
(Reading database ... 41326 files and directories currently installed.)
Preparing to unpack .../0-hostapd_2%3a2.7+git20190128+0c1e29f-6+deb10u2_armhf.deb ...
Unpacking hostapd (2:2.7+git20190128+0c1e29f-6+deb10u2) ...
Selecting previously unselected package dns-root-data.
Preparing to unpack .../1-dns-root-data_2019031302_all.deb ...
Unpacking dns-root-data (2019031302) ...
Selecting previously unselected package dnsmasq-base.
Preparing to unpack .../2-dnsmasq-base_2.80-1+rpt1_armhf.deb ...
Unpacking dnsmasq-base (2.80-1+rpt1) ...
Selecting previously unselected package dnsmasq.
Preparing to unpack .../3-dnsmasq_2.80-1+rpt1_all.deb ...
Unpacking dnsmasq (2.80-1+rpt1) ...
Selecting previously unselected package libhavege1:armhf.
Preparing to unpack .../4-libhavege1_1.9.1-7_armhf.deb ...
Unpacking libhavege1:armhf (1.9.1-7) ...
Selecting previously unselected package haveged.
Preparing to unpack .../5-haveged_1.9.1-7_armhf.deb ...
Unpacking haveged (1.9.1-7) ...
Setting up dnsmasq-base (2.80-1+rpt1) ...
Setting up dns-root-data (2019031302) ...
Setting up dnsmasq (2.80-1+rpt1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → /lib/systemd/system/dnsmasq.service.
Setting up hostapd (2:2.7+git20190128+0c1e29f-6+deb10u2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/hostapd.service → /lib/systemd/system/hostapd.service.
Job for hostapd.service failed because the control process exited with error code.
See "systemctl status hostapd.service" and "journalctl -xe" for details.
Created symlink /etc/systemd/system/hostapd.service → /dev/null.
Setting up libhavege1:armhf (1.9.1-7) ...
Setting up haveged (1.9.1-7) ...
Created symlink /etc/systemd/system/default.target.wants/haveged.service → /lib/systemd/system/haveged.service.
Processing triggers for systemd (241-7~deb10u4+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for dbus (1.12.20-0+deb10u1) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Cloning into 'create_ap'...
remote: Enumerating objects: 1069, done.
remote: Total 1069 (delta 0), reused 0 (delta 0), pack-reused 1069
Receiving objects: 100% (1069/1069), 356.11 KiB | 231.00 KiB/s, done.
Resolving deltas: 100% (591/591), done.
/home/pi/rak_common_for_gateway/ap/create_ap /home/pi/rak_common_for_gateway/ap
install -Dm755 create_ap /usr/local/rak/ap/bin/create_ap
install -Dm644 create_ap.conf /etc/create_ap.conf
[ ! -d /lib/systemd/system ] || install -Dm644 create_ap.service /usr/local/rak/ap/lib/systemd/system/create_ap.service
install -Dm644 bash_completion /usr/local/rak/ap/share/bash-completion/completions/create_ap
install -Dm644 README.md /usr/local/rak/ap/share/doc/create_ap/README.md
/home/pi/rak_common_for_gateway/ap
Device "wlan0" does not exist.
Install ap success!
/home/pi/rak_common_for_gateway
/home/pi/rak_common_for_gateway/chirpstack /home/pi/rak_common_for_gateway
WARNING: ChirpStack is not support for this rpi model.
/home/pi/rak_common_for_gateway
/home/pi/rak_common_for_gateway/lte /home/pi/rak_common_for_gateway
/home/pi/rak_common_for_gateway
/home/pi/rak_common_for_gateway/lora /home/pi/rak_common_for_gateway
Cloning into 'lora_gateway'...
remote: Enumerating objects: 808, done.
remote: Total 808 (delta 0), reused 0 (delta 0), pack-reused 808
Receiving objects: 100% (808/808), 677.38 KiB | 941.00 KiB/s, done.
Resolving deltas: 100% (470/470), done.
Cloning into 'packet_forwarder'...
remote: Enumerating objects: 387, done.
remote: Total 387 (delta 0), reused 0 (delta 0), pack-reused 387
Receiving objects: 100% (387/387), 835.56 KiB | 1.18 MiB/s, done.
Resolving deltas: 100% (172/172), done.
/home/pi/rak_common_for_gateway/lora/rak2247_usb /home/pi/rak_common_for_gateway/lora
Gateway configuration:
Installing dependencies...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version (1:2.20.1-2+deb10u3).
The following NEW packages will be installed:
  libftdi-dev libftdi1 libusb-dev
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 225 kB of archives.
After this operation, 2,256 kB of additional disk space will be used.
Get:1 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf libftdi1 armhf 0.20-4 [17.0 kB]
Get:2 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf libusb-dev armhf 2:0.1.12-32 [35.7 kB]
Get:3 http://mirror.nbtelecom.com.br/raspberryPI/raspbian buster/main armhf libftdi-dev armhf 0.20-4 [172 kB]
Fetched 225 kB in 11s (20.2 kB/s)    
Selecting previously unselected package libftdi1:armhf.
(Reading database ... 41425 files and directories currently installed.)
Preparing to unpack .../libftdi1_0.20-4_armhf.deb ...
Unpacking libftdi1:armhf (0.20-4) ...
Selecting previously unselected package libusb-dev.
Preparing to unpack .../libusb-dev_2%3a0.1.12-32_armhf.deb ...
Unpacking libusb-dev (2:0.1.12-32) ...
Selecting previously unselected package libftdi-dev.
Preparing to unpack .../libftdi-dev_0.20-4_armhf.deb ...
Unpacking libftdi-dev (0.20-4) ...
Setting up libftdi1:armhf (0.20-4) ...
Setting up libusb-dev (2:0.1.12-32) ...
Setting up libftdi-dev (0.20-4) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Cloning into 'libmpsse'...
remote: Enumerating objects: 96, done.
remote: Total 96 (delta 0), reused 0 (delta 0), pack-reused 96
Unpacking objects: 100% (96/96), done.
/home/pi/rak_common_for_gateway/lora/rak2247_usb/libmpsse/src /home/pi/rak_common_for_gateway/lora/rak2247_usb
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking libftdi1/ftdi.h usability... no
checking libftdi1/ftdi.h presence... no
checking for libftdi1/ftdi.h... no
checking ftdi.h usability... yes
checking ftdi.h presence... yes
checking for ftdi.h... yes
checking for ftdi_init in -lftdi... yes
configure: creating ./config.status
config.status: creating Makefile
gcc -Wall -fPIC -fno-strict-aliasing -g -O2 -lftdi  -DLIBFTDI1=0 -c support.c
gcc -Wall -fPIC -fno-strict-aliasing -g -O2 -lftdi  -DLIBFTDI1=0 -c mpsse.c
gcc -Wall -fPIC -fno-strict-aliasing -g -O2 -lftdi  -c fast.c
gcc -Wall -fPIC -fno-strict-aliasing -g -O2 -shared -Wl,-soname,libmpsse.so mpsse.o fast.o support.o \
        -o libmpsse.so -lftdi 
ar rcs libmpsse.a mpsse.o fast.o support.o
install -D -m644 libmpsse.so //usr/local/lib/libmpsse.so
install -D -m644 libmpsse.a  //usr/local/lib/libmpsse.a
install -D -m644 mpsse.h     //usr/local/include/mpsse.h
/home/pi/rak_common_for_gateway/lora/rak2247_usb
/home/pi/rak_common_for_gateway/lora/rak2247_usb /home/pi/rak_common_for_gateway/lora/rak2247_usb
/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway /home/pi/rak_common_for_gateway/lora/rak2247_usb /home/pi/rak_common_for_gateway/lora/rak2247_usb
make all -e -C libloragw
make[1]: Entering directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/libloragw'
*** Checking libloragw library configuration ***
#File initialization
# Release version
Release version   : 5.0.1
SPI interface     : FTDI SPI-over-USB bridge using libmpsse/libftdi/libusb
# end of file
*** Configuration seems ok ***
mkdir -p obj
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_hal.c -o obj/loragw_hal.o
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_gps.c -o obj/loragw_gps.o
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_reg.c -o obj/loragw_reg.o
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_spi.ftdi.c -o obj/loragw_spi.o
src/loragw_spi.ftdi.c: In function ‘lgw_spi_w’:
src/loragw_spi.ftdi.c:112:40: warning: unused parameter ‘spi_mux_mode’ [-Wunused-parameter]
 int lgw_spi_w(void *spi_target,uint8_t spi_mux_mode, uint8_t spi_mux_target, uint8_t address, uint8_t data) {
                                ~~~~~~~~^~~~~~~~~~~~
src/loragw_spi.ftdi.c:112:62: warning: unused parameter ‘spi_mux_target’ [-Wunused-parameter]
 int lgw_spi_w(void *spi_target,uint8_t spi_mux_mode, uint8_t spi_mux_target, uint8_t address, uint8_t data) {
                                                      ~~~~~~~~^~~~~~~~~~~~~~
src/loragw_spi.ftdi.c: In function ‘lgw_spi_r’:
src/loragw_spi.ftdi.c:146:41: warning: unused parameter ‘spi_mux_mode’ [-Wunused-parameter]
 int lgw_spi_r(void *spi_target, uint8_t spi_mux_mode, uint8_t spi_mux_target,uint8_t address, uint8_t *data) {
                                 ~~~~~~~~^~~~~~~~~~~~
src/loragw_spi.ftdi.c:146:63: warning: unused parameter ‘spi_mux_target’ [-Wunused-parameter]
 int lgw_spi_r(void *spi_target, uint8_t spi_mux_mode, uint8_t spi_mux_target,uint8_t address, uint8_t *data) {
                                                       ~~~~~~~~^~~~~~~~~~~~~~
src/loragw_spi.ftdi.c: In function ‘lgw_spi_wb’:
src/loragw_spi.ftdi.c:188:42: warning: unused parameter ‘spi_mux_mode’ [-Wunused-parameter]
 int lgw_spi_wb(void *spi_target, uint8_t spi_mux_mode, uint8_t spi_mux_target,uint8_t address, uint8_t *data, uint16_t size) {
                                  ~~~~~~~~^~~~~~~~~~~~
src/loragw_spi.ftdi.c:188:64: warning: unused parameter ‘spi_mux_target’ [-Wunused-parameter]
 int lgw_spi_wb(void *spi_target, uint8_t spi_mux_mode, uint8_t spi_mux_target,uint8_t address, uint8_t *data, uint16_t size) {
                                                        ~~~~~~~~^~~~~~~~~~~~~~
src/loragw_spi.ftdi.c: In function ‘lgw_spi_rb’:
src/loragw_spi.ftdi.c:255:42: warning: unused parameter ‘spi_mux_mode’ [-Wunused-parameter]
 int lgw_spi_rb(void *spi_target, uint8_t spi_mux_mode, uint8_t spi_mux_target,uint8_t address, uint8_t *data, uint16_t size) {
                                  ~~~~~~~~^~~~~~~~~~~~
src/loragw_spi.ftdi.c:255:64: warning: unused parameter ‘spi_mux_target’ [-Wunused-parameter]
 int lgw_spi_rb(void *spi_target, uint8_t spi_mux_mode, uint8_t spi_mux_target,uint8_t address, uint8_t *data, uint16_t size) {
                                                        ~~~~~~~~^~~~~~~~~~~~~~
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_aux.c -o obj/loragw_aux.o
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_radio.c -o obj/loragw_radio.o
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_fpga.c -o obj/loragw_fpga.o
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/loragw_lbt.c -o obj/loragw_lbt.o
ar rcs libloragw.a obj/loragw_hal.o obj/loragw_gps.o obj/loragw_reg.o obj/loragw_spi.o obj/loragw_aux.o obj/loragw_radio.o obj/loragw_fpga.o obj/loragw_lbt.o
gcc -O2 -Wall -Wextra -std=c99 -Iinc -I. -L. tst/test_loragw_spi.c -o test_loragw_spi -lloragw -lrt -lmpsse -lm
gcc -O2 -Wall -Wextra -std=c99 -Iinc -I. -L. tst/test_loragw_reg.c -o test_loragw_reg -lloragw -lrt -lmpsse -lm
gcc -O2 -Wall -Wextra -std=c99 -Iinc -I. -L. tst/test_loragw_hal.c -o test_loragw_hal -lloragw -lrt -lmpsse -lm
gcc -O2 -Wall -Wextra -std=c99 -Iinc -I. -L. tst/test_loragw_gps.c -o test_loragw_gps -lloragw -lrt -lmpsse -lm
gcc -O2 -Wall -Wextra -std=c99 -Iinc -I. -L. tst/test_loragw_cal.c -o test_loragw_cal -lloragw -lrt -lmpsse -lm
make[1]: Leaving directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/libloragw'
make all -e -C util_pkt_logger
make[1]: Entering directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_pkt_logger'
mkdir -p obj
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../libloragw/inc src/util_pkt_logger.c -o obj/util_pkt_logger.o
src/util_pkt_logger.c: In function ‘main’:
src/util_pkt_logger.c:489:58: warning: ‘%02i’ directive writing between 2 and 11 bytes into a region of size between 0 and 16 [-Wformat-overflow=]
             sprintf(fetch_timestamp,"%04i-%02i-%02i %02i:%02i:%02i.%03liZ",(x->tm_year)+1900,(x->tm_mon)+1,x->tm_mday,x->tm_hour,x->tm_min,x->tm_sec,(fetch_time.tv_nsec)/1000000); /* ISO 8601 format */
                                                          ^~~~
src/util_pkt_logger.c:489:37: note: directive argument in the range [-2147, 2147]
             sprintf(fetch_timestamp,"%04i-%02i-%02i %02i:%02i:%02i.%03liZ",(x->tm_year)+1900,(x->tm_mon)+1,x->tm_mday,x->tm_hour,x->tm_min,x->tm_sec,(fetch_time.tv_nsec)/1000000); /* ISO 8601 format */
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/util_pkt_logger.c:489:13: note: ‘sprintf’ output between 25 and 79 bytes into a destination of size 30
             sprintf(fetch_timestamp,"%04i-%02i-%02i %02i:%02i:%02i.%03liZ",(x->tm_year)+1900,(x->tm_mon)+1,x->tm_mday,x->tm_hour,x->tm_min,x->tm_sec,(fetch_time.tv_nsec)/1000000); /* ISO 8601 format */
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/parson.c -o obj/parson.o
gcc -L../libloragw obj/util_pkt_logger.o obj/parson.o -o util_pkt_logger -lloragw -lrt -lm -lmpsse
make[1]: Leaving directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_pkt_logger'
make all -e -C util_spi_stress
make[1]: Entering directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_spi_stress'
mkdir -p obj
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../libloragw/inc src/util_spi_stress.c -o obj/util_spi_stress.o
gcc -L../libloragw obj/util_spi_stress.o -o util_spi_stress -lloragw -lrt -lm -lmpsse
make[1]: Leaving directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_spi_stress'
make all -e -C util_tx_test
make[1]: Entering directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_tx_test'
mkdir -p obj
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../libloragw/inc src/util_tx_test.c -o obj/util_tx_test.o
gcc -L../libloragw obj/util_tx_test.o -o util_tx_test -lloragw -lrt -lm -lmpsse
make[1]: Leaving directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_tx_test'
make all -e -C util_lbt_test
make[1]: Entering directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_lbt_test'
mkdir -p obj
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../libloragw/inc src/util_lbt_test.c -o obj/util_lbt_test.o
gcc -L../libloragw obj/util_lbt_test.o -o util_lbt_test -lloragw -lrt -lm -lmpsse
make[1]: Leaving directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_lbt_test'
make all -e -C util_tx_continuous
make[1]: Entering directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_tx_continuous'
mkdir -p obj
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../libloragw/inc src/util_tx_continuous.c -o obj/util_tx_continuous.o
gcc -L../libloragw obj/util_tx_continuous.o -o util_tx_continuous -lloragw -lrt -lm -lmpsse
make[1]: Leaving directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_tx_continuous'
make all -e -C util_spectral_scan
make[1]: Entering directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_spectral_scan'
mkdir -p obj
gcc -c -O2 -Wall -Wextra -std=c99 -I inc -I../libloragw/inc src/util_spectral_scan.c -o obj/util_spectral_scan.o
gcc -L../libloragw obj/util_spectral_scan.o -lloragw -lrt -lmpsse -o util_spectral_scan
make[1]: Leaving directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/lora_gateway/util_spectral_scan'
/home/pi/rak_common_for_gateway/lora/rak2247_usb /home/pi/rak_common_for_gateway/lora/rak2247_usb
/home/pi/rak_common_for_gateway/lora/rak2247_usb/packet_forwarder /home/pi/rak_common_for_gateway/lora/rak2247_usb /home/pi/rak_common_for_gateway/lora/rak2247_usb
make all -e -C lora_pkt_fwd
make[1]: Entering directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/packet_forwarder/lora_pkt_fwd'
mkdir -p obj
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. -D VERSION_STRING="\"`cat ../VERSION`\"" -I../../lora_gateway/libloragw/inc src/lora_pkt_fwd.c -o obj/lora_pkt_fwd.o
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../../lora_gateway/libloragw/inc src/parson.c -o obj/parson.o
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../../lora_gateway/libloragw/inc src/base64.c -o obj/base64.o
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../../lora_gateway/libloragw/inc src/jitqueue.c -o obj/jitqueue.o
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. -I../../lora_gateway/libloragw/inc src/timersync.c -o obj/timersync.o
gcc -L../../lora_gateway/libloragw obj/lora_pkt_fwd.o obj/parson.o obj/base64.o obj/jitqueue.o obj/timersync.o -o lora_pkt_fwd -lloragw -lrt -lpthread -lmpsse -lm
make[1]: Leaving directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/packet_forwarder/lora_pkt_fwd'
make all -e -C util_ack
make[1]: Entering directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/packet_forwarder/util_ack'
mkdir -p obj
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/util_ack.c -o obj/util_ack.o
gcc obj/util_ack.o -o util_ack
make[1]: Leaving directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/packet_forwarder/util_ack'
make all -e -C util_sink
make[1]: Entering directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/packet_forwarder/util_sink'
mkdir -p obj
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/util_sink.c -o obj/util_sink.o
gcc obj/util_sink.o -o util_sink
make[1]: Leaving directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/packet_forwarder/util_sink'
make all -e -C util_tx_test
make[1]: Entering directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/packet_forwarder/util_tx_test'
mkdir -p obj
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/util_tx_test.c -o obj/util_tx_test.o
src/util_tx_test.c: In function ‘main’:
src/util_tx_test.c:173:17: warning: ‘strncpy’ specified bound 8 equals destination size [-Wstringop-truncation]
                 strncpy(serv_port, optarg, sizeof serv_port);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -c -O2 -Wall -Wextra -std=c99 -Iinc -I. src/base64.c -o obj/base64.o
gcc obj/util_tx_test.o obj/base64.o -o util_tx_test
make[1]: Leaving directory '/home/pi/rak_common_for_gateway/lora/rak2247_usb/packet_forwarder/util_tx_test'
/home/pi/rak_common_for_gateway/lora/rak2247_usb /home/pi/rak_common_for_gateway/lora/rak2247_usb
/home/pi/rak_common_for_gateway/lora
Created symlink /etc/systemd/system/multi-user.target.wants/ttn-gateway.service → /lib/systemd/system/ttn-gateway.service.
/home/pi/rak_common_for_gateway
/home/pi/rak_common_for_gateway/sysconf /home/pi/rak_common_for_gateway
Updating hostname to 'rak-gateway'...

Copy sys_config file success!
/home/pi/rak_common_for_gateway
*********************************************************
*  The RAKwireless gateway is successfully installed!   *
*********************************************************

About this installation log, i think the relevant points are:

[...]
Device "wlan0" does not exist.
Install ap success!
[...]
WARNING: ChirpStack is not support for this rpi model.
[...]

Here is the image showing no gateway_ID.
Screen Shot 2020-10-06 at 15 56 46


Disclaimer: Sorry for the long post, i tried to give as much info as possible.

Discrepancy between LUT sources and obtained values.

Hi RAKWireless team:

I'm providing support for PiHat 2245 to work @ AS923 ISM band and I stumbled across some issues as regards to the LUT that you provide. Please see chirpstack/chirpstack-gateway-os#41

Based on the issue provided we are moving towards using this config option since it would be easier to get notifications about recent updates. However, I do have a couple of questions about it.

  1. Why there are several configuration files?

  2. What were the electrical and other related variable conditions while taking measurements in https://github.com/RAKWireless/rak_common_for_gateway/blob/master/lora/rak2245/global_conf/global_conf.as_923.json)? Since measured power level differs from the ones are stay there.

Please take a look at the following image when PA = 1, Mix = 8 and Dig = 0

Measurement0012

My results offset 2.3 dBm which is huge compared to what it is says: 3 dBm.

Please provide a dashboard for gateway statistics

In a similar wait that Lorix OS can provide, please provide a nice dashboard making statistics for packet forwarder and gateway (number of packets up/down, crc data, number of devices... all in function of time, also making use of graphs)

Fix for DietPi

Hi,
for DietPi OS need add
apt install build-essential net-tools -y
in rak/install.sh (for example before apt install git ppp dialog jq minicom monit -y)
and need check hciuart enabled because
systemctl disable hciuart
not installed and script fail.

Best regards

RAK 2247 USB ERROR: [main] failed to start the concentrator

When I restart the concentrator after the first time. This error is shown. I use the RAK2247 USB dongle gateway. How can I send a restart command to the USB dongle. After pulling the dongle out its works again, but I want to do it programmatically.

ERROR: [main] failed to start the concentrator

image

SPI frequency still to high

Hi,
compared to the very aggressive 8MHz SPI frequency of the Lora reference implementation from Lora-net github repo you choose 2MHz. That is an improvement but after using the SPI stress test of the reference implementation my RAK 2245 still had errors on the bus. Only by lowering the frequency to 1MHz the test was able to run without errors for hours.
I tested with a logic analyzer, the SPI signals coming from my Master devices are clean, but the SX1301 still throws some errors.
Tested with RaspberryPi 3 and 4 on standard Raspbian with kernel version: 4.19

building rak2247_usb on debian buster failed

Hello,

as probably in Debian buster, the lib libftdi-dev has changed and tag v4.2.8 is not building on this newest Debian. It is building on stretch version.

We get errros as follow:
/usr/bin/ld:
[main] fast.o:/opt/lora-rak-gateway/dev/rak_common_for_gateway/lora/rak2247_usb/libmpsse/src/mpsse.h:221: multiple definition of fast_rw_buf'; [main] mpsse.o:/opt/lora-rak-gateway/dev/rak_common_for_gateway/lora/rak2247_usb/libmpsse/src/mpsse.h:221: first defined here [main] [main] [main] /usr/bin/ld: [main] support.o:/opt/lora-rak-gateway/dev/rak_common_for_gateway/lora/rak2247_usb/libmpsse/src/mpsse.h:221: multiple definition of fast_rw_buf'; mpsse.o:/opt/lora-rak-gateway/dev/rak_common_for_gateway/lora/rak2247_usb/libmpsse/src/mpsse.h:221: first defined here
[main]
[main] collect2: error: ld returned 1 exit status
[main]
[main] make: *** [Makefile:21: mpsse] Error 1

Chirpstack Channel plans shifted

It would seem that when selecting a channel plan from the configuration of script the Channel plans are shifted. If you choose one you get the configuration for the packet forwarder for the one before it in the list.
image

So if for example as in the image you choose 6 IN865, you will instead get 5 EU868.

getting a rakk2245 running with other packet forwarders/gateways

I am using a rakk2245 on an orangepi zero (running armbian) instead of a raspberry pi (raspbian). I also prefer not to use prebuilt images foir my gateway but build my own. I managed to get it to work quite easily with your version of libloragw and the packet forwarder you supply. I only needed toi change the SPIDEV path to /dev/sidev1.0 (instead of 0.0) and change the GPIO SX1301 RESET pin to 1 instead of 17.

But I would actually prefer to use a different gateway as well. I am messing around with basic station right now. It also uses libloragw 5.0.1, just like you do. So my question is what I would need to do to get it to work. Right now I am getting issues with the SPI communication. I see the SPI speed is different (2MHz instead of 8 on libloragw). I changed that already in my basicstation libloragw version and I changed the GPIO RESET pin and made sure to reset the radio, but still I am getting an error lgw_start:863: ERROR: CALIBRATION FAILURE (STATUS = 119). Any ideas how to fix these? I would be happy to contribute RAK2245 support to basic station if I mange to succeed.

Extremly poor performance RAK5146(USB) / RAK5146-226

I have been trying to use the RAK5146-226 both on a generic WWAN USB breakout as well as on a balenaFin with multiple CubeCells. However, the connection is extremely unstable - I cannot send a simple 01020304 relaibly, running it over night showed that FCT skips dozens and sometimes hundereds of packets. Also, the reset script for the RAK5146 ( https://github.com/RAKWireless/rak_common_for_gateway/blob/master/lora/rak5146/reset_lgw.sh ) contains pulling down GPIO pins - which are not available while using the RAK5146-226 (USB, GPS, LBT version) - so I guess this is part of the problem. When will this be fixed and an official firmware be ready, like for the RAK2287 or othr products?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.