Difference between revisions of "Edge Sense LoRa GW Solution"
(.) |
(.) |
||
Line 160: | Line 160: | ||
*<span style="font-size:medium;">Once config is changed , please execute "<span style="color:#0000FF;">sudo systemctl restart LoRaMgt_ryx.service</span>" to restart service in order to apply new setting.</span> | *<span style="font-size:medium;">Once config is changed , please execute "<span style="color:#0000FF;">sudo systemctl restart LoRaMgt_ryx.service</span>" to restart service in order to apply new setting.</span> | ||
− | + | Setting File as: | |
{| border="1" cellspacing="1" cellpadding="1" style="width:500px;" | {| border="1" cellspacing="1" cellpadding="1" style="width:500px;" | ||
|- | |- | ||
| | | | ||
− | + | [gateway]<br/>node_num=2<br/>polling_rate=20 | |
− | + | [rf]<br/>band=TW<br/>hostaddr=1<br/>networkid=0<br/>crfop1=15<br/>crfop2=15</span><br/><br/>[node-1]<br/>addr=8<br/>nodetype=1 | |
− | + | [node-2]<br/>addr=69<br/>nodetype=1 | |
|} | |} | ||
Line 175: | Line 175: | ||
node_num | node_num | ||
− | * | + | *Support maxinum 4 nodes |
polling_rate | polling_rate | ||
Line 190: | Line 190: | ||
**'''US''' - for US | **'''US''' - for US | ||
− | hostaddr | + | <span style="font-size:medium;">hostaddr</span> |
− | *Assign address for LoRa Host (LoRa pcie module inside gateway) | + | *<span style="font-size:medium;">Assign address for LoRa Host (LoRa pcie module inside gateway)</span> |
− | *hostaddr is needed to be 1 | + | *<span style="font-size:medium;">hostaddr is needed to be 1</span> |
− | networkid | + | <span style="font-size:medium;">networkid</span> |
− | *Network ID, default is 0 | + | *<span style="font-size:medium;">Network ID, default is 0</span> |
− | *<span style="color:#FF0000;">NOTE:In firmware RYLRxxP_V0.1.22, range from 0 to 5</span> | + | *<span style="font-size:medium;"><span style="color:#FF0000;">NOTE:In firmware RYLRxxP_V0.1.22, range from 0 to 5</span></span> |
− | *<span style="color:#FF0000;">NOTE:In firmware RYLRxxP_V0.2.23 and above, range from 0 to 11</span> | + | *<span style="font-size:medium;"><span style="color:#FF0000;">NOTE:In firmware RYLRxxP_V0.2.23 and above, range from 0 to 11</span></span> |
− | crfop1 / crfop2 | + | <span style="font-size:medium;">crfop1 / crfop2</span> |
− | *LoRa module power , range from 0 to 15 dBm | + | *<span style="font-size:medium;">LoRa module power , range from 0 to 15 dBm</span> |
− | addr: | + | <span style="font-size:medium;">addr:</span> |
− | *address for LoRa Node , range from 2 to 65000 | + | *<span style="font-size:medium;">address for LoRa Node , range from 2 to 65000</span> |
− | notetype: | + | <span style="font-size:medium;">notetype:</span> |
− | *nodetype=1 : temperature + humidity + output x 5 + adc + relay x 4 + input x 4 | + | *<span style="font-size:medium;">nodetype=1 : temperature + humidity + output x 5 + adc + relay x 4 + input x 4</span> |
− | *nodetype=2 : temperature + humidity + co2 | + | *<span style="font-size:medium;">nodetype=2 : temperature + humidity + co2</span> |
− | *nodetype=3 : GPS | + | *<span style="font-size:medium;">nodetype=3 : GPS</span> |
− | == Downlink for sensor == | + | == <span style="font-size:medium;">Downlink for sensor</span> == |
− | '''Relay''' | + | <span style="font-size:medium;">'''Relay'''</span> |
− | Node Type#1 have 4 Normally Close type of Relay. | + | <span style="font-size:medium;">Node Type#1 have 4 Normally Close type of Relay.</span> |
− | When relay is triggered to On status in WISE-PaaS, relay contact is open. | + | <span style="font-size:medium;">When relay is triggered to On status in WISE-PaaS, relay contact is open.</span> |
− | When relay is triggered to Off status in WISE-PaaS, relay contact is close. | + | <span style="font-size:medium;">When relay is triggered to Off status in WISE-PaaS, relay contact is close.</span> |
− | == Service control == | + | == <span style="font-size:medium;">Service control</span> == |
− | '''In Windows''' | + | <span style="font-size:medium;">'''In Windows'''</span> |
− | Check if LoRaMgt_ryx service is running: | + | <span style="font-size:medium;">Check if LoRaMgt_ryx service is running:</span> |
− | *Use Service to check status of LoRaMgt_ryx service | + | *<span style="font-size:medium;">Use Service to check status of LoRaMgt_ryx service</span> |
− | Restart LoRaMgt_ryx service: | + | <span style="font-size:medium;">Restart LoRaMgt_ryx service:</span> |
− | *Use Service to restart LoRaMgt_ryx service | + | *<span style="font-size:medium;">Use Service to restart LoRaMgt_ryx service</span> |
− | Start LoRaMgt_ryx service: | + | <span style="font-size:medium;">Start LoRaMgt_ryx service:</span> |
− | *Use Service start LoRaMgt_ryx service | + | *<span style="font-size:medium;">Use Service start LoRaMgt_ryx service</span> |
− | Stop LoRaMgt_ryx service: | + | <span style="font-size:medium;">Stop LoRaMgt_ryx service:</span> |
− | *Use Service stop LoRaMgt_ryx service | + | *<span style="font-size:medium;">Use Service stop LoRaMgt_ryx service</span> |
− | '''In Ubuntu''' | + | <span style="font-size:medium;">'''In Ubuntu'''</span> |
− | Check if LoRaMgt_ryx service is running: | + | <span style="font-size:medium;">Check if LoRaMgt_ryx service is running:</span> |
− | <pre>$ sudo systemctl status LoRaMgt_ryx.service | + | <pre><span style="font-size:medium;">$ sudo systemctl status LoRaMgt_ryx.service |
− | </pre> | + | </span></pre> |
− | Restart LoRaMgt_ryx service: | + | <span style="font-size:medium;">Restart LoRaMgt_ryx service:</span> |
− | <pre>$ sudo systemctl restart LoRaMgt_ryx.service | + | <pre><span style="font-size:medium;">$ sudo systemctl restart LoRaMgt_ryx.service |
− | </pre> | + | </span></pre> |
− | Start LoRaMgt_ryx service: | + | <span style="font-size:medium;">Start LoRaMgt_ryx service:</span> |
− | <pre>$ sudo systemctl start LoRaMgt_ryx.service | + | <pre><span style="font-size:medium;">$ sudo systemctl start LoRaMgt_ryx.service |
− | </pre> | + | </span></pre> |
− | Stop LoRaMgt_ryx service: | + | <span style="font-size:medium;">Stop LoRaMgt_ryx service:</span> |
− | <pre>$ sudo systemctl stop LoRaMgt_ryx.service | + | <pre><span style="font-size:medium;">$ sudo systemctl stop LoRaMgt_ryx.service |
− | </pre> | + | </span></pre> |
− | = Tools = | + | = <span style="font-size:medium;">Tools</span> = |
− | == Driver for USB to UART Bridge Controller == | + | == <span style="font-size:medium;">Driver for USB to UART Bridge Controller</span> == |
− | In Windows, please use Device Manager to check if Devicer for USB to UART Bridge Controller is installed. | + | <span style="font-size:medium;">In Windows, please use Device Manager to check if Devicer for USB to UART Bridge Controller is installed.</span> |
− | If your Device Manager does not recognize a CP2102 USB to UART Bridge Controller, you have to install its driver. | + | <span style="font-size:medium;">If your Device Manager does not recognize a CP2102 USB to UART Bridge Controller, you have to install its driver.</span> |
− | Please visit [https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers] and download driver, then install it. | + | <span style="font-size:medium;">Please visit [https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers] and download driver, then install it.</span> |
− | [[File:LoRaMgt ryx uart driver 1.jpg|RTENOTITLE]] | + | <span style="font-size:medium;">[[File:LoRaMgt ryx uart driver 1.jpg|RTENOTITLE]]</span> |
− | After installing driver, Device Manage will look like this picture | + | <span style="font-size:medium;">After installing driver, Device Manage will look like this picture</span> |
− | [[File:LoRaMgt ryx uart driver 2.jpg|RTENOTITLE]] | + | <span style="font-size:medium;">[[File:LoRaMgt ryx uart driver 2.jpg|RTENOTITLE]]</span> |
− | == reyaxmon == | + | == <span style="font-size:medium;">reyaxmon</span> == |
− | reyaxmon is a monitor tool that it will show RF setting , gateway setting and sensor value from LoRa nodes. Currently only support Ubuntu 16.04. | + | <span style="font-size:medium;">reyaxmon is a monitor tool that it will show RF setting , gateway setting and sensor value from LoRa nodes. Currently only support Ubuntu 16.04.</span> |
− | Execute following commands to launch reyaxmon tools.<br/>$ <span style="color:#0000FF;">cd /usr/local/EdgeSense/LoRaMgt_ryx</span><br/>$ <span style="color:#0000FF;">sudo ./reyaxmon</span> | + | <span style="font-size:medium;">Execute following commands to launch reyaxmon tools.<br/>$ <span style="color:#0000FF;">cd /usr/local/EdgeSense/LoRaMgt_ryx</span><br/>$ <span style="color:#0000FF;">sudo ./reyaxmon</span></span> |
− | <span style="color:#0000FF;">[[File:LoRaMgt ryx reyaxmon screenshot.jpg|RTENOTITLE]]</span> | + | <span style="font-size:medium;"><span style="color:#0000FF;">[[File:LoRaMgt ryx reyaxmon screenshot.jpg|RTENOTITLE]]</span></span> |
− | == Reyax AT Command Demo Script == | + | == <span style="font-size:medium;">Reyax AT Command Demo Script</span> == |
− | This demo script is a simple bash script, aim to provide a preliminary understanding about Reyax At Command. | + | <span style="font-size:medium;">This demo script is a simple bash script, aim to provide a preliminary understanding about Reyax At Command.</span> |
− | This Script only support Ubuntu 16.04. | + | <span style="font-size:medium;">This Script only support Ubuntu 16.04.</span> |
− | Script version : 0.3-beta | + | <span style="font-size:medium;">Script version : 0.3-beta</span> |
− | Support Reyax firmware version : RYLRxxP_V0.1.22 | + | <span style="font-size:medium;">Support Reyax firmware version : RYLRxxP_V0.1.22</span> |
− | Support Lora Proprietary Command Set : V0.97 | + | <span style="font-size:medium;">Support Lora Proprietary Command Set : V0.97</span> |
− | Download | + | <span style="font-size:medium;">Download</span> |
− | *This demo script is available at [[Media:Reyax-atcmd-demo.bash.tar.gz|Reyax-atcmd-demo.bash.tar.gz]] | + | *<span style="font-size:medium;">This demo script is available at [[Media:Reyax-atcmd-demo.bash.tar.gz|Reyax-atcmd-demo.bash.tar.gz]]</span> |
− | *Download the file and upload it to Ubuntu. (Execute "<span style="color:#0000FF;">wget [http://ess-wiki.advantech.com.tw/wiki/images/4/4b/Reyax-atcmd-demo.bash.tar.gz http://ess-wiki.advantech.com.tw/wiki/images/4/4b/Reyax-atcmd-demo.bash.tar.gz]</span>" in terminal) | + | *<span style="font-size:medium;">Download the file and upload it to Ubuntu. (Execute "<span style="color:#0000FF;">wget [http://ess-wiki.advantech.com.tw/wiki/images/4/4b/Reyax-atcmd-demo.bash.tar.gz http://ess-wiki.advantech.com.tw/wiki/images/4/4b/Reyax-atcmd-demo.bash.tar.gz]</span>" in terminal)</span> |
− | *Uncompress the file with command "<span style="color:#0000FF;">tar zxfv Reyax-atcmd-demo.bash.tar.gz</span>" , then reyax-atcmd-demo.bash will be ready to use. | + | *<span style="font-size:medium;">Uncompress the file with command "<span style="color:#0000FF;">tar zxfv Reyax-atcmd-demo.bash.tar.gz</span>" , then reyax-atcmd-demo.bash will be ready to use.</span> |
− | Usage | + | <span style="font-size:medium;">Usage</span> |
− | #In Ubuntu Desktop , open two terminals. | + | #<span style="font-size:medium;">In Ubuntu Desktop , open two terminals.</span> |
− | #Terminal 1 (Left) , run "<span style="color:#0000FF;">sudo cat /dev/ttyUSB0</span>" | + | #<span style="font-size:medium;">Terminal 1 (Left) , run "<span style="color:#0000FF;">sudo cat /dev/ttyUSB0</span>"</span> |
− | #Terminal 2 (Right) , run "<span style="color:#0000FF;">sudo ./reyax-atcmd-demo.bash</span>"<br/>[[File:Reyax-atcmd-demo-screenshot.jpg|RTENOTITLE]] | + | #<span style="font-size:medium;">Terminal 2 (Right) , run "<span style="color:#0000FF;">sudo ./reyax-atcmd-demo.bash</span>"<br/>[[File:Reyax-atcmd-demo-screenshot.jpg|RTENOTITLE]]</span> |
− | #You can enter your choice in the right terminal to issue AT command | + | #<span style="font-size:medium;">You can enter your choice in the right terminal to issue AT command</span> |
− | #Message from AT Command RX will be shown in the left terminal. | + | #<span style="font-size:medium;">Message from AT Command RX will be shown in the left terminal.</span> |
− | #If you want to change node address , press 0 to enter new node's address. | + | #<span style="font-size:medium;">If you want to change node address , press 0 to enter new node's address.</span> |
− | = Restful API = | + | = <span style="font-size:medium;">Restful API</span> = |
− | == Restful API for get SenHubList == | + | == <span style="font-size:medium;">Restful API for get SenHubList</span> == |
− | <span style="color:#0000FF;"><ServerIP></span>:3000/restapi/WSNManage/SenHub/AllSenHubList | + | <span style="font-size:medium;"><span style="color:#0000FF;"><ServerIP></span>:3000/restapi/WSNManage/SenHub/AllSenHubList</span> |
− | ex: get Sensor Hub List in Ubuntu Terminal on the gateway | + | <span style="font-size:medium;">ex: get Sensor Hub List in Ubuntu Terminal on the gateway</span> |
− | <pre>$ curl -H "Content-Type: application/json" -X GET http://127.0.0.1:3000/restapi/WSNManage/SenHub/AllSenHubList</pre> | + | <pre><span style="font-size:medium;">$ curl -H "Content-Type: application/json" -X GET http://127.0.0.1:3000/restapi/WSNManage/SenHub/AllSenHubList</span></pre> |
− | Result: | + | <span style="font-size:medium;">Result:</span> |
− | <pre>{"n":"AllSenHubList","sv":"0017000E8C000055"}</pre> | + | <pre><span style="font-size:medium;">{"n":"AllSenHubList","sv":"0017000E8C000055"}</span></pre> |
− | Or you can get Sensor Hub List via web browser , enter url such as: | + | <span style="font-size:medium;">Or you can get Sensor Hub List via web browser , enter url such as:</span> |
− | [[File:EdgeSense LoRa GW restful1.jpg|RTENOTITLE]] | + | <span style="font-size:medium;">[[File:EdgeSense LoRa GW restful1.jpg|RTENOTITLE]]</span> |
− | == Restful API for Get Sensor Value == | + | == <span style="font-size:medium;">Restful API for Get Sensor Value</span> == |
− | <span style="color:#0000FF;"><ServerIP></span>:3000/restapi/WSNManage/SenHub/<span style="color:#0000FF;"><DEVID></span>/SenHub/SenData/<span style="color:#0000FF;"><SENSOR></span> | + | <span style="font-size:medium;"><span style="color:#0000FF;"><ServerIP></span>:3000/restapi/WSNManage/SenHub/<span style="color:#0000FF;"><DEVID></span>/SenHub/SenData/<span style="color:#0000FF;"><SENSOR></span></span> |
− | DEVID: Device ID of LoRa SenHub ( e.g. 0017000E8C000055 ) | + | <span style="font-size:medium;">DEVID: Device ID of LoRa SenHub ( e.g. 0017000E8C000055 )</span> |
− | SENSOR: Temperature / Humidity / ADC / GPIO1/ GPIO2 / GPIO3 / GPIO4 / GPIO5 / Relay1 / Relay2 / Relay3 / Relay4 / SNR / RSSI | + | <span style="font-size:medium;">SENSOR: Temperature / Humidity / ADC / GPIO1/ GPIO2 / GPIO3 / GPIO4 / GPIO5 / Relay1 / Relay2 / Relay3 / Relay4 / SNR / RSSI</span> |
− | ex: get Temperature in Ubuntu Terminal on the gateway | + | <span style="font-size:medium;">ex: get Temperature in Ubuntu Terminal on the gateway</span> |
− | <pre>curl -H "Content-Type: application/json" -X GET http://127.0.0.1:3000/restapi/WSNManage/SenHub/0017000E8C000052/SenHub/SenData/Temperature | + | <pre><span style="font-size:medium;">curl -H "Content-Type: application/json" -X GET http://127.0.0.1:3000/restapi/WSNManage/SenHub/0017000E8C000052/SenHub/SenData/Temperature |
− | </pre> | + | </span></pre> |
− | Result: | + | <span style="font-size:medium;">Result:</span> |
− | <pre>{"v":23.5}</pre> | + | <pre><span style="font-size:medium;">{"v":23.5}</span></pre> |
− | Or you can get Temperature from device 0017000E8C000052 via web browser , enter url such as: | + | <span style="font-size:medium;">Or you can get Temperature from device 0017000E8C000052 via web browser , enter url such as:</span> |
− | [[File:EdgeSense LoRa GW restful2.jpg|RTENOTITLE]] | + | <span style="font-size:medium;">[[File:EdgeSense LoRa GW restful2.jpg|RTENOTITLE]]</span> |
− | ex: get RSSI in Ubuntu Terminal on the gateway | + | <span style="font-size:medium;">ex: get RSSI in Ubuntu Terminal on the gateway</span> |
− | <pre>curl -H "Content-Type: application/json" -X GET http://127.0.0.1:3000/restapi/WSNManage/SenHub/0017000E8C000052/SenHub/SenData/RSSI | + | <pre><span style="font-size:medium;">curl -H "Content-Type: application/json" -X GET http://127.0.0.1:3000/restapi/WSNManage/SenHub/0017000E8C000052/SenHub/SenData/RSSI |
− | </pre> | + | </span></pre> |
− | Result: | + | <span style="font-size:medium;">Result:</span> |
− | <pre>{"v":-63}</pre> | + | <pre><span style="font-size:medium;">{"v":-63}</span></pre> |
− | = Debug = | + | = <span style="font-size:medium;">Debug</span> = |
− | == Collect LoRa minipcie module command log == | + | == <span style="font-size:medium;">Collect LoRa minipcie module command log</span> == |
− | Refer to [[Uartmgr#Display_UART_transaction_log|uartmgr wiki]]. | + | <span style="font-size:medium;">Refer to [[Uartmgr#Display_UART_transaction_log|uartmgr wiki]].</span> |
− | == Check if LoRaMgt_ryx service is running == | + | == <span style="font-size:medium;">Check if LoRaMgt_ryx service is running</span> == |
− | '''<span style="font-size:larger;">In Ubuntu ,</span>''' | + | <span style="font-size:medium;">'''<span style="font-size:larger;">In Ubuntu ,</span>'''</span> |
− | <pre>$ sudo systemctl status LoRaMgt_ryx.service | + | <pre><span style="font-size:medium;">$ sudo systemctl status LoRaMgt_ryx.service |
− | </pre> | + | </span></pre> |
− | '''<span style="font-size:larger;">In Windows,</span>''' | + | <span style="font-size:medium;">'''<span style="font-size:larger;">In Windows,</span>'''</span> |
− | <pre>Use Service to check status of LoRaMgt_ryx service | + | <pre><span style="font-size:medium;">Use Service to check status of LoRaMgt_ryx service |
− | </pre> | + | </span></pre> |
− | = Use Case = | + | = <span style="font-size:medium;">Use Case</span> = |
− | [[File:LoRaMgt ryx use case1.jpg|RTENOTITLE]] | + | <span style="font-size:medium;">[[File:LoRaMgt ryx use case1.jpg|RTENOTITLE]]</span> |
− | = Release = | + | = <span style="font-size:medium;">Release</span> = |
{| border="1" cellspacing="1" cellpadding="1" style="width: 1492px;" | {| border="1" cellspacing="1" cellpadding="1" style="width: 1492px;" | ||
|- | |- | ||
− | | style="text-align: center;" | Index | + | | style="text-align: center;" | <span style="font-size:medium;">Index</span> |
− | | style="text-align: center;" | Version</span> | + | | style="text-align: center;" | <span style="font-size:medium;">Version</span></span> |
− | | style="text-align: center;" | Date<br/> | + | | style="text-align: center;" | <span style="font-size:medium;">Date</span><br/> |
− | | style="width: 115px; text-align: center;" | Platform<br/> | + | | style="width: 115px; text-align: center;" | <span style="font-size:medium;">Platform</span><br/> |
− | | style="width: 108px; text-align: center;" | OS<br/> | + | | style="width: 108px; text-align: center;" | <span style="font-size:medium;">OS</span><br/> |
− | | style="width: 617px; text-align: center;" | Release Note<br/> | + | | style="width: 617px; text-align: center;" | <span style="font-size:medium;">Release Note</span><br/> |
− | | style="width: 444px; text-align: center;" | Download Link<br/> | + | | style="width: 444px; text-align: center;" | <span style="font-size:medium;">Download Link</span><br/> |
|- | |- | ||
− | | style="text-align: center;" | 1 | + | | style="text-align: center;" | <span style="font-size:medium;">1</span> |
− | | style="text-align: center;" | 1.0.0 | + | | style="text-align: center;" | <span style="font-size:medium;">1.0.0</span> |
− | | style="text-align: center;" | 2018/08/13 | + | | style="text-align: center;" | <span style="font-size:medium;">2018/08/13</span> |
− | | style="width: 115px; text-align: center;" | x86_64 CPU<br/> | + | | style="width: 115px; text-align: center;" | <span style="font-size:medium;">x86_64 CPU</span><br/> |
− | | style="width: 108px; text-align: center;" | Ubuntu 16.04<br/> | + | | style="width: 108px; text-align: center;" | <span style="font-size:medium;">Ubuntu 16.04</span><br/> |
| style="width: 617px;" | | | style="width: 617px;" | | ||
− | *Support Minipcie LoRa module firmware Version RYLRxxP_V0.1.22 | + | *<span style="font-size:medium;">Support Minipcie LoRa module firmware Version RYLRxxP_V0.1.22</span> |
− | *Support LoRa nodetype#1 firmware version: RYLRxx6_V0.1.13 + RYLRxxE_V0.1.7 (for I/O board) | + | *<span style="font-size:medium;">Support LoRa nodetype#1 firmware version: RYLRxx6_V0.1.13 + RYLRxxE_V0.1.7 (for I/O board)</span> |
− | *Support LoRa nodetype#2 firmware version: RYLRxx2_V0.1.13 | + | *<span style="font-size:medium;">Support LoRa nodetype#2 firmware version: RYLRxx2_V0.1.13</span> |
− | *Support sensor: Temperature , Humidity , LED x 5 , ADC, CO2 | + | *<span style="font-size:medium;">Support sensor: Temperature , Humidity , LED x 5 , ADC, CO2</span> |
− | *Support maxinum 4 nodes | + | *<span style="font-size:medium;">Support maxinum 4 nodes</span> |
− | *Command line monitor tools | + | *<span style="font-size:medium;">Command line monitor tools</span> |
| style="width: 444px;" | | | style="width: 444px;" | | ||
− | [https://www.dropbox.com/s/91urak2oazhxth0/LoRaMgt_ryx-1.0.0-Ubuntu_16.04-x86_64.run?dl=0 LoRaMgt_ryx-1.0.0-Ubuntu_16.04-x86_64.run] | + | <span style="font-size:medium;">[https://www.dropbox.com/s/91urak2oazhxth0/LoRaMgt_ryx-1.0.0-Ubuntu_16.04-x86_64.run?dl=0 LoRaMgt_ryx-1.0.0-Ubuntu_16.04-x86_64.run]</span> |
− | [https://www.dropbox.com/s/v3923zf2n86voa3/API-GW-2.0.6-Ubuntu_16.04-x86_64.run?dl=0 API-GW-2.0.6-Ubuntu_16.04-x86_64.run] | + | <span style="font-size:medium;">[https://www.dropbox.com/s/v3923zf2n86voa3/API-GW-2.0.6-Ubuntu_16.04-x86_64.run?dl=0 API-GW-2.0.6-Ubuntu_16.04-x86_64.run]</span> |
− | RMM 3.3 agent:<br/>[https://www.dropbox.com/s/5opglbgr220k7n1/rmmagent-Ubuntu%2016.04.4%20LTS%20x86_64-3.3.23.8242.run?dl=0 rmmagent-Ubuntu 16.04.4 LTS x86_64-3.3.23.8242.run] | + | <span style="font-size:medium;">RMM 3.3 agent:<br/>[https://www.dropbox.com/s/5opglbgr220k7n1/rmmagent-Ubuntu%2016.04.4%20LTS%20x86_64-3.3.23.8242.run?dl=0 rmmagent-Ubuntu 16.04.4 LTS x86_64-3.3.23.8242.run]</span> |
|- | |- | ||
− | | style="text-align: center;" | 2 | + | | style="text-align: center;" | <span style="font-size:medium;">2</span> |
− | | style="text-align: center;" | 1.0.1 | + | | style="text-align: center;" | <span style="font-size:medium;">1.0.1</span> |
− | | style="text-align: center;" | 2018/11/27 | + | | style="text-align: center;" | <span style="font-size:medium;">2018/11/27</span> |
− | | style="width: 115px; text-align: center;" | x86_64 CPU | + | | style="width: 115px; text-align: center;" | <span style="font-size:medium;">x86_64 CPU</span> |
− | | style="width: 108px; text-align: center;" | Windows 10 | + | | style="width: 108px; text-align: center;" | <span style="font-size:medium;">Windows 10</span> |
| style="width: 617px;" | | | style="width: 617px;" | | ||
− | *Support Minipcie LoRa module firmware Version RYLRxxP_V0.1.28 | + | *<span style="font-size:medium;">Support Minipcie LoRa module firmware Version RYLRxxP_V0.1.28</span> |
− | *Support LoRa nodetype#1 firmware version: RYLRxx6_V0.1.20 + RYLRxxE_V0.1.11 (for I/O board) | + | *<span style="font-size:medium;">Support LoRa nodetype#1 firmware version: RYLRxx6_V0.1.20 + RYLRxxE_V0.1.11 (for I/O board)</span> |
− | *Support LoRa nodetype#2 firmware version: RYLRxx2_V0.1.20 | + | *<span style="font-size:medium;">Support LoRa nodetype#2 firmware version: RYLRxx2_V0.1.20</span> |
− | *Support LoRa nodetype#3 firmware version: RYLRxxS_V0.1.20 | + | *<span style="font-size:medium;">Support LoRa nodetype#3 firmware version: RYLRxxS_V0.1.20</span> |
− | *Support sensor: Temperature , Humidity , LED x 5 , ADC, CO2, Relay x 4, Digit Input x 4, GPS | + | *<span style="font-size:medium;">Support sensor: Temperature , Humidity , LED x 5 , ADC, CO2, Relay x 4, Digit Input x 4, GPS</span> |
− | *Support maxinum 4 nodes | + | *<span style="font-size:medium;">Support maxinum 4 nodes</span> |
| style="width: 444px;" | | | style="width: 444px;" | | ||
− | [https://www.dropbox.com/s/ab1yg3xo7e9be89/API-GW-2.0.6.exe?dl=0 API-GW-2.0.6.exe] | + | <span style="font-size:medium;">[https://www.dropbox.com/s/ab1yg3xo7e9be89/API-GW-2.0.6.exe?dl=0 API-GW-2.0.6.exe]</span> |
− | [https://www.dropbox.com/s/2idnzzmkjlcfstr/LoRaMgt_ryx-1.0.1.exe?dl=0 LoRaMgt_ryx-1.0.1.exe] | + | <span style="font-size:medium;">[https://www.dropbox.com/s/2idnzzmkjlcfstr/LoRaMgt_ryx-1.0.1.exe?dl=0 LoRaMgt_ryx-1.0.1.exe]</span> |
− | [https://www.dropbox.com/s/slnv815o5g3o0j4/MQTTBrokerSetup_1.0.3.exe?dl=0 MQTTBrokerSetup_1.0.3.exe] | + | <span style="font-size:medium;">[https://www.dropbox.com/s/slnv815o5g3o0j4/MQTTBrokerSetup_1.0.3.exe?dl=0 MQTTBrokerSetup_1.0.3.exe]</span> |
− | [https://www.dropbox.com/s/ktrmlb7of8u63sd/uartmgr-1.0.2.exe?dl=0 uartmgr-1.0.2.exe] | + | <span style="font-size:medium;">[https://www.dropbox.com/s/ktrmlb7of8u63sd/uartmgr-1.0.2.exe?dl=0 uartmgr-1.0.2.exe]</span> |
|- | |- | ||
− | | style="text-align: center;" | 3 | + | | style="text-align: center;" | <span style="font-size:medium;">3</span> |
− | | style="text-align: center;" | 1.0.2 | + | | style="text-align: center;" | <span style="font-size:medium;">1.0.2</span> |
− | | style="text-align: center;" | 2018/12/4 | + | | style="text-align: center;" | <span style="font-size:medium;">2018/12/4</span> |
− | | style="width: 115px; text-align: center;" | x86_64 CPU<br/> | + | | style="width: 115px; text-align: center;" | <span style="font-size:medium;">x86_64 CPU</span><br/> |
− | | style="width: 108px; text-align: center;" | Windows 10<br/> | + | | style="width: 108px; text-align: center;" | <span style="font-size:medium;">Windows 10</span><br/> |
| style="width: 617px;" | | | style="width: 617px;" | | ||
− | *Add openssl dll | + | *<span style="font-size:medium;">Add openssl dll</span> |
| style="width: 444px;" | | | style="width: 444px;" | | ||
− | [https://www.dropbox.com/s/ab1yg3xo7e9be89/API-GW-2.0.6.exe?dl=0 API-GW-2.0.6.exe] | + | <span style="font-size:medium;">[https://www.dropbox.com/s/ab1yg3xo7e9be89/API-GW-2.0.6.exe?dl=0 API-GW-2.0.6.exe]</span> |
− | [https://www.dropbox.com/s/4ouyzztxb94mdnd/LoRaMgt_ryx-1.0.2.exe?dl=0 LoRaMgt_ryx-1.0.2.exe] | + | <span style="font-size:medium;">[https://www.dropbox.com/s/4ouyzztxb94mdnd/LoRaMgt_ryx-1.0.2.exe?dl=0 LoRaMgt_ryx-1.0.2.exe]</span> |
− | [https://www.dropbox.com/s/slnv815o5g3o0j4/MQTTBrokerSetup_1.0.3.exe?dl=0 MQTTBrokerSetup_1.0.3.exe] | + | <span style="font-size:medium;">[https://www.dropbox.com/s/slnv815o5g3o0j4/MQTTBrokerSetup_1.0.3.exe?dl=0 MQTTBrokerSetup_1.0.3.exe]</span> |
− | [https://www.dropbox.com/s/s5xtvxty0lcbkel/uartmgr-1.0.3.exe?dl=0 uartmgr-1.0.3.exe] | + | <span style="font-size:medium;">[https://www.dropbox.com/s/s5xtvxty0lcbkel/uartmgr-1.0.3.exe?dl=0 uartmgr-1.0.3.exe]</span> |
|} | |} | ||
[[Category:Pages with broken file links]] | [[Category:Pages with broken file links]] |
Revision as of 11:23, 11 February 2019
Contents
Introduction
An IoT total solution, mainly composed of UTX-3117 gateway/EIS-D210 gateway, RYLR89D Lora demo board and WISE-PaaS.
LoRa GW Solution
Notice:
EdgeSense LoRa GW Solution not support LoRaWAN
Support OS
- Ubuntu 16.04
- Windows 10
Topology:
Gateway Support Lists
Support Node
node type #1
Sensor:Temperature , Humidity , LED x 5 , ADC , Relay x 4 , Input x 4
(NOTE:SW 1.0.0 only support Temperature , Humidity , LED x 5 , ADC)
(NOTE:Relay x 4, Input x4 need to running SW 1.0.1-rc1 above, but not yet testing)
node type #2
Sensor:Temperature , Humidity , CO2
(NOTE:SW 1.0.0 support CO2 , but CO2 sensor not yet testing)
node type #3
Sensor:GPS
(NOTE:This node type and GPS sensor need to running SW 1.0.1-rc1 above, but not yet testing)
Software Stack
How to
Software Requirements
- Driver for USB to UART Bridge Controller , (only Windows need this)
- Microsoft Visual C++ 2015 Redistributable , (only Windows need this)
- MQTT broker
- RMM Agent or EI Agent
- uartmgr
- API-GW
LoRa Module Firmware Upgrade
- Refer to this wiki
LoRa Module setting
After upgrade RYLRxxH mini PCIe board and RYLRxx6 demo board, need to config via AT Command.
Make sure these setting is correct for your environment.
- Firmware Version
- Band
- Address
- Network ID
Firmware Version
- To query Firmware Version , issue AT Command AT+VER? . Then, receive AT Command ex: +VER=RYLRxxP_V0.1.28
Band
- To query Band, issue AT Command AT+BAND? . Then, receive AT Command ex: +BAND=TW
- To change Band, issue AT Command AT+BAND=YOUR_OPTION , ex: AT+BAND=JP
- Detailed option, please see Configuration.
Address
- To query Address, issue AT Command AT+ADDRESS? . Then, receive AT Command ex: +ADDRESS=1
- To change Address, issue AT Command AT+ADDRESS=ADDRESS_YOU_WANT , ex: AT+ADDRESS=23
- Detailed option, please see Configuration.
Network ID
- To query Network ID, issue AT Command AT+NETWORKID? . Then, receive AT Command ex: +NETWORKID=3
- To change Network ID, issue AT Command AT+NETWORKID=NETWORK_ID_YOU_WANT , ex: AT+NETWORKID=5
- Detailed option, please see Configuration.
Software Installation for Windows 10
NOTE: Please wire the gateway to Internet with Network cable before install.
Install Steps
- Install Driver for USB to UART Bridge Controller
- Install Microsoft Visual C++ 2015 Redistributable for x86
- Install MQTT Broker
- Install uartmgr
- Install API-GW
- Install RMM Agent (v3.3.28 above) or EI Agent
- Install LoRaMgt_ryx , edit config, then restart service.
Uninstall Steps
- Select the Start button, then select Settings > Apps. Choose the program you want to remove, and then select Uninstall.
- RMM Agent or EI Agent
- LoRaMgt_ryx
- API-GW
- uartmgr
- MQTT Broker
Software Installation for Ubuntu 16.04
Install Steps
- Install OS - Ubuntu 16.04 (ex: ubuntu-16.04.5-desktop-amd64.iso)
- Copy RMM Agent install package (ex: rmmagent-Ubuntu 16.04.4 LTS x86_64-3.3.23.8242.run) to gateway.
- Copy LoRaMgt_ryx install package (ex: LoRaMgt_ryx-1.0.0-Ubuntu_16.04-x86_64.run) to gateway.
- Copy API-GW install package (ex: API-GW-2.0.6-Ubuntu_16.04-x86_64.run) to gateway.
- Execute "sudo chmod +x LoRaMgt_ryx-1.0.0-Ubuntu_16.04-x86_64.run".
- Execute "sudo ./LoRaMgt_ryx-1.0.0-Ubuntu_16.04-x86_64.run" to install.
- Execute "sudo chmod +x API-GW-2.0.6-Ubuntu_16.04-x86_64.run"
- Execute "sudo ./API-GW-2.0.6-Ubuntu_16.04-x86_64.run" to install
- Execute "sudo chmod +x rmmagent-Ubuntu 16.04.4 LTS x86_64-3.3.23.8242.run".
- Execute "sudo ./rmmagent-Ubuntu 16.04.4 LTS x86_64-3.3.23.8242.run" to install RMM Agent.
Then, it will be installed in gateway.
Installation consist of
- Install LoRa Management for Reyax
- Install RMM agent for RMM 3.3
- Install MQTT broker
- Install Node.js
- Install other library dependencies
- Install Reyax_AT_Command_Demo_Script
After installation, service will be autorun.
NOTE: Please wire the gateway to Internet with Network cable before install, it is necessary to install the dependencies.
Uninstall Steps
- Execute "sudo /usr/local/EdgeSense/LoRaMgt_ryx/uninstall.bash" in terminal.
- Execute "sudo /usr/local/AgentService/uninstall.sh" in terminal to uninstall RMM Agent.
Configuration
In Windows 10
- You can edit C:\Program Files (x86)\Advantech\LoRaMgt_ryx\settings.ini to change setting.
- Once config is changed, please using Windows Services Manager to restart LoRaMgt_ryx service.
In Ubuntu 16.04
- You can edit /usr/local/EdgeSense/LoRaMgt_ryx/settings.ini to change setting.
- You can execute "sudo vi /usr/local/EdgeSense/LoRaMgt_ryx/settings.ini" command in Ubuntu terminal to modify config.
- Also you can use gedit to edit file, command is "sudo gedit /usr/local/EdgeSense/LoRaMgt_ryx/settings.ini"
- Once config is changed , please execute "sudo systemctl restart LoRaMgt_ryx.service" to restart service in order to apply new setting.
Setting File as:
[gateway] [rf] [node-2] |
node_num
- Support maxinum 4 nodes
polling_rate
- range from 5 to 3600 second, default value is 20 second
- If setting is greater than maximum value or is less than minimum value, it will use default value.
band
- option :
- TW - for Taiwan
- JP - for Japan
- KR - for Korea
- US - for US
hostaddr
- Assign address for LoRa Host (LoRa pcie module inside gateway)
- hostaddr is needed to be 1
networkid
- Network ID, default is 0
- NOTE:In firmware RYLRxxP_V0.1.22, range from 0 to 5
- NOTE:In firmware RYLRxxP_V0.2.23 and above, range from 0 to 11
crfop1 / crfop2
- LoRa module power , range from 0 to 15 dBm
addr:
- address for LoRa Node , range from 2 to 65000
notetype:
- nodetype=1 : temperature + humidity + output x 5 + adc + relay x 4 + input x 4
- nodetype=2 : temperature + humidity + co2
- nodetype=3 : GPS
Downlink for sensor
Relay
Node Type#1 have 4 Normally Close type of Relay.
When relay is triggered to On status in WISE-PaaS, relay contact is open.
When relay is triggered to Off status in WISE-PaaS, relay contact is close.
Service control
In Windows
Check if LoRaMgt_ryx service is running:
- Use Service to check status of LoRaMgt_ryx service
Restart LoRaMgt_ryx service:
- Use Service to restart LoRaMgt_ryx service
Start LoRaMgt_ryx service:
- Use Service start LoRaMgt_ryx service
Stop LoRaMgt_ryx service:
- Use Service stop LoRaMgt_ryx service
In Ubuntu
Check if LoRaMgt_ryx service is running:
<span style="font-size:medium;">$ sudo systemctl status LoRaMgt_ryx.service </span>
Restart LoRaMgt_ryx service:
<span style="font-size:medium;">$ sudo systemctl restart LoRaMgt_ryx.service </span>
Start LoRaMgt_ryx service:
<span style="font-size:medium;">$ sudo systemctl start LoRaMgt_ryx.service </span>
Stop LoRaMgt_ryx service:
<span style="font-size:medium;">$ sudo systemctl stop LoRaMgt_ryx.service </span>
Tools
Driver for USB to UART Bridge Controller
In Windows, please use Device Manager to check if Devicer for USB to UART Bridge Controller is installed.
If your Device Manager does not recognize a CP2102 USB to UART Bridge Controller, you have to install its driver.
Please visit https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers and download driver, then install it.
After installing driver, Device Manage will look like this picture
reyaxmon
reyaxmon is a monitor tool that it will show RF setting , gateway setting and sensor value from LoRa nodes. Currently only support Ubuntu 16.04.
Execute following commands to launch reyaxmon tools.
$ cd /usr/local/EdgeSense/LoRaMgt_ryx
$ sudo ./reyaxmon
Reyax AT Command Demo Script
This demo script is a simple bash script, aim to provide a preliminary understanding about Reyax At Command.
This Script only support Ubuntu 16.04.
Script version : 0.3-beta
Support Reyax firmware version : RYLRxxP_V0.1.22
Support Lora Proprietary Command Set : V0.97
Download
- This demo script is available at Reyax-atcmd-demo.bash.tar.gz
- Download the file and upload it to Ubuntu. (Execute "wget http://ess-wiki.advantech.com.tw/wiki/images/4/4b/Reyax-atcmd-demo.bash.tar.gz" in terminal)
- Uncompress the file with command "tar zxfv Reyax-atcmd-demo.bash.tar.gz" , then reyax-atcmd-demo.bash will be ready to use.
Usage
- In Ubuntu Desktop , open two terminals.
- Terminal 1 (Left) , run "sudo cat /dev/ttyUSB0"
- Terminal 2 (Right) , run "sudo ./reyax-atcmd-demo.bash"
- You can enter your choice in the right terminal to issue AT command
- Message from AT Command RX will be shown in the left terminal.
- If you want to change node address , press 0 to enter new node's address.
Restful API
Restful API for get SenHubList
<ServerIP>:3000/restapi/WSNManage/SenHub/AllSenHubList
ex: get Sensor Hub List in Ubuntu Terminal on the gateway
<span style="font-size:medium;">$ curl -H "Content-Type: application/json" -X GET http://127.0.0.1:3000/restapi/WSNManage/SenHub/AllSenHubList</span>
Result:
<span style="font-size:medium;">{"n":"AllSenHubList","sv":"0017000E8C000055"}</span>
Or you can get Sensor Hub List via web browser , enter url such as:
Restful API for Get Sensor Value
<ServerIP>:3000/restapi/WSNManage/SenHub/<DEVID>/SenHub/SenData/<SENSOR>
DEVID: Device ID of LoRa SenHub ( e.g. 0017000E8C000055 )
SENSOR: Temperature / Humidity / ADC / GPIO1/ GPIO2 / GPIO3 / GPIO4 / GPIO5 / Relay1 / Relay2 / Relay3 / Relay4 / SNR / RSSI
ex: get Temperature in Ubuntu Terminal on the gateway
<span style="font-size:medium;">curl -H "Content-Type: application/json" -X GET http://127.0.0.1:3000/restapi/WSNManage/SenHub/0017000E8C000052/SenHub/SenData/Temperature </span>
Result:
<span style="font-size:medium;">{"v":23.5}</span>
Or you can get Temperature from device 0017000E8C000052 via web browser , enter url such as:
ex: get RSSI in Ubuntu Terminal on the gateway
<span style="font-size:medium;">curl -H "Content-Type: application/json" -X GET http://127.0.0.1:3000/restapi/WSNManage/SenHub/0017000E8C000052/SenHub/SenData/RSSI </span>
Result:
<span style="font-size:medium;">{"v":-63}</span>
Debug
Collect LoRa minipcie module command log
Refer to uartmgr wiki.
Check if LoRaMgt_ryx service is running
In Ubuntu ,
<span style="font-size:medium;">$ sudo systemctl status LoRaMgt_ryx.service </span>
In Windows,
<span style="font-size:medium;">Use Service to check status of LoRaMgt_ryx service </span>
Use Case
Release
Index | Version</span> | Date |
Platform |
OS |
Release Note |
Download Link |
1 | 1.0.0 | 2018/08/13 | x86_64 CPU |
Ubuntu 16.04 |
|
LoRaMgt_ryx-1.0.0-Ubuntu_16.04-x86_64.run API-GW-2.0.6-Ubuntu_16.04-x86_64.run RMM 3.3 agent: |
2 | 1.0.1 | 2018/11/27 | x86_64 CPU | Windows 10 |
|
|
3 | 1.0.2 | 2018/12/4 | x86_64 CPU |
Windows 10 |
|