orb:fieldbasestation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
orb:fieldbasestation [2016/07/07 16:33]
sam
orb:fieldbasestation [2016/07/27 22:30] (current)
sam
Line 1: Line 1:
 ====== Octanis 1 Field Basestation ====== ====== Octanis 1 Field Basestation ======
 This system is comprised of a Raspberry Pi connected to a [[https://www.amazon.co.uk/868-MHz-LoRaWAN-RPi-Shield/dp/B01G7G54O2/ref=as_li_ss_tl?ie=UTF8&*Version*=1&*entries*=0&linkCode=sl1&tag=linlab-21&linkId=43313480419af318460835e94be0cc81|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. This system is comprised of a Raspberry Pi connected to a [[https://www.amazon.co.uk/868-MHz-LoRaWAN-RPi-Shield/dp/B01G7G54O2/ref=as_li_ss_tl?ie=UTF8&*Version*=1&*entries*=0&linkCode=sl1&tag=linlab-21&linkId=43313480419af318460835e94be0cc81|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.
 +
 +dGPS is connected to the Raspi via USB. The Raspi forwards the serial port over tcp.
  
 [[https://docs.google.com/drawings/d/1s0imd15S9Ls2AFuk43QeJKpcPzAp4fPuWXnE_PIoY6E/edit|{{ :orb:screen_shot_2016-07-02_at_16.01.30.png?700 | }}]] [[https://docs.google.com/drawings/d/1s0imd15S9Ls2AFuk43QeJKpcPzAp4fPuWXnE_PIoY6E/edit|{{ :orb:screen_shot_2016-07-02_at_16.01.30.png?700 | }}]]
Line 11: Line 13:
     * Mosquitto (sudo apt-get install mosquitto)     * Mosquitto (sudo apt-get install mosquitto)
     * packet_forwarder     * packet_forwarder
-  * MAVLink to MQTT bridge (**TODO**)+    * socat (for ucenter over TCP) 
 +  * MAVLink to MQTT bridge
   * DHCP Server (**TODO, as last task only**)   * DHCP Server (**TODO, as last task only**)
  
Line 40: Line 43:
 **Subscribing to nodes** **Subscribing to nodes**
   * ''mosquitto_sub -h 192.168.174.1 -t "application/70b3d57ed0000172/node/+/rx" -v''  [[https://github.com/brocaar/loraserver/blob/master/docs/receiving-data.md|more here]]   * ''mosquitto_sub -h 192.168.174.1 -t "application/70b3d57ed0000172/node/+/rx" -v''  [[https://github.com/brocaar/loraserver/blob/master/docs/receiving-data.md|more here]]
-  * ''  mosquitto_pub -h 192.168.174.1 -t "application/70b3d57ed0000172/node/f03d291000000046/tx" -m '{"reference":"mavlink","devEUI":"f03d291000000046","fPort":1,"confirmed": false,"data":"3q2+796tvu8="}' -q 0 '' // base64 encoded data (plaintext) [[https://github.com/brocaar/loraserver/blob/master/docs/sending-data.md|more here]]+  * ''  mosquitto_pub -h 192.168.174.1 -t "application/70b3d57ed0000172/node/f03d291000000046/tx" -m '{"reference":"mavlink","devEUI":"f03d291000000046","fPort":1,"confirmed": false,"data":"3q2+796tvu8="}' -q 0 '' -> base64 encoded data (plaintext) [[https://github.com/brocaar/loraserver/blob/master/docs/sending-data.md|more here]]
  
 **Setting up LinkLabs Concentrator** **Setting up LinkLabs Concentrator**
   * Add kernel.sysrq=0 to /etc/sysctl.conf   * Add kernel.sysrq=0 to /etc/sysctl.conf
   * Run sudo systemctl mask serial-getty@ttyAMA0.service   * Run sudo systemctl mask serial-getty@ttyAMA0.service
 +
 +** Example of received data from mosquitto_sub. Data is base64 encoded MAVLink HEARTBEAT.**
 +<code>
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-72,"data":"/gkAGQAAAAAAAAoAQAMDG0A="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-72,"data":"/gkCGQAAAAAAAAoAQAMDz70="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-69,"data":"/gkEGQAAAAAAAAoAQAMDorM="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-69,"data":"/gkJGQAAAAAAAAoAQAMDktE="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-72,"data":"/gkKGQAAAAAAAAoAQAMDrFI="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-70,"data":"/gkNGQAAAAAAAAoAQAMDKyI="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-70,"data":"/gkOGQAAAAAAAAoAQAMDFaE="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-69,"data":"/gkSGQAAAAAAAAoAQAMDGGs="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-71,"data":"/gkTGQAAAAAAAAoAQAMD8hU="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-70,"data":"/gkWGQAAAAAAAAoAQAMDoZg="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-70,"data":"/gkXGQAAAAAAAAoAQAMDS+Y="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-70,"data":"/gkbGQAAAAAAAAoAQAMDkfo="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-71,"data":"/gkcGQAAAAAAAAoAQAMDFoo="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-71,"data":"/gkgGQAAAAAAAAoAQAMDpOU="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-70,"data":"/gkhGQAAAAAAAAoAQAMDTps="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-71,"data":"/gklGQAAAAAAAAoAQAMD92g="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-70,"data":"/gkmGQAAAAAAAAoAQAMDyes="}
 +{"devEUI":"f03d291000000046","fPort":1,"gatewayCount":1,"rssi":-72,"data":"/gknGQAAAAAAAAoAQAMDI5U="}
 +</code>
 +
 +
 +** Connecting APM Planner / Mission Planner to Field Base Station **
 +  - In APM Planner / Mission Planner setup a new UDP Link on Port 14550
 +  - Make sure the ''bridge'' and the ''status_reporter'' is running on the Field Station (monit)
 +
 +** Debugging: viewing received APM Planner 2 MAVLink packets with mavproxy **
 +  * ''mavproxy.py --master=192.168.2.1:14555''
 +  * In APM Planner 2 don't forgot to add a "Remote Communication Link" UDP
 +  * Then use ''mavsearch.py mav.tlog'' to look for MAVLink messages in the binary log
 +
 +** Temperature & Battery **
 +  * After 50min of use (surveying in + waiting for incoming LoRa tx): 4.01V -> 3.9V,  41°C -> 70°C RPi CPU temperature.
  
  
  • orb/fieldbasestation.1467902019.txt.gz
  • Last modified: 5 years ago
  • by sam