1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/net: add netopt options for lorawan

This commit is contained in:
Alexandre Abadie 2017-09-11 16:50:09 +02:00
parent 90e8da0a9b
commit 7b8612b38d
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 85 additions and 1 deletions

View File

@ -68,6 +68,7 @@ typedef enum {
* Ethernet | 6 | device MAC address
* nrfmin | 2 | device short address
* CC110x | 1 | device address
* LoRaWAN | 4 | device address
*/
NETOPT_ADDRESS,
@ -79,6 +80,7 @@ typedef enum {
* IEEE 802.15.4 | 8 | device long address (EUI-64), @ref eui64_t
* nrfmin | 8 | device long address (based on short address)
* BLE | 8 | device long address (EUI-64), @ref eui64_t
* LoRaWAN | 8 | Device EUI
*/
NETOPT_ADDRESS_LONG,
/**
@ -92,7 +94,8 @@ typedef enum {
/**
* @brief (uint16_t) network ID
*
* Examples for this include the PAN ID in IEEE 802.15.4
* Examples for this include the PAN ID in IEEE 802.15.4 and netid in
* LoRaWAN (uint32_t in this case)
*/
NETOPT_NID,
@ -574,6 +577,74 @@ typedef enum {
*/
NETOPT_PHY_BUSY,
/**
* @brief (uint8_t*) LoRaWAN application EUI (8 bytes length)
*/
NETOPT_LORAWAN_APPEUI,
/**
* @brief (uint8_t*) LoRaWAN application key (16 bytes length)
*/
NETOPT_LORAWAN_APPKEY,
/**
* @brief (uint8_t*) LoRaWAN network session key (16 bytes length)
*/
NETOPT_LORAWAN_NWKSKEY,
/**
* @brief (uint8_t*) LoRaWAN application session key (16 bytes length)
*/
NETOPT_LORAWAN_APPSKEY,
/**
* @brief (uint8_t) LoRaWAN device class (A, B, C)
* - LoRaWAN: @ref loramac_class_t
*/
NETOPT_LORAWAN_DEVICE_CLASS,
/**
* @brief (uint8_t) LoRaWAN datarate
* - LoRaWAN: @ref loramac_dr_idx_t
*/
NETOPT_LORAWAN_DR,
/**
* @brief (@ref netopt_enable_t) LoRaWAN adaptive datarate
*/
NETOPT_LORAWAN_ADR,
/**
* @brief (@ref netopt_enable_t) LoRaWAN public network
*/
NETOPT_LORAWAN_PUBLIC_NETWORK,
/**
* @brief (uint8_t) LoRaWAN TX application port
* - LoRaWAN: between 1 and 223 (included)
*/
NETOPT_LORAWAN_TX_PORT,
/**
* @brief (loramac_dr_idx_t) LoRaWAN datarate for second RX window
* - LoRaWAN: @ref loramac_dr_idx_t
*/
NETOPT_LORAWAN_RX2_DR,
/**
* @brief (uint32_t) LoRaWAN frequency used for second RX window
*/
NETOPT_LORAWAN_RX2_FREQ,
/**
* @brief (uint32_t) LoRaWAN maximum system overall timing error (ms)
*/
NETOPT_LORAWAN_MAX_RX_ERROR,
/**
* @brief (uint8_t) LoRaWAN maximum system overall timing error (symbols)
*/
NETOPT_LORAWAN_MIN_RX_SYMBOL,
/* add more options if needed */
/**

View File

@ -93,6 +93,19 @@ static const char *_netopt_strmap[] = {
[NETOPT_BLE_CTX] = "NETOPT_BLE_CTX",
[NETOPT_CHECKSUM] = "NETOPT_CHECKSUM",
[NETOPT_PHY_BUSY] = "NETOPT_PHY_BUSY",
[NETOPT_LORAWAN_APPEUI] = "NETOPT_LORAWAN_APPEUI",
[NETOPT_LORAWAN_APPKEY] = "NETOPT_LORAWAN_APPKEY",
[NETOPT_LORAWAN_APPSKEY] = "NETOPT_LORAWAN_APPSKEY",
[NETOPT_LORAWAN_NWKSKEY] = "NETOPT_LORAWAN_NWKSKEY",
[NETOPT_LORAWAN_DEVICE_CLASS] = "NETOPT_LORAWAN_DEVICE_CLASS",
[NETOPT_LORAWAN_DR] = "NETOPT_LORAWAN_DR",
[NETOPT_LORAWAN_ADR] = "NETOPT_LORAWAN_ADR",
[NETOPT_LORAWAN_PUBLIC_NETWORK]= "NETOPT_LORAWAN_PUBLIC_NETWORK",
[NETOPT_LORAWAN_TX_PORT] = "NETOPT_LORAWAN_TX_PORT",
[NETOPT_LORAWAN_RX2_DR] = "NETOPT_LORAWAN_RX2_DR",
[NETOPT_LORAWAN_RX2_FREQ] = "NETOPT_LORAWAN_RX2_FREQ",
[NETOPT_LORAWAN_MAX_RX_ERROR] = "NETOPT_LORAWAN_MAX_RX_ERROR",
[NETOPT_LORAWAN_MIN_RX_SYMBOL] = "NETOPT_LORAWAN_MIN_RX_SYMBOL",
[NETOPT_NUMOF] = "NETOPT_NUMOF",
};