Skip to content

Commit

Permalink
Release 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodmg committed Apr 15, 2018
1 parent 7cfcb15 commit 97e4ed5
Show file tree
Hide file tree
Showing 14 changed files with 164 additions and 110 deletions.
155 changes: 79 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,32 +29,32 @@ This gateway is meant to be as transport agnostic as possible, this allows us to

Currently there are implementations for the [Altair](http://www.aquila.io/en) 802.15.4 development board and for rfm69 915Mhz RF devices with Atmel AVR processors.

- Altair: [Bridge](https://github.com/Rodmg/altair-mqtt-sn-bridge) and [example client template](https://github.com/Rodmg/altair-mqtt-sn-client-example)
- rfm69: [Bridge](https://github.com/Rodmg/rfm-mqtt-sn-bridge) and [example client template](https://github.com/Rodmg/rfm-mqtt-sn-client-example)
* Altair: [Bridge](https://github.com/Rodmg/altair-mqtt-sn-bridge) and [example client template](https://github.com/Rodmg/altair-mqtt-sn-client-example)
* rfm69: [Bridge](https://github.com/Rodmg/rfm-mqtt-sn-bridge) and [example client template](https://github.com/Rodmg/rfm-mqtt-sn-client-example)

## Requirements

- [Node.js](https://nodejs.org/en/) v4.X.X or newer. (Tested with v4.5.0+ and v6.3.1+)
* [Node.js](https://nodejs.org/en/) v4.X.X or newer. (Tested with v4.5.0+ and v6.3.1+)

## Usage

1. Install:
1. Install:

```
npm install -g aquila-gateway bunyan
```
```
npm install -g aquila-gateway bunyan
```

*If you have problems installing, try with:* ``sudo npm install -g aquila-gateway bunyan --unsafe-perm``
_If you have problems installing, try with:_ `sudo npm install -g aquila-gateway bunyan --unsafe-perm`

2. Run a MQTT broker on your PC, for example [Mosca](https://github.com/mcollina/mosca)
2. Run a MQTT broker on your PC, for example [Mosca](https://github.com/mcollina/mosca)

3. Connect the Bridge to the PC and identify which serial port it's connected to
3. Connect the Bridge to the PC and identify which serial port it's connected to

4. Run:
4. Run:

```
aquila-gateway -p <your Bridge serial port> | bunyan
```
```
aquila-gateway -p <your Bridge serial port> | bunyan
```

## Advanced usage

Expand Down Expand Up @@ -90,85 +90,88 @@ aquila-gateway -p /dev/tty.SLAB_USBtoUART -b http://test.mosquitto.org:1883 | bu

## Developement

1. Clone this repository and ``cd`` to the project directory
1. Clone this repository and `cd` to the project directory

2. Install dependencies:
2. Install dependencies:

```
npm install
npm install -g bunyan
```
3. Run a MQTT broker on your PC, for example [Mosca](https://github.com/mcollina/mosca)
```
npm install
npm install -g bunyan
```

4. Connect the Bridge to the PC and identify which serial port it's connected to
3. Run a MQTT broker on your PC, for example [Mosca](https://github.com/mcollina/mosca)

5. Run:
4. Connect the Bridge to the PC and identify which serial port it's connected to

```
./aquila-gateway.js -p <your Bridge serial port> | bunyan
```
5. Build:

## Supported MQTT-SN features
```
npm run build
```

- QoS: supports QoS0, QoS1 and QoS2 (QoS2 implementation between device and gateway is mostly dummy, equivalent to QoS1)
- Commands:
- ADVERTISE
- CONNECT
- CONNACK
- DISCONNECT
- WILLTOPICREQ
- WILLTOPIC
- WILLMSGREQ
- WILLMSG
- REGISTER
- REGACK
- PUBLISH
- PUBACK
- SUBSCRIBE
- SUBACK
- UNSUBSCRIBE
- UNSUBACK
- PINGREQ
- PINGRESP
- WILLTOPICUPD
- WILLMSGUPD
- WILLTOPICRESP
- WILLMSGRESP
- PUBREC, PUBREL, PBCOMP (QoS2)
- SEARCHGW (basic, not spec checked)
- GWINFO (basic, not spec checked)
- Implements Forwarder Encapsulation spec with a little modification: adds lqi and rssi data at the start of the frame.
- Supports topic register
- Supports last will
- Supports and manages disconnect timeout
- Will update
- Subscribe, Unsubscribe
- Retained messages support (issue: when a device subscribes to a topic with a retained message, it will be resent to all devices susbscribed to it, check if it's a problem)
- Sleeping nodes -> message buffering
6. Run:

## TODO
```
./aquila-gateway.js -p <your Bridge serial port> | bunyan
```

- QoS -1
- WILDCARDS support as mqtt-sn spec
- Short and predefined MQTT-SN topics
- QoS 1 and 2 retries
## Supported MQTT-SN features

* QoS: supports QoS0, QoS1 and QoS2 (QoS2 implementation between device and gateway is mostly dummy, equivalent to QoS1)
* Commands:
* ADVERTISE
* CONNECT
* CONNACK
* DISCONNECT
* WILLTOPICREQ
* WILLTOPIC
* WILLMSGREQ
* WILLMSG
* REGISTER
* REGACK
* PUBLISH
* PUBACK
* SUBSCRIBE
* SUBACK
* UNSUBSCRIBE
* UNSUBACK
* PINGREQ
* PINGRESP
* WILLTOPICUPD
* WILLMSGUPD
* WILLTOPICRESP
* WILLMSGRESP
* PUBREC, PUBREL, PBCOMP (QoS2)
* SEARCHGW (basic, not spec checked)
* GWINFO (basic, not spec checked)
* Implements Forwarder Encapsulation spec with a little modification: adds lqi and rssi data at the start of the frame.
* Supports topic register
* Supports last will
* Supports and manages disconnect timeout
* Will update
* Subscribe, Unsubscribe
* Retained messages support (issue: when a device subscribes to a topic with a retained message, it will be resent to all devices susbscribed to it, check if it's a problem)
* Sleeping nodes -> message buffering

## TODO Long-term
## TODO

- Port to ES6?
* QoS -1
* WILDCARDS support as mqtt-sn spec
* Short and predefined MQTT-SN topics
* QoS 1 and 2 retries

## In progress
- Advanced device management: implement predefined Gateway topics for getting info of connected devices, events etc. (non MQTT-SN standard, implement as module) (Preliminar API implemented)
- ~~Device pairing management (Transport dependent)~~ (DONE for Altair and rfm69)
- ~~Support other Forwarder software transports: TCP socket (for using an [ESPino](http://www.espino.io/en) or similar as forwarder)~~ (TCP transport Done, experimental)

* Advanced device management: implement predefined Gateway topics for getting info of connected devices, events etc. (non MQTT-SN standard, implement as module) (Preliminar API implemented)
* ~~Device pairing management (Transport dependent)~~ (DONE for Altair and rfm69)
* ~~Support other Forwarder software transports: TCP socket (for using an [ESPino](http://www.espino.io/en) or similar as forwarder)~~ (TCP transport Done, experimental)

## Not supported

- 3 byte MQTT-SN header
* 3 byte MQTT-SN header

## TOTEST

- Check if parser on willtopicupd accept empty flags and topic (for removing will)
- Will update
- Make sure that buffered messages are sent in order (database dependent, check what lokijs does now)
* Check if parser on willtopicupd accept empty flags and topic (for removing will)
* Will update
* Make sure that buffered messages are sent in order (database dependent, check what lokijs does now)
2 changes: 1 addition & 1 deletion dist/CrcUtils.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/Forwarder.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/Gateway.js.map

Large diffs are not rendered by default.

53 changes: 37 additions & 16 deletions dist/GatewayDB.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/GatewayDB.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 97e4ed5

Please sign in to comment.