Difference between revisions of "Uartmgr"
(.) |
(.) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
= How to = | = How to = | ||
+ | |||
+ | == Software Requirements == | ||
+ | |||
+ | *MQTT broker | ||
== Installation == | == Installation == | ||
Line 25: | Line 29: | ||
Execute command in terminal: | Execute command in terminal: | ||
− | <pre> $sudo /usr/local/EdgeSense/uartmgr/uninstall.bash | + | <pre>$ sudo /usr/local/EdgeSense/uartmgr/uninstall.bash |
</pre> | </pre> | ||
'''In Windows''' | '''In Windows''' | ||
− | * Select the Start button, then select Settings > Apps. Choose the uartmgr program, and then select Uninstall. | + | *Select the Start button, then select Settings > Apps. Choose the uartmgr program, and then select Uninstall. |
== Configuration == | == Configuration == | ||
− | + | '''In Ubuntu''' | |
+ | |||
+ | Edit config file /usr/local/EdgeSense/uartmgr/settings.ini to change setting: | ||
+ | <pre>$ sudo vi /usr/local/EdgeSense/uartmgr/settings.ini | ||
+ | </pre> | ||
+ | |||
+ | '''In Windows''' | ||
+ | |||
+ | *Edit config file C:\Program Files (x86)\Advantech\LoRaMgt_ryx\settings.ini to change setting. | ||
+ | |||
+ | '''Notice:''' | ||
+ | |||
+ | Once config is changed, need to restart service in order to apply new setting. | ||
+ | |||
+ | '''Config''' | ||
+ | |||
+ | {| border="1" cellspacing="1" cellpadding="1" style="width:500px;" | ||
+ | |- | ||
+ | | [Platform]<br/>SerialPort=ttyUSB0<br/>BaudRate=115200<br/>SerialMode=8N1<br/>TX_write_sleep=50<br/>MQTT_HostName=localhost<br/>MQTT_Port=1883<br/>MQTT_UserName=<br/>MQTT_Password=<br/> | ||
+ | |} | ||
+ | |||
+ | SerialPort | ||
+ | |||
+ | *Assign UART device | ||
+ | *In Linux, assign to ttyS1 or ttyUSB0 for example. | ||
+ | *In Windows, assign to COM3 for example. | ||
+ | |||
+ | BaudRate | ||
+ | |||
+ | SerialMode | ||
+ | |||
+ | TX_write_sleep | ||
+ | |||
+ | MQTT_HostName | ||
+ | |||
+ | MQTT_Port | ||
+ | |||
+ | MQTT_UserName | ||
+ | |||
+ | MQTT_Password | ||
+ | |||
+ | |||
== Service control == | == Service control == | ||
Line 60: | Line 105: | ||
Check if uartmgr service is running: | Check if uartmgr service is running: | ||
− | *Use | + | *Use Windows Services Manager to check status of uartmgr service |
Restart uartmgr service: | Restart uartmgr service: | ||
− | *Use | + | *Use Windows Services Manager to restart uartmgr service |
Start uartmgr service: | Start uartmgr service: | ||
− | *Use | + | *Use Windows Services Manager start uartmgr service |
Stop uartmgr service: | Stop uartmgr service: | ||
− | *Use | + | *Use Windows Services Manager stop uartmgr service |
== Monitor UART transaction online == | == Monitor UART transaction online == | ||
Line 96: | Line 141: | ||
'''<span style="font-size:larger;">In Windows,</span>''' | '''<span style="font-size:larger;">In Windows,</span>''' | ||
− | + | ||
− | + | Log files are available at C:\Program Files (x86)\Advantech\uartmgr\logs | |
+ | |||
+ | |||
= Release = | = Release = |
Latest revision as of 08:33, 19 November 2018
Contents
Introduction
A daemon can handle asynchronous UART I/O, based on MQTT protocol to read from UART or write to UART.
Support OS
- Ubuntu 16.04
- Windows 10
Topology
Under Construction
How to
Software Requirements
- MQTT broker
Installation
In Ubuntu
In Windows
Uninstallation
In Ubuntu
Execute command in terminal:
$ sudo /usr/local/EdgeSense/uartmgr/uninstall.bash
In Windows
- Select the Start button, then select Settings > Apps. Choose the uartmgr program, and then select Uninstall.
Configuration
In Ubuntu
Edit config file /usr/local/EdgeSense/uartmgr/settings.ini to change setting:
$ sudo vi /usr/local/EdgeSense/uartmgr/settings.ini
In Windows
- Edit config file C:\Program Files (x86)\Advantech\LoRaMgt_ryx\settings.ini to change setting.
Notice:
Once config is changed, need to restart service in order to apply new setting.
Config
[Platform] SerialPort=ttyUSB0 BaudRate=115200 SerialMode=8N1 TX_write_sleep=50 MQTT_HostName=localhost MQTT_Port=1883 MQTT_UserName= MQTT_Password= |
SerialPort
- Assign UART device
- In Linux, assign to ttyS1 or ttyUSB0 for example.
- In Windows, assign to COM3 for example.
BaudRate
SerialMode
TX_write_sleep
MQTT_HostName
MQTT_Port
MQTT_UserName
MQTT_Password
Service control
In Ubuntu
Check if uartmgr service is running:
$ sudo systemctl status uartmgr.service
Restart uartmgr service:
$ sudo systemctl restart uartmgr.service
Start uartmgr service:
$ sudo systemctl start uartmgr.service
Stop uartmgr service:
$ sudo systemctl stop uartmgr.service
In Windows
Check if uartmgr service is running:
- Use Windows Services Manager to check status of uartmgr service
Restart uartmgr service:
- Use Windows Services Manager to restart uartmgr service
Start uartmgr service:
- Use Windows Services Manager start uartmgr service
Stop uartmgr service:
- Use Windows Services Manager stop uartmgr service
Monitor UART transaction online
In Ubuntu ,
$ mosquitto_sub -h localhost -t /uartmgr/# -v
In Windows,
cd C:\"Program Files (x86)\Advantech\MQTTBroker" mosquitto_sub -h localhost -t /uartmgr/# -v
Display UART transaction log
In Ubuntu ,
$ cat /var/log/syslog | grep -a uartmgr
In Windows,
Log files are available at C:\Program Files (x86)\Advantech\uartmgr\logs