LoRa-BLE-Sensor
Loading...
Searching...
No Matches
ble_lorawan_service.h
Go to the documentation of this file.
1
13#ifndef BLE_LORAWAN_SERVICE_H
14#define BLE_LORAWAN_SERVICE_H
15
16#include "sensor_lorawan.h"
17
18/*
19
20- Service LORAWAN
21- lorawan_dev_eui
22- lorawan_app_eui
23- lorawan_net_key
24- lorawan_connection_status
25- lorawan_transmission_frequency
26- lorawan_time_since_last_transmission
27- lorawan_number_of_attempts_for_tranmissions
28- lorawan_last_transmission_status
29- lorawan_last_transmission_data
30- lorawan_current_process
31- lorawan_commands
32
33To-Do
34- Add callbacks for write operations to have other funcitons store the data
35
36*/
37
38
39/* Define the UUIDs for the LORAWAN service */
40#define BT_UUID_LORAWAN_VAL BT_UUID_128_ENCODE(0x5a8cd4ac, 0x1520, 0x4c9d, 0xb488, 0x12942c26af40)
41#define BT_UUID_LORAWAN_ENABLED_VAL BT_UUID_128_ENCODE(0x5a8cd4ac, 0x1520, 0x4c9d, 0xb488, 0x12942c26af41)
42#define BT_UUID_LORAWAN_FREQUENCY_VAL BT_UUID_128_ENCODE(0x5a8cd4ac, 0x1520, 0x4c9d, 0xb488, 0x12942c26af42)
43#define BT_UUID_LORAWAN_DEV_EUI_VAL BT_UUID_128_ENCODE(0x5a8cd4ac, 0x1520, 0x4c9d, 0xb488, 0x12942c26af43)
44#define BT_UUID_LORAWAN_JOIN_EUI_VAL BT_UUID_128_ENCODE(0x5a8cd4ac, 0x1520, 0x4c9d, 0xb488, 0x12942c26af44)
45#define BT_UUID_LORAWAN_APP_KEY_VAL BT_UUID_128_ENCODE(0x5a8cd4ac, 0x1520, 0x4c9d, 0xb488, 0x12942c26af45)
46
47#define BT_UUID_LORAWAN BT_UUID_DECLARE_128(BT_UUID_LORAWAN_VAL)
48#define BT_UUID_LORAWAN_ENABLED BT_UUID_DECLARE_128(BT_UUID_LORAWAN_ENABLED_VAL)
49#define BT_UUID_LORAWAN_FREQUENCY BT_UUID_DECLARE_128(BT_UUID_LORAWAN_FREQUENCY_VAL)
50#define BT_UUID_LORAWAN_DEV_EUI BT_UUID_DECLARE_128(BT_UUID_LORAWAN_DEV_EUI_VAL)
51#define BT_UUID_LORAWAN_JOIN_EUI BT_UUID_DECLARE_128(BT_UUID_LORAWAN_JOIN_EUI_VAL)
52#define BT_UUID_LORAWAN_APP_KEY BT_UUID_DECLARE_128(BT_UUID_LORAWAN_APP_KEY_VAL)
53
54
62
63#endif
int ble_lorawan_service_init(lorawan_setup_t *setup)
Connect LoRaWAN setup configuration to LoRaWAN BLE Service.
Definition ble_lorawan_service.c:246
This is a library to handle the LoRaWAN functionality for the sensor.
Structure to hold the LoRaWAN setup, used to join the network.
Definition sensor_lorawan.h:24