Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lora doc to getting-started.md #529

Merged
merged 9 commits into from
Jan 8, 2019
Merged

Add lora doc to getting-started.md #529

merged 9 commits into from
Jan 8, 2019

Conversation

manuio
Copy link
Contributor

@manuio manuio commented Dec 28, 2018

Signed-off-by: Manuel Imperiale manuel.imperiale@gmail.com

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
@codecov-io
Copy link

codecov-io commented Dec 28, 2018

Codecov Report

Merging #529 into master will decrease coverage by 0.22%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #529      +/-   ##
==========================================
- Coverage   87.28%   87.05%   -0.23%     
==========================================
  Files          53       53              
  Lines        2642     2642              
==========================================
- Hits         2306     2300       -6     
- Misses        226      231       +5     
- Partials      110      111       +1
Impacted Files Coverage Δ
ws/api/transport.go 80% <0%> (-7.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea19936...ce4e863. Read the comment docs.

@manuio manuio requested a review from drasko December 28, 2018 17:51
@@ -346,6 +346,83 @@ The most of the notifications received from the Adapter are non-confirmable. By

CoAP Adapter sends these notifications every 12 hours. To configure this period, please check [adapter documentation](../coap/README.md) If the client is no longer interested in receiving notifications, the second scenario described above can be used to unsubscribe

### LoRa

Before to run the Mainflux lora-adapter you must install and run a [LoRa Server](https://www.loraserver.io/loraserver/overview). Execute the following command from LoRa Server project root:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to Before running Mainflux lora-adapter.... Also, following command doesn't have to be executed from LoRa Server project root, because there shouldn't be one before executing go get.


```

The Mainflux lora-adapter can do the bridge between both systems. Basically, the service subscribe to the LoRa Gateway Bridge(https://www.loraserver.io/lora-gateway-bridge/overview/), an mqtt broker that receive UDP messages from the SemTech packet-forwarder. You must configure the docker-compose.yml with the address of your LoRa Server Network, otherwise the composition will fail:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to:

The Mainflux lora-adapter can do bridging between both systems. Basically, the service subscribes to the LoRa Gateway Bridge (https://www.loraserver.io/lora-gateway-bridge/overview/), MQTT bridge that receives UDP messages from SemTech packet-forwarder. You must configure docker-compose.yml with the address of your LoRa Server Network, otherwise the composition will fail:

```

At this point Mainflux and LoRa Server are running. To provision the LoRa Server with Networks, Organizations, Gateways, Applications and Devices
you have to implement the gRPC API. Over the LoRa Server UI, which is precisely a good example of the gRPC API implementation, you can do it as well.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...which is good example...


#### LoRa Server setup
- **Create Organization:** To add your own Gateways to the network you must have an Organization.
- **Add Network LoRa Server:** Set the address of your LoRa Server where the [LoRa-Gateways-Bridge](https://www.loraserver.io/lora-gateway-bridge/overview) of brocaar will forward messages over MQTT.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...where the LoRa-Gateway-Bridge will forward...

- **Create a Service-profile:** A service-profile connects an organization to a network-server and defines the features that an organization can use on this Network-Server.
- **Create a Gateway:** You must set proper ID in order to be discovered by LoRa Server.
- **Create a LoRa Server Application:** You can then create Devices by connecting them to this application. This is equivalent to Devices connected to channels in Mainflux.
- **Create a Device-Profile:** Before to create to Device you must create Device profile where you will define some parameter as LoRaWAN MAC version (format of the device address) and the LoRaWAN regional parameter (frequency band). This will allow you to create many devices using this profile.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before creating Device you must create Device profile...

- **Create a Gateway:** You must set proper ID in order to be discovered by LoRa Server.
- **Create a LoRa Server Application:** You can then create Devices by connecting them to this application. This is equivalent to Devices connected to channels in Mainflux.
- **Create a Device-Profile:** Before to create to Device you must create Device profile where you will define some parameter as LoRaWAN MAC version (format of the device address) and the LoRaWAN regional parameter (frequency band). This will allow you to create many devices using this profile.
- **Create a Device:** Then you can create a Device. To must configure the `network session key` and `application session key` of your Device. You can generate and copy them on your device configuration or you can use your own pre generated keys and set them from the UI.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...and set them using UI.


```

This service uses RedisDB to create a route map between both systems. As in Mainflux we use Channels to connect Things, LoRa Serser uses Applications to connect Devices. Route map create a mapping of applications ID with channels ID and Devices EUI with things ID. The lora-adapter uses the matadata of provision events emitted by mainflux-things service to update the route map. For that, you must provision Mainflux Channels and Things with an extra metadata key in the JSON Body of the HTTP request. It must be a JSON object with keys `type` and `appID` or `devEUI`. In this case `type` must be `lora`, `appID` and `devEUI` must be an existent Lora application ID and device EUI:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix LoRa Server, also Route map creates a mapping of.... Fix fourth sentence Lora-adapter uses metadata from provisioning events emitted by...

}
```

To receive Lora messages the lora-adapter subscribes to the topic `applications/+/devices/+` of the LoRa Server. The [LoRa-Gateways-Bridge](https://www.loraserver.io/lora-gateway-bridge/overview) uses the same topic to publish decoded messages received from gateways as UDP packets. The lora-adapter verify the applicationID and the deviceEUI of published message and if they are known it forwards the message on the Mainflux NATS broker as corresponding channel and thing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoRa-Gateway-Bridge. The lora-adapter verifies the applicationID and....

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
drasko
drasko previously approved these changes Dec 30, 2018
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Copy link
Contributor

@anovakovic01 anovakovic01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

anovakovic01
anovakovic01 previously approved these changes Dec 31, 2018
Copy link
Contributor

@anovakovic01 anovakovic01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@anovakovic01 anovakovic01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@anovakovic01 anovakovic01 merged commit 7a3d7fa into master Jan 8, 2019
@manuio manuio deleted the manuio-patch-3 branch January 8, 2019 11:53
juanmagal pushed a commit to juanmagal/mainflux that referenced this pull request Feb 5, 2019
* Add lora doc to getting-started.md

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Typo fix 

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix doc

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Add missing components doc to architecture.md (absmach#531)

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix doc

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
davide83 pushed a commit to davide83/mainflux that referenced this pull request May 13, 2019
* Add lora doc to getting-started.md

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Typo fix 

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix doc

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Add missing components doc to architecture.md (absmach#531)

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix doc

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
manuio added a commit that referenced this pull request Oct 12, 2020
* Add lora doc to getting-started.md

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Typo fix 

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix doc

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Add missing components doc to architecture.md (#531)

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix doc

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants