| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- /*
- * Copyright (c) 2006-2020, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- * 2020-07-13 Rick the first version
- */
- #ifndef RF_APPLICATION_LORAWAN_CONFIG_H_
- #define RF_APPLICATION_LORAWAN_CONFIG_H_
- #ifdef LORAWAN_DRIVER_REGION_CN470
- #define ACTIVE_REGION LORAMAC_REGION_CN470
- #endif
- #ifdef LORAWAN_DRIVER_REGION_EU433
- #define ACTIVE_REGION LORAMAC_REGION_EU433
- #endif
- #define APP_TX_DUTYCYCLE 3000
- #define APP_TX_DUTYCYCLE_RND 1000
- #define LORAWAN_CONFIRMED_MSG_ON false
- #define LORAWAN_ADR_ON false
- #define LORAWAN_APP_DATA_MAX_SIZE 242
- #define LORAWAN_DEFAULT_DATARATE LORAWAN_DRIVER_DEFAULT_DATARATE
- #define LORAWAN_APP_PORT LORAWAN_DRIVER_APP_PORT
- /*!
- * When set to 1 the application uses the Over-the-Air activation procedure
- * When set to 0 the application uses the Personalization activation procedure
- */
- #ifdef LORAWAN_DRIVER_ABP
- #define OVER_THE_AIR_ACTIVATION 0
- #else
- #define OVER_THE_AIR_ACTIVATION 1
- #endif
- /*!
- * When set to 2 the application use Mode Class C
- * When set to 1 the application use Mode Class B
- * When set to 0 the application use Mode Class A
- */
- #ifdef LORAWAN_DRIVER_ClassA
- #define DEVICE_CLASS 0
- #elif BSP_USING_LoRaWAN_ClassB
- #define DEVICE_CLASS 1
- #else
- #define DEVICE_CLASS 2
- #endif
- /*!
- * When using ABP activation the MAC layer must know in advance to which server
- * version it will be connected.
- */
- #define ABP_ACTIVATION_LRWAN_VERSION_V10x 0x01030000 // 1.0.3.0
- #define ABP_ACTIVATION_LRWAN_VERSION ABP_ACTIVATION_LRWAN_VERSION_V10x
- /*!
- * Indicates if the end-device is to be connected to a private or public network
- */
- #define LORAWAN_PUBLIC_NETWORK true
- /*!
- * IEEE Organizationally Unique Identifier ( OUI ) (big endian)
- * \remark This is unique to a company or organization
- */
- #define IEEE_OUI 0x00, 0x00, 0x00
- /*!
- * Mote device IEEE EUI (big endian)
- *
- * \remark In this application the value is automatically generated by calling
- * BoardGetUniqueId function
- */
- #define LORAWAN_DEVICE_EUI {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}
- /*!
- * App/Join server IEEE EUI (big endian)
- */
- #define LORAWAN_JOIN_EUI {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}
- /*!
- * Application root key
- * WARNING: NOT USED FOR 1.0.x DEVICES
- */
- #define LORAWAN_APP_KEY LORAWAN_GEN_APP_KEY
- /*!
- * Application root key - Used to derive Multicast keys on 1.0.x devices.
- * WARNING: USED only FOR 1.0.x DEVICES
- */
- #define LORAWAN_GEN_APP_KEY {0x07, 0x7e, 0xe4, 0x5c, 0x6e, 0x45, 0x64, 0xd9, 0x6d, 0x76, 0xae, 0x55, 0xaf, 0xd3, 0xaa, 0x89}
- /*!
- * Network root key
- * WARNING: FOR 1.0.x DEVICES IT IS THE \ref LORAWAN_APP_KEY
- */
- #define LORAWAN_NWK_KEY {0x07, 0x7e, 0xe4, 0x5c, 0x6e, 0x45, 0x64, 0xd9, 0x6d, 0x76, 0xae, 0x55, 0xaf, 0xd3, 0xaa, 0x89}
- /*!
- * Current network ID
- */
- #define LORAWAN_NETWORK_ID ( uint32_t )0
- /*!
- * Device address on the network (big endian)
- */
- #define LORAWAN_DEVICE_ADDRESS ( uint32_t )0x22221111
- /*!
- * Forwarding Network session integrity key
- * WARNING: NWK_S_KEY FOR 1.0.x DEVICES
- */
- #define LORAWAN_F_NWK_S_INT_KEY { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 }
- /*!
- * Serving Network session integrity key
- * WARNING: NOT USED FOR 1.0.x DEVICES. MUST BE THE SAME AS \ref LORAWAN_F_NWK_S_INT_KEY
- */
- #define LORAWAN_S_NWK_S_INT_KEY LORAWAN_F_NWK_S_INT_KEY
- /*!
- * Network session encryption key
- * WARNING: NOT USED FOR 1.0.x DEVICES. MUST BE THE SAME AS \ref LORAWAN_F_NWK_S_INT_KEY
- */
- #define LORAWAN_NWK_S_ENC_KEY LORAWAN_F_NWK_S_INT_KEY
- /*!
- * Application session key
- */
- #define LORAWAN_APP_S_KEY { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 }
- #endif /* RF_APPLICATION_LORAWAN_CONFIG_H_ */
|