Demo program for LoRaWan with data formated for cayenne interface on mydevices.com Check on https://goo.gl/fTUDNc

Dependencies:   Cayenne-LPP

Demonstration d'un node LoRaWan sur carte : Discovery IOT STmicro : B-L072Z-LRWAN1 https://www.st.com/en/evaluation-tools/b-l072z-lrwan1.html

L e code original MBED-ARM : https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-lorawan/ est une application de l'API LoRAWan https://os.mbed.com/docs/v5.9/reference/lorawan.html

Le code original a été adapté pour une carte B-L072Z-LRWAN1 équipée d'un capteur de température LM35 connecté en 3.3v sur le port PA_0 (port analogique AN0) Les données sont formatées "cayenne" et visualisables sur mydevices.com ( https://goo.gl/fTUDNc ) Documentation cayenne : https://mydevices.com/cayenne/docs/lora/#lora-cayenne-low-power-payload

Les essais ont été réalisés avec une passerelle TTN https://www.thethingsnetwork.org/ le "Payload Format" ayant été configuré pour "Cayenne LPP"

Des capteurs virtuels on été également ajoutés (humidité, température, lumière, etc...) pour les essais au format cayenne.

Données physiques transmises (downlink)

- Température sur capteur LM35 - Tension sur PA_1 (AN1) est transmise entre 0% et 100% - Etat du bouton bleu

Données physiques reçues (uplink) Un actionneur permet d'allumer/eteindre à distance la led verte de la carte B-L072Z-LRWAN1

L'interface mydevice.com proposé permet de visualiser :

- Les capteurs virtuels - La température réelle sur LM35 - L'état du bouton bleu

/media/uploads/cdupaty/cayenne_mydevice.jpg

/media/uploads/cdupaty/ex_terminal-lorawan.jpg

Committer:
cdupaty
Date:
Thu Nov 29 07:48:18 2018 +0000
Revision:
43:74226f6ca42c
Parent:
36:08d94248181b
Demo with LM52 captor on analog A0.; Data formated for cayenne (mydevices.com); Led green (LED1) on B-L072Z-LRWAN1 flash when data reception

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:7037ed05f54f 1 /**
mbed_official 33:3776745e4d93 2 * Copyright (c) 2017, Arm Limited and affiliates.
mbed_official 33:3776745e4d93 3 * SPDX-License-Identifier: Apache-2.0
mbed_official 0:7037ed05f54f 4 *
mbed_official 33:3776745e4d93 5 * Licensed under the Apache License, Version 2.0 (the "License");
mbed_official 33:3776745e4d93 6 * you may not use this file except in compliance with the License.
mbed_official 33:3776745e4d93 7 * You may obtain a copy of the License at
mbed_official 0:7037ed05f54f 8 *
mbed_official 33:3776745e4d93 9 * http://www.apache.org/licenses/LICENSE-2.0
mbed_official 0:7037ed05f54f 10 *
mbed_official 33:3776745e4d93 11 * Unless required by applicable law or agreed to in writing, software
mbed_official 33:3776745e4d93 12 * distributed under the License is distributed on an "AS IS" BASIS,
mbed_official 33:3776745e4d93 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbed_official 33:3776745e4d93 14 * See the License for the specific language governing permissions and
mbed_official 33:3776745e4d93 15 * limitations under the License.
mbed_official 0:7037ed05f54f 16 */
mbed_official 0:7037ed05f54f 17
mbed_official 0:7037ed05f54f 18 #ifndef MBEDTLS_LORA_CONFIG_H
mbed_official 0:7037ed05f54f 19 #define MBEDTLS_LORA_CONFIG_H
mbed_official 0:7037ed05f54f 20
mbed_official 33:3776745e4d93 21 /*
mbed_official 33:3776745e4d93 22 * Configure mbedtls for LoRa stack.
mbed_official 0:7037ed05f54f 23 *
mbed_official 33:3776745e4d93 24 * These settings are just a customization of the main mbedtls config
mbed_official 33:3776745e4d93 25 * mbed-os/features/mbedtls/inc/mbedtls/config.h
mbed_official 0:7037ed05f54f 26 */
mbed_official 0:7037ed05f54f 27
mbed_official 33:3776745e4d93 28 // Ensure LoRa required ciphers are enabled
mbed_official 33:3776745e4d93 29 #define MBEDTLS_CIPHER_C
mbed_official 0:7037ed05f54f 30 #define MBEDTLS_AES_C
mbed_official 0:7037ed05f54f 31 #define MBEDTLS_CMAC_C
mbed_official 0:7037ed05f54f 32
mbed_official 33:3776745e4d93 33 // Reduce ROM usage by optimizing some mbedtls features.
mbed_official 33:3776745e4d93 34 // These are only reference configurations for this LoRa example application.
mbed_official 33:3776745e4d93 35 // Other LoRa applications might need different configurations.
mbed_official 33:3776745e4d93 36 #define MBEDTLS_AES_FEWER_TABLES
mbed_official 36:08d94248181b 37
mbed_official 33:3776745e4d93 38 #undef MBEDTLS_GCM_C
mbed_official 36:08d94248181b 39 #undef MBEDTLS_CHACHA20_C
mbed_official 36:08d94248181b 40 #undef MBEDTLS_CHACHAPOLY_C
mbed_official 36:08d94248181b 41 #undef MBEDTLS_POLY1305_C
mbed_official 0:7037ed05f54f 42
mbed_official 0:7037ed05f54f 43 #endif /* MBEDTLS_LORA_CONFIG_H */