RAK7248 Developer D4H received GPS alerts quickly

Hi, RAK7248C Developer D4H device encountered storage capacity overruns because /var/log/daemon.log and /var/log/syslog occupied very large storage space.

pi@rak-gateway:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        29G   29G     0 100% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           1.9G  160M  1.8G   9% /run
tmpfs           5.0M  8.0K  5.0M   1% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   48M  205M  19% /boot
tmpfs           383M     0  383M   0% /run/user/1000
pi@rak-gateway:~ $ sudo du -sh /var/log/*
0       /var/log/alternatives.log
8.0K    /var/log/alternatives.log.1
36K     /var/log/apt
48K     /var/log/auth.log
36K     /var/log/auth.log.1
0       /var/log/bootstrap.log
0       /var/log/btmp
4.0K    /var/log/btmp.1
4.0K    /var/log/chirpstack-application-server
4.0K    /var/log/chirpstack-gateway-bridge
4.0K    /var/log/chirpstack-network-server
14G     /var/log/daemon.log
1.7M    /var/log/daemon.log.1
104K    /var/log/debug
24K     /var/log/debug.1
0       /var/log/dpkg.log
36K     /var/log/dpkg.log.1
8.0K    /var/log/faillog
556K    /var/log/kern.log
332K    /var/log/kern.log.1
12K     /var/log/lastlog
552K    /var/log/messages
332K    /var/log/messages.1
8.0K    /var/log/monit.log
20K     /var/log/mosquitto
20K     /var/log/postgresql
4.0K    /var/log/private
40K     /var/log/redis
14G     /var/log/syslog
534M    /var/log/syslog.1
216K    /var/log/syslog.2.gz
4.0K    /var/log/sysstat
0       /var/log/user.log
4.0K    /var/log/user.log.1
56K     /var/log/wtmp

I used the device for about a week after initializing, so I don’t think it’s a problem due to normal log accumulation.

and, checked the log for the following output:

Jan 7 07:17:29 rak-gateway ttn-gateway[372]: WARNING: [gps] read() returned value -1
Jan 7 07:17:29 rak-gateway ttn-gateway[372]: WARNING: [gps] read() returned value -1
Jan 7 07:17:29 rak-gateway ttn-gateway[372]: WARNING: [gps] read() returned value -1
Jan 7 07:17:29 rak-gateway ttn-gateway[372]: WARNING: [gps] read() returned value -1
Jan 7 07:17:29 rak-gateway ttn-gateway[372]: WARNING: [gps] read() returned value -1
Jan 7 07:17:29 rak-gateway ttn-gateway[372]: WARNING: [gps] read() returned value -1

This warning message was accumulating in the log very quickly.

How can I solve this problem?

Thanks very much for your help.

Hi @DDN,

What kind of operating system are you using for the gateway?

Hi @JaeHwan.Jin ,

Information about the OS being used by the gateway:

pi@rak-gateway:~ $ gateway-version
Raspberry Pi 4 Model B Rev 1.5, OS "10 (buster)", 5.10.17-v7l+.
RAKWireless gateway RAK2287 with LTE version 4.2.9R install from firmware.
Gateway ID: D83ADDFFFEAB323A.
pi@rak-gateway:~ $ cat /etc/*release*
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

The firmware used to initialize the device is downloaded here:
https://downloads.rakwireless.com/#LoRa/RAK7248C/Firmware/

The firmware image file is named RAK7248C_20210909.img.

Hi @DDN,

Seeing the journal log, the GPS file path doesn’t seem correct. Could you edit gateway_conf.gps_tty_path at /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/global_conf.json to /dev/ttyAMA0 and restart the ttn-gateway.service?

Before that, you must confirm that your Pi serial interface is enabled, like login via serial = off, serial = on.

@JaeHwan.Jin

In the /packet_forwarder/lora_pkt_fwd/global_conf.json file, the path to gps_tty_path was set this.

"gps_tty_path": "/dev/i2c-1"

I restarted ttn-gateway.service after changing the “gps_tty_path” path to /dev/ttyAMA0, no gps error occurs now.

If I don’t use GPS, would it be okay to set the gps_tty_path line in the global_conf.json setting file to blank (“”)?

And how can I check if the Pi serial interface is enabled?

Putting the command ls /dev/tty*, and if you have found /dev/ttyAMA0, the serial interface is enabled if your OS release is Buster.

If you don’t want to use GPS, just commenting out the line would be fine, like below

        /* "gps_tty_path": "/dev/ttyAMA0", */
1 Like

@JaeHwan.Jin

After entering the command ls /dev/tty*, /dev/ttyAMA0 was found in the output.
Since GPS is not currently in use, I will use gateway after annotating the gps_tty_path line in the global_conf file.

Thank you for your support!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.