LoRaWAN Gateway with GPS module NEO-6M GYNEO6MV2 (legacy, TTN v2)
Wiring:
RXT on the GPS goes to TXD on the PI
TXD on the GPS goes to RXT on the PI
GPS — RPI
TX — GPIO15-RX (pin10)
RX — GPIO14-TX (pin8)
Ucc — 3.3V (pin 1)
GND — GND
PPS — pin 19 iC880
Tested antennas:
GPS/GLONASS antenna, with thread, SMA(m), RG174/3m e-shop |
GPS antenna EA200, SMA(m), RG174/5m e-shop |
Configuration:
#in raspi-config a deny serial # in /boot/cmdline.txt set speed serial0 to 9600 reboot apt-get install gpsd gpsd-clients systemctl stop gpsd.socket systemctl disable gpsd.socket stty -F /dev/serial0 9600 (rucni nastavewni rychlosti) gpsd /dev/serial0 -F /var/run/gpsd.sock chmod a+rw /dev/serial0 cgps -s debug: cat /dev/serial0 gpsmon /dev/serial0 https://raspberrypi.stackexchange.com/questions/30183/gpsd-data-receiving-issues in RPI3: https://circuitdigest.com/microcontroller-projects/raspberry-pi-3-gps-module-interfacing vi /boot/config.txt dtparam=spi=on dtoverlay=pi3-disable-bt core_freq=250 enable_uart=1 force_turbo=1 sudo cp boot/cmdline.txt boot/cmdline_backup.txt sudo nano /boot.cmdline.txt dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles sudo systemctl stop serial-getty@ttyS0.service sudo systemctl disable serial-getty@ttyS0.service sudo systemctl enable serial-getty@ttyAMA0.service possible enable: sudo systemctl enable serial-getty@ttyS0.service sudo systemctl start serial-getty@ttyS0.service * if you have problem to access to AMA0 socket, try following: sudo systemctl stop serial-getty@ttyAMA0.service sudo systemctl disable serial-getty@ttyAMA0.service sudo chmod a+rw /dev/ttyAMA0
RaspberryPi 3 + GPS: We couldn’t start this set, otherwise RPI 2B + GPS is working
TTN script modification:
- last row in
/opt/ttn-gateway/start.sh
don’t runpoly_pkt_fwd
butgps_pkt_fwd
. - copy to
global_conf.json
local settings inlocal_conf.json
- modify:
"gateway_conf": { "gateway_ID": "xxxxxxxxxx", "gps": true, "beacon": false, "monitor": false, "upstream": true, "downstream": true, "ghoststream": false, "radiostream": true, "statusstream": true, "server_address": "router.eu.thethings.network", "serv_port_up": 1700, "serv_port_down": 1700, "servers": [ { "server_address": "router.eu.thethings.network", "serv_port_up": 1700, "serv_port_down": 1700, "serv_enabled": true } ], /* 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", "ngrok_path": "/usr/bin/ngrok", "system_calls": ["df -m","free -h","uptime","who -a","uname -a"], }