LM401 EndNode应用开发
LoRaWAN协议栈描述
Module | Description | Location |
LoRaMAC layer | implements the Link Layer specification | Middlewares\Third_Party\LoRaWAN\Mac |
Region layer | implements the Regional Parameters specification as dependant interface for the LoRaMAC layer module | Middlewares\Third_Party\LoRaWAN\Mac\Region |
LoRa crypto | implements AES/CMAC algorithms and interface with SecureEngine element | Middlewares\Third_Party\LoRaWAN\Crypto |
LmHandler | implements the LoRaMac Handler public interface, Certification specifications and FUOTA packages | Middlewares\Third_Party\LoRaWAN\LmHandler |
LoRa utilities | implements the common utility functions | Middlewares\Third_Party\LoRaWAN\Utilities |
LoRaWAN_AT_Slave,LoRaWAN_End_Node,PingPong应用都是基于LoRaWAN middleware层来开发,其中主要API接口在LmHandler.h头文件中声明。
应用的框架在Applications\LoRaWAN\LoRaWAN_End_Node\LoRaWAN\App\lora_app.c
Function | Description |
LmHandlerErrorStatus_t LmHandlerGetCurrentClass( DeviceClass_t *deviceClass) | Gets the current LoRaWAN class. |
LmHandlerErrorStatus_t LmHandlerGetDevEUI( uint8_t *devEUI) | Gets the LoRaWAN device EUI. |
LmHandlerErrorStatus_t LmHandlerSetDevEUI( uint8_t *devEUI) | Sets the LoRaWAN device EUI (if OTAA). |
LmHandlerErrorStatus_t LmHandlerGetAppEUI( uint8_t *appEUI) | Gets the LoRaWAN App EUI. |
LmHandlerErrorStatus_t LmHandlerSetAppEUI( uint8_t *appEUI) | Sets the LoRaWAN App EUI. |
LmHandlerErrorStatus_t LmHandlerGetNetworkID( uint32_t *networkId) | Gets the LoRaWAN Network ID. |
LmHandlerErrorStatus_t LmHandlerSetNetworkID uint32_t networkId) | Sets the LoRaWAN Network ID. |
LmHandlerErrorStatus_t LmHandlerGetDevAddr( uint32_t *devAddr) | Gets the LoRaWAN device address. |
LmHandlerErrorStatus_t LmHandlerSetDevAddr( uint32_t devAddr) | Sets the LoRaWAN device address (if ABP). |
LmHandlerErrorStatus_t LmHandlerGetAppKey( uint8_t *appKey) | Gets the LoRaWAN Application Root Key. |
LmHandlerErrorStatus_t LmHandlerSetAppKey( uint8_t *appKey) | Sets the LoRaWAN Application Root Key. |
LmHandlerErrorStatus_t LmHandlerGetNwkKey( uint8_t *nwkKey ) | Gets the LoRaWAN Network Root Key. |
LmHandlerErrorStatus_t LmHandlerSetNwkKey( uint8_t *nwkKey ) | Sets the LoRaWAN Network Root Key. |
LmHandlerErrorStatus_t LmHandlerGetNwkSKey( uint8_t *nwkSKey ) | Gets the LoRaWAN Network Session Key. |
LmHandlerErrorStatus_t LmHandlerSetNwkSKey( uint8_t *nwkSKey) | Sets the LoRaWAN Network Session Key. |
LmHandlerErrorStatus_t LmHandlerGetAppSKey( uint8_t *appSKey ) | Gets the LoRaWAN Application Session Key. |
LmHandlerErrorStatus_t LmHandlerSetAppSKey( uint8_t *appSKey) | Sets the LoRaWAN Application Session Key. |
LmHandlerErrorStatus_t LmHandlerGetActiveRegion( LoRaMacRegion_ t *region) | Gets the active region. |
LmHandlerErrorStatus_t LmHandlerSetActiveRegion( LoRaMacRegion_ t region) | Sets the active region. |
LmHandlerErrorStatus_t LmHandlerGetAdrEnable( bool *adrEnable) | Gets the adaptive data rate state. |
LmHandlerErrorStatus_t LmHandlerSetAdrEnable( bool adrEnable) | Sets the adaptive data rate state. |
LmHandlerErrorStatus_t LmHandlerGetTxDatarate( int8_t *txDatarate) | Gets the current Tx data rate. |
LmHandlerErrorStatus_t LmHandlerSetTxDatarate( int8_t txDatarate) | Sets the Tx data rate (if adaptive DR disabled). |
LmHandlerErrorStatus_t LmHandlerGetDutyCycleEnable ( bool *dutyCycleEnable) | Gets the current Tx duty cycle state. |
LmHandlerErrorStatus_t LmHandlerSetDutyCycleEnable ( bool dutyCycleEnable) | Sets the Tx duty cycle state. |
LmHandlerErrorStatus_t LmHandlerGetRX2Params ( RxChannelParams_t *rxParams) | Gets the current Rx2 data rate and frequency conf. |
LmHandlerErrorStatus_t LmHandlerSetRX2Params ( RxChannelParams_t *rxParams) | Sets the Rx2 data rate and frequency conf. |
LmHandlerErrorStatus_t LmHandlerGetTxPower( int8_t *txPower) | Gets the current Tx power value. |
LmHandlerErrorStatus_t LmHandlerSetTxPower( int8_t txPower) | Sets the Tx power value. |
LmHandlerErrorStatus_t LmHandlerGetRx1Delay( uint32_t *rxDelay) | Gets the current Rx1 delay (after Tx window). |
LmHandlerErrorStatus_t LmHandlerSetRx1Delay( uint32_t rxDelay) | Sets the Rx1 delay (after Tx window). |
LmHandlerErrorStatus_t LmHandlerGetRx2Delay( uint32_t *rxDelay) | Gets the current Rx2 delay (after Tx window). |
LmHandlerErrorStatus_t LmHandlerSetRx2Delay( uint32_t rxDelay) | Sets the Rx2 delay (after Tx window). |
LmHandlerErrorStatus_t LmHandlerGetJoinRx1Delay( uint32_t *rxDelay) | Gets the current Join Rx1 delay (after Tx window). |
LmHandlerErrorStatus_t LmHandlerSetJoinRx1Delay( uint32_t rxDelay) | Sets the Join Rx1 delay (after Tx window). |
LmHandlerErrorStatus_t LmHandlerGetJoinRx2Delay( uint32_t *rxDelay) | Get the current Join Rx2 delay (after Tx window) |
LmHandlerErrorStatus_t LmHandlerSetJoinRx2Delay( uint32_t rxDelay) | Sets the Join Rx2 delay (after Tx window). |
LmHandlerErrorStatus_t LmHandlerGetPingPeriodicity( uint8_t pingPeriodicity) | Gets the current Rx Ping Slot periodicity (If LORAMAC_CLASSB_ENABLED). |
LmHandlerErrorStatus_t LmHandlerSetPingPeriodicity ( uint8_t pingPeriodicity) | Sets the Rx Ping Slot periodicity (If LORAMAC_CLASSB_ENABLED). |
LmHandlerErrorStatus_t LmHandlerGetBeaconState ( BeaconState_t *beaconState) | Gets the beacon state (If LORAMAC_CLASSB_ENABLED). |
LmHandlerErrorStatus_t LmHandlerDeviceTimeReq(void) | Requests network server time update. |
LmHandlerErrorStatus_t LmHandlerLinkCheckReq(void) | Requests Link connectivity check. |
LmHandlerErrorStatus_t LmHandlerPingSlotReq(uint8_t periodicity) | Informs the server on the ping-slot periodicity to use. |
作者:SteveChen 创建时间:2024-09-18 10:08
最后编辑:SteveChen 更新时间:2024-09-18 10:08
最后编辑:SteveChen 更新时间:2024-09-18 10:08