Skip to content

Commit

Permalink
Updated package.json for supporting global npm install, updated readm…
Browse files Browse the repository at this point in the history
…e accordingly
  • Loading branch information
Rodmg committed Oct 22, 2016
1 parent 71f174c commit 4ca9c95
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 17 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
@@ -1,3 +0,0 @@
[submodule "lib/mqttsn-packet"]
path = lib/mqttsn-packet
url = https://github.com/Rodmg/mqttsn-packet.git
44 changes: 32 additions & 12 deletions README.md
Expand Up @@ -34,34 +34,34 @@ Currently there are implementations for the [Altair](http://www.aquila.io/en) 80

## 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. Clone this repository and ``cd`` to the project directory

2. Install dependencies:
1. Install:

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

4. Connect the Bridge to the PC and identify which serial port it's connected to
*If you have problems installing, try with:* ``sudo npm install -g aquila-gateway bunyan --unsafe-perm``

5. Run:
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

4. Run:

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

## Advanced usage

Get help:

```
./aquila-gateway.js -h
aquila-gateway -h
```

```
Expand All @@ -83,9 +83,29 @@ Usage: aquila-gateway [options]
Connect to a remote broker (example):

```
./aquila-gateway.js -p /dev/tty.SLAB_USBtoUART -b http://test.mosquitto.org:1883 | bunyan
aquila-gateway -p /dev/tty.SLAB_USBtoUART -b http://test.mosquitto.org:1883 | bunyan
```

## Developement

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

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)

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

5. Run:

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

## Supported MQTT-SN features

- QoS: supports QoS0, QoS1 and QoS2 (QoS2 implementation between device and gateway is mostly dummy, equivalent to QoS1)
Expand Down
1 change: 0 additions & 1 deletion lib/mqttsn-packet
Submodule mqttsn-packet deleted from a7fc31
9 changes: 8 additions & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "aquila-gateway",
"version": "0.4.1",
"version": "0.4.2",
"description": "MQTT-SN Gateway (Serial MQTT-SN to MQTT bridge)",
"main": "aquila-gateway.js",
"scripts": {
Expand All @@ -24,5 +24,12 @@
"repository": {
"type": "git",
"url": "https://github.com/Rodmg/aquila-mqtt-sn-gateway"
},
"engines": {
"node" : ">=4.5.0"
},
"preferGlobal": "true",
"bin": {
"aquila-gateway": "aquila-gateway.js"
}
}

0 comments on commit 4ca9c95

Please sign in to comment.