Gruppo Meteo/HowTo/LorawanGateway

Da raspibo.
Jump to navigation Jump to search

LoRaWAN Gateway on rapberry, IMST iC880A Concentrator 868MHz, Centos 7

Assemble the gateway

Parts:

Assemble the gateway as described at: https://github.com/ttn-zh/ic880a-gateway/wiki

Regulate the DC-DC power Supply to output 5.0V Connect the capacitor to the output of DC-DC power Supply

Operative system

Follow https://wiki.centos.org/SpecialInterestGroup/AltArch/Arm32/RaspberryPi3

enable epel:

cat > /etc/yum.repos.d/epel.repo << EOF
[epel]
name=Epel rebuild for armhfp
baseurl=https://armv7.dev.centos.org/repodir/epel-pass-1/
enabled=1
gpgcheck=0

EOF

enable ttn:

cd /etc/yum.repos.d
wget http://rmap.cc/repo/ttn/rmapcentos.repo


change root password!

Autossh

  • attivare autossh, ossia un tunneling ssh su macchina pubblica per

permettere l'accesso remoto di amministrazione; infatti la connesione tramite wifi o ethernet o GSM non espongono un ip pubblico (almeno senza fare un reindirizzamento di porta):

yum install autossh da root:

ssh-keygen
ssh-copy-id 

/usr/lib/systemd/system/autossh.service

[Unit]
Description=Autossh tunneling
After=network.target

[Service]
#User=ttn
#Group=ttn
WorkingDirectory=/root
#ExecStart=/usr/bin/autossh -M 5023  -N -R 5022:localhost:22 pat1@ttn.rmap.it
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -N -R 5022:localhost:22 <user>@<remotehost>
SyslogIdentifier=autossh
Restart=always
RestartSec=30

[Install]
WantedBy=multi-user.target
systemctl daemon-reload
service autossh start
chkconfig autossh on

ora dalla macchina remota si può fare:

ssh root@localhost -p5022