This is an old revision of the document!

Octanis 1 Field Basestation

This system is comprised of a Raspberry Pi connected to a LoRaWAN Shield and the dGPS Base station. An operator can connect to the system via Ethernet, after which they will be assigned an IP address by the Raspberry Pi. The operator then opens APM Planner, which will start receiving MAVLink packages automatically. The operator can also use APM Planner to send commands to the rover. Theses commands will be relayed by the Field Base Station using a “MAVLink to MQTT Bridge” which we still have to code.

Raspberry Pi 1 running:

  • Linklabs LoRa Gateway Service (packet_forwarder)
  • Brocaar's loraserver & lora-gateway-bridge (in /opt/brocaar), which require:
    • Redis (sudo apt-get install redis-server)
    • Postgresql (sudo apt-get install postgresql)
    • Mosquitto (sudo apt-get install mosquitto)
    • packet_forwarder
  • MAVLink to MQTT bridge (TODO)
  • DHCP Server (TODO, as last task only)

How to run manually (only necessary if Monit didn't do it's job):

  • If running for the first time, create a new postgres user and db for loraserver:
    • $ sudo su - postgres
      $ psql template1
      template1=# CREATE USER linklabs WITH PASSWORD 'linklabs';
      template1=# CREATE DATABASE loraserver;
      template1=# GRANT ALL PRIVILEGES ON DATABASE loraserver to linklabs;
      template1=# \q
      $ exit
  • If all prerequisites are installed, lora-gateway-bridge can be run with no arguments.
  • Then you can run
 ./loraserver --net-id 747474 --band EU_863_870 --postgres-dsn "postgres://linklabs:linklabs@localhost/loraserver?sslmode=disable" --db-automigrate

Setting up nodes

  • On the RN2483:
    • mac get deveui → write down somewhere
    • mac set appeui 70b3d57ed0000172 → Octanis 1 App on the Field Station
    • mac set appkey 01020304050607080910111213141516 → arbitrary key (must be same as on loraserver!)
    • mac join otaa → join the network, loraserver on Field Station will accept if OK
      • as a response, RN2483 will output ok and then after a few seconds accepted

Setting up LinkLabs Concentrator

  • Add kernel.sysrq=0 to /etc/sysctl.conf
  • Run sudo systemctl mask serial-getty@ttyAMA0.service
  • orb/fieldbasestation.1467899253.txt.gz
  • Last modified: 5 years ago
  • by sam