Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Daisuke Baba committed Mar 12, 2019
2 parents 583f361 + 31b8fe0 commit 8324516
Show file tree
Hide file tree
Showing 16 changed files with 2,407 additions and 1,918 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
node_js:
- 6.14.1
- 8.11.1
- "8"
- "10"
python:
- 2.7

Expand Down
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The bundled example flow includes the following operations:
- Getting LED on/off command results
- Showing temperature data from remote motes
- Showing SmartMesh network event notifications
- Sending a binary data packet to a remote mote

![Example flow](images/example-flow-working.jpg)

Expand Down Expand Up @@ -51,6 +52,54 @@ See [SmartMesh IP™ Tools Guide(PDF)](http://cds.linear.com/docs/en/software-an

For Windows users, use Docker or Linux box VM to start Node-RED in order to install this node.

# How to change Network ID

In order to change the current Network ID, run the following command manually with the SmartMesh IP Manager CLI. Note that you need to have all motes to join the current network so that the change takes effect to all the connecting motes as well as the IP Manager.

```
# Connect to the SmartMesh IP USB Manager CLI serial port
$ screen /dev/DC2274A-A.CLI 9600
> login user
> sm
MAC MoteId State Nbrs Links Joins Age StateTime
00-11-22-00-00-11-22-33 1 Oper 2 22 1 0 0-00:17:57
00-11-22-00-00-11-22-44 2 Oper 2 10 1 4 0-00:16:09
00-11-22-00-00-11-22-55 3 Oper 2 10 1 5 0-00:16:13
Number of motes (max 101): Total 3, Live 3, Joining 0 Blink 0
# Assume that you're changing the Network ID to 1234.
> exec exchNetId 1234
Start Global Unicast Command exchNetId
# Restart a remote mote by providing MoteId (shown above list)
# You can turn it off then on rather than the following command.
> reset mote 2
> reset mote 3
# Restart the manager itself
> reset system
# Login again
> login user
# Show the renewed Network ID
> minfo
Net stack 1.4.1.10
state: Oper
mac: 00:17:0d:00:00:58:62:55
moteid: 1
netid: 1234
blSwVer: 15
ldrSwVer: 0.0.0.0
board id/rev:0x7/0x7
UTC time: 1025666424.260 sec
reset st: 400
battery: 3295 mV
temp: 22 C
```

## Node-RED users

Run the following commands:
Expand Down Expand Up @@ -113,6 +162,14 @@ $ NODE_ENV=development npm pack
```

# Revision History
* 2.0.0
- Raw data packet is supported as well as OAP.
- Add a logging configuration file for Python process
- The output object structure is modified as of the release. No backward compatibility with 1.x. The changes are as follows.
- `timestamp` value is now ISO 8601 date string rather than the unix timestamp.
- `received_timestamp` property is gone, use `timestamp` property instead.
- `packet_timestamp` value is now ISO 8601 date string rather than the int array.

* 1.1.0
- Remove shrinkwrap file
- Fix an issue where an error was swallowed on receiving 'close' event
Expand Down
3 changes: 2 additions & 1 deletion deps/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Python Files depending on SmartMesh SDK

1. path_hack.py ... A script to inject runtime additional dependencies
1. smsdk_install_verifier.py ... A script for verifying SmartMesh SDK installation
1. oapclient_proxy.py files ... OAP Client Proxy code
1. protocol_client_proxy.py files ... Multiple Protocol Client Proxy code
1. logging.conf ... The logging configuration file
177 changes: 177 additions & 0 deletions deps/python/logging.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@

# Assumed the following are passed in logging.config.fileConfig():
# - 'logfilename': a string to the path of the log file to write.

#============================ formatters ======================================

[formatters]
keys = std,console

[formatter_std]
format = %(asctime)s [%(name)s:%(levelname)s] %(message)s
datefmt =

[formatter_console]
format = %(asctime)s %(levelname)s %(message)s
datefmt = %H:%M:%S

#============================ handlers ========================================

[handlers]
keys = std,console

[handler_std]
class = handlers.RotatingFileHandler
args = ('%(logfilename)s', 'a', 2000000, 5)
formatter = std

[handler_console]
class = StreamHandler
args = ()
formatter = console

#============================ loggers =========================================

[loggers]
keys = root,App,otap_communicator,DustCli,dustFrameBrowse,ApiConnector,ApiDefinition,ByteArraySerializer,HartManager,LatencyCalculator,IpMgrConnectorSerial,IpMoteConnectorInternal,LbrConnector,ReliableCmd,RateCalculator,Crc,Hdlc,SerialConnector,DC2126AConverters,OTAPCommunicator,xivelyPublisher,SmartMesh_Node

[logger_root]
level = INFO
handlers = std

#===== applications

[logger_App]
level = ERROR
handlers = std
propagate = 0
qualname = App

[logger_otap_communicator]
level = ERROR
handlers = std
propagate = 0
qualname = otap_communicator

#===== views

[logger_DustCli]
level = ERROR
handlers = std
propagate = 0
qualname = DustCli

[logger_dustFrameBrowse]
level = ERROR
handlers = std
propagate = 0
qualname = dustFrameBrowse

#===== SmartMeshSDK

[logger_ApiConnector]
level = ERROR
handlers = std
propagate = 0
qualname = ApiConnector

[logger_ApiDefinition]
level = ERROR
handlers = std
propagate = 0
qualname = ApiDefinition

[logger_ByteArraySerializer]
level = ERROR
handlers = std
propagate = 0
qualname = ByteArraySerializer

[logger_HartManager]
level = ERROR
handlers = std
propagate = 0
qualname = HartManager

[logger_LatencyCalculator]
level = ERROR
handlers = std
propagate = 0
qualname = LatencyCalculator

[logger_IpMgrConnectorSerial]
level = ERROR
handlers = std
propagate = 0
qualname = IpMgrConnectorSerial

[logger_IpMoteConnectorInternal]
level = ERROR
handlers = std
propagate = 0
qualname = IpMoteConnectorInternal

[logger_LbrConnector]
level = ERROR
handlers = std
propagate = 0
qualname = LbrConnector


[logger_ReliableCmd]
level = ERROR
handlers = std
propagate = 0
qualname = ReliableCmd

[logger_RateCalculator]
level = ERROR
handlers = std
propagate = 0
qualname = RateCalculator

[logger_Crc]
level = ERROR
handlers = std
propagate = 0
qualname = Crc

[logger_Hdlc]
level = ERROR
handlers = std
propagate = 0
qualname = Hdlc

[logger_SerialConnector]
level = ERROR
handlers = std
propagate = 0
qualname = SerialConnector

#===== SmartMeshSDK/protocols

[logger_DC2126AConverters]
level = ERROR
handlers = std
propagate = 0
qualname = DC2126AConverters

[logger_OTAPCommunicator]
level = ERROR
handlers = std
propagate = 0
qualname = OTAPCommunicator

[logger_xivelyPublisher]
level = ERROR
handlers = std
propagate = 0
qualname = xivelyPublisher

#===== SmartMesh Proxy

[logger_SmartMesh_Node]
level = INFO
handlers = console
propagate = 0
qualname = SmartMesh_Node
2 changes: 1 addition & 1 deletion deps/python/path_hack.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2018 CANDY LINE INC.
# Copyright (c) 2019 CANDY LINE INC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 8324516

Please sign in to comment.