LoPy-nano-gatewy-wan-private: Difference between revisions
Jump to navigation
Jump to search
(9 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
In this page we are going to: | In this page we are going to: | ||
*Install open source private LoRa server (by | *Install open source private LoRa server (by [https://github.com/brocaar Orne Brocaar]) | ||
*Setup LoPy as single channel nano gateway | *Setup LoPy as single channel nano gateway | ||
*Send data from LoPy node | *Send data from LoPy node | ||
Install private LoRa server: | Install private LoRa server: | ||
Install Ansible | 1. We are going to use the [https://www.ansible.com/ Ansible] playbook to setup all the LoRa server and dependencies. | ||
* | Install Ansible (Reference: [http://docs.ansible.com/ansible/intro_installation.html Ansible Installation] | ||
* | *sudo apt-get install software-properties-common | ||
* | *sudo apt-add-repository ppa:ansible/ansible | ||
** | *sudo apt-get update | ||
*sudo apt-get install ansible | |||
2. Clone the [https://github.com/brocaar/loraserver-setup Ansible Playbook] | |||
Install git | |||
*sudo apt-get install git | |||
*sudo git clone https://github.com/brocaar/loraserver-setup | |||
*cd loraserver-setup | |||
// todo: continue | |||
Setup LoPy as a Single channel nano gateway: (Reference [https://forum.pycom.io/topic/810/new-firmware-release-1-6-7-b1-lorawan-nano-gateway-with-ttn-example Pycom Forum] [https://github.com/pycom/pycom-libraries/tree/master/examples/lorawan-nano-gateway Github Code] | |||
*Update LoPy firmware to 1.6.7.b1 | |||
*Download the code | |||
*Edit the config.py file to setup: Gateway ID, Server IP, Server Port, Wifi Access Point for LoPy to connect to the network. | |||
GATEWAY_ID = '11aa334455bb7788' | |||
SERVER = 'ip.address.here' | |||
PORT = 1700 | |||
WIFI_SSID = 'my-wifi' | |||
WIFI_PASS = 'my-wifi-password' | |||
**Note: We can get gateway id by execute these code in LoPy (Referenece [https://www.thethingsnetwork.org/docs/devices/lopy/usage.html TTN]): | |||
from network import LoRa | |||
import binascii | |||
lora = LoRa(mode=LoRa.LORAWAN) | |||
print(binascii.hexlify(lora.mac()).upper().decode('utf-8')) | |||
*Copy the code to the 'flash' folder of LoPy: | |||
Via FTP: | |||
Follow this reference to connect to LoPy via FTP [https://docs.pycom.io/pycom_esp32/pycom_esp32/toolsandfeatures.html?highlight=ftp#pycom-filesystem pycom] | |||
*Reset LoPy | |||
We should be able to see the message from gateway from MQTT server with this topic (Reference [https://docs.loraserver.io/lora-gateway-bridge/topics/ loraserver]): | |||
mosquitto_sub -t "gateway/#" -v | |||
Send data from LoPy node: | |||
*Register node in server | |||
*Send data from node (LoPy) | |||
*Subscribe to node data from server: | |||
== LoPY Nano-gateway and Lora-server experiments == | == LoPY Nano-gateway and Lora-server experiments == |
Latest revision as of 11:42, 10 March 2017
LoPy Nano-gateway and private lora-server installation
In this page we are going to:
- Install open source private LoRa server (by Orne Brocaar)
- Setup LoPy as single channel nano gateway
- Send data from LoPy node
Install private LoRa server:
1. We are going to use the Ansible playbook to setup all the LoRa server and dependencies.
Install Ansible (Reference: Ansible Installation *sudo apt-get install software-properties-common *sudo apt-add-repository ppa:ansible/ansible *sudo apt-get update *sudo apt-get install ansible
2. Clone the Ansible Playbook
Install git *sudo apt-get install git *sudo git clone https://github.com/brocaar/loraserver-setup *cd loraserver-setup
// todo: continue
Setup LoPy as a Single channel nano gateway: (Reference Pycom Forum Github Code
- Update LoPy firmware to 1.6.7.b1
- Download the code
- Edit the config.py file to setup: Gateway ID, Server IP, Server Port, Wifi Access Point for LoPy to connect to the network.
GATEWAY_ID = '11aa334455bb7788' SERVER = 'ip.address.here' PORT = 1700 WIFI_SSID = 'my-wifi' WIFI_PASS = 'my-wifi-password'
- Note: We can get gateway id by execute these code in LoPy (Referenece TTN):
from network import LoRa import binascii lora = LoRa(mode=LoRa.LORAWAN) print(binascii.hexlify(lora.mac()).upper().decode('utf-8'))
- Copy the code to the 'flash' folder of LoPy:
Via FTP: Follow this reference to connect to LoPy via FTP pycom
- Reset LoPy
We should be able to see the message from gateway from MQTT server with this topic (Reference loraserver):
mosquitto_sub -t "gateway/#" -v
Send data from LoPy node:
- Register node in server
- Send data from node (LoPy)
- Subscribe to node data from server: