/**************************************************************************************************
Filename: ZDSecMgr.c
Revised: $Date: 2010-01-08 13:29:59 -0800 (Fri, 08 Jan 2010) $
Revision: $Revision: 21465 $
Description: The ZigBee Device Security Manager.
Copyright 2005-2009 Texas Instruments Incorporated. All rights reserved.
IMPORTANT: Your use of this Software is limited to those specific rights
granted under the terms of a software license agreement between the user
who downloaded the software, his/her employer (which must be your employer)
and Texas Instruments Incorporated (the "License"). You may not use this
Software unless you agree to abide by the terms of the License. The License
limits your use, and you acknowledge, that the Software may not be modified,
copied or distributed unless embedded on a Texas Instruments microcontroller
or used solely and exclusively in conjunction with a Texas Instruments radio
frequency transceiver, which is integrated into your product. Other than for
the foregoing purpose, you may not use, reproduce, copy, prepare derivative
works of, modify, distribute, perform, display or sell this Software and/or
its documentation for any purpose.
YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
PROVIDED �AS IS� WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
Should you have any questions regarding your right to use this Software,
contact Texas Instruments Incorporated at www.TI.com.
**************************************************************************************************/
#ifdef __cplusplus
extern "C"
{
#endif
/******************************************************************************
* INCLUDES
*/
#include "ZComdef.h"
#include "OSAL.h"
#include "OSAL_NV.h"
#include "ZGlobals.h"
#include "ssp.h"
#include "nwk_globals.h"
#include "nwk.h"
#include "NLMEDE.h"
#include "AddrMgr.h"
#include "AssocList.h"
#include "APSMEDE.h"
#include "AF.h"
#include "ZDConfig.h"
#include "ZDApp.h"
#include "ZDSecMgr.h"
/******************************************************************************
* CONSTANTS
*/
// maximum number of devices managed by this Security Manager
#if !defined ( ZDSECMGR_DEVICE_MAX )
#define ZDSECMGR_DEVICE_MAX 3
#endif
// total number of preconfigured devices (EXT address, MASTER key)
//devtag.pro.security
//#define ZDSECMGR_PRECONFIG_MAX ZDSECMGR_DEVICE_MAX
#define ZDSECMGR_PRECONFIG_MAX 0
// maximum number of MASTER keys this device may hold
#define ZDSECMGR_MASTERKEY_MAX ZDSECMGR_DEVICE_MAX
// maximum number of LINK keys this device may store
#define ZDSECMGR_ENTRY_MAX ZDSECMGR_DEVICE_MAX
// total number of devices under control - authentication, SKKE, etc.
#define ZDSECMGR_CTRL_MAX ZDSECMGR_DEVICE_MAX
// total number of stored devices
#if !defined ( ZDSECMGR_STORED_DEVICES )
#define ZDSECMGR_STORED_DEVICES 3
#endif
// Total number of preconfigured trust center link key
#if !defined ( ZDSECMGR_TC_DEVICE_MAX )
#define ZDSECMGR_TC_DEVICE_MAX 1
#endif
#if ( ZDSECMGR_TC_DEVICE_MAX < 1 ) || ( ZDSECMGR_TC_DEVICE_MAX > 255 )
#error "ZDSECMGR_TC_DEVICE_MAX shall be between 1 and 255 !"
#endif
#define ZDSECMGR_CTRL_NONE 0
#define ZDSECMGR_CTRL_INIT 1
#define ZDSECMGR_CTRL_TK_MASTER 2
#define ZDSECMGR_CTRL_SKKE_INIT 3
#define ZDSECMGR_CTRL_SKKE_WAIT 4
#define ZDSECMGR_CTRL_SKKE_DONE 5
#define ZDSECMGR_CTRL_SKKE_FAIL 6
#define ZDSECMGR_CTRL_TK_NWK 7
#define ZDSECMGR_CTRL_BASE_CNTR 1
#define ZDSECMGR_CTRL_SKKE_INIT_CNTR 1
#define ZDSECMGR_CTRL_TK_NWK_CNTR 1
// set SKA slot maximum
#define ZDSECMGR_SKA_SLOT_MAX 1
// APSME Stub Implementations
#define ZDSecMgrMasterKeyGet APSME_MasterKeyGet
#define ZDSecMgrLinkKeySet APSME_LinkKeySet
#define ZDSecMgrLinkKeyDataGet APSME_LinkKeyDataGet
#define ZDSecMgrKeyFwdToChild APSME_KeyFwdToChild
#if !defined( MAX_APS_FRAMECOUNTER_CHANGES )
// The number of times the frame counter can change before
// saving to NV
#define MAX_APS_FRAMECOUNTER_CHANGES 10
#endif
/******************************************************************************
* TYPEDEFS
*/
typedef struct
{
uint8 extAddr[Z_EXTADDR_LEN];
uint8 key[SEC_KEY_LEN];
} ZDSecMgrPreConfigData_t;
typedef struct
{
uint16 ami;
uint8 key[SEC_KEY_LEN];
} ZDSecMgrMasterKeyData_t;
//should match APSME_LinkKeyData_t;
typedef struct
{
uint8 key[SEC_KEY_LEN];
APSME_LinkKeyData_t apsmelkd;
} ZDSecMgrLinkKeyData_t;
typedef struct
{
uint16 ami;
ZDSecMgrLinkKeyData_t lkd;
ZDSecMgr_Authentication_Option authenticateOption;
} ZDSecMgrEntry_t;
typedef struct
{
ZDSecMgrEntry_t* entry;
uint16 parentAddr;
uint8 secure;
uint8 state;
uint8 cntr;
//uint8 next;
} ZDSecMgrCtrl_t;
typedef struct
{
uint16 nwkAddr;
uint8* extAddr;
uint16 parentAddr;
uint8 secure;
uint8 devStatus;
ZDSecMgrCtrl_t* ctrl;
} ZDSecMgrDevice_t;
/******************************************************************************
* LOCAL VARIABLES
*/
#if 0 // Taken out because the following functionality is only used for test
// purpose. A more efficient (above) way is used. It can be put
// back in if customers request for a white/black list feature.
uint8 ZDSecMgrStoredDeviceList[ZDSECMGR_STORED_DEVICES][Z_EXTADDR_LEN] =
{
{ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
};
#endif
uint8 ZDSecMgrTCExtAddr[Z_EXTADDR_LEN]=
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
uint8 ZDSecMgrTCMasterKey[SEC_KEY_LEN] =
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x89,0x67,0x45,0x23,0x01,0xEF,0xCD,0xAB};
uint8 ZDSecMgrTCAuthenticated = FALSE;
uint8 ZDSecMgrTCDataLoaded = FALSE;
//devtag.pro.security - remove this
#if ( ZDSECMGR_PRECONFIG_MAX != 0 )
const ZDSecMgrPreConfigData_t ZDSecMgrPreConfigData[ZDSECMGR_PRECONFIG_MAX] =
{
//---------------------------------------------------------------------------
// DEVICE A
//---------------------------------------------------------------------------
{
// extAddr
{0x7C,0x01,0x12,0x13,0x14,0x15,0x16,0x17},
// key
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
},
//---------------------------------------------------------------------------
// DEVICE B
//---------------------------------------------------------------------------
{
// extAddr
{0x84,0x03,0x00,0x00,0x00,0x4B,0x12,0x00},
// key
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
},
//---------------------------------------------------------------------------
// DEVICE C
//---------------------------------------------------------------------------
{
// extAddr
{0x3E,0x01,0x12,0x13,0x14,0x15,0x16,0x17},
// key
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x
没有合适的资源?快使用搜索试试~ 我知道了~
协议栈ADC采集烟雾光照等浓度采集温度和开关量.zip
共561个文件
h:154个
c:151个
s51:67个
需积分: 0 0 下载量 7 浏览量
2024-05-11
07:34:12
上传
评论
收藏 10.65MB ZIP 举报
温馨提示
协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集温度和开关量协议栈ADC采集烟雾光照等浓度采集
资源推荐
资源详情
资源评论
收起资源包目录
协议栈ADC采集烟雾光照等浓度采集温度和开关量.zip (561个子文件)
SampleApp.cspy.bat 2KB
ZDSecMgr.c 105KB
zcl.c 104KB
zcl_general.c 97KB
ZDObject.c 89KB
ZDApp.c 74KB
zcl_key_establish.c 73KB
zcl_se.c 65KB
ZDProfile.c 63KB
esp.c 61KB
oad_app.c 60KB
MT_MAC.c 56KB
MT_ZDO.c 51KB
zcl_ss.c 48KB
simplemeter.c 42KB
mac_rx.c 42KB
zcl_lighting.c 37KB
ZDNwkMgr.c 37KB
OSAL_Nv.c 35KB
sapi.c 34KB
mac_csp_tx.c 33KB
loadcontrol.c 33KB
pct.c 32KB
ipd.c 32KB
MT_NWK.c 31KB
MT_UTIL.c 31KB
esp_data.c 30KB
OSAL.c 29KB
mac_mcu.c 28KB
hal_timer.c 28KB
hal_timer.c 28KB
hal_timer.c 28KB
AF.c 27KB
stub_aps.c 26KB
_hal_uart_dma.c 26KB
TransmitApp.c 24KB
znp_app.c 24KB
_hal_uart_dma.c 24KB
zmac.c 24KB
zcl_pi.c 23KB
usb_standard_requests.c 23KB
MT_SYS.c 22KB
znp_spi.c 22KB
MT_X.c 22KB
mac_tx.c 22KB
simplemeter_data.c 22KB
hal_lcd.c 21KB
hal_lcd.c 21KB
hal_lcd.c 21KB
hal_sleep.c 20KB
hal_sleep.c 20KB
hal_sleep.c 20KB
rangeext.c 20KB
mac_radio.c 20KB
ZGlobals.c 19KB
MT_SAPI.c 19KB
mac_backoff_timer.c 19KB
SampleApp.c 19KB
zcl_samplesw.c 19KB
mac_autopend.c 19KB
hal_key.c 19KB
hal_key.c 19KB
SerialApp.c 18KB
zcl_samplelight.c 18KB
hal_oad.c 18KB
hal_oad.c 18KB
hal_oad.c 18KB
nwk_globals.c 17KB
hal_led.c 16KB
hal_led.c 16KB
hal_led.c 16KB
_hal_uart_isr.c 16KB
MT.c 16KB
OSAL_Timers.c 15KB
zmac_cb.c 15KB
MT_AF.c 15KB
MT_APP.c 15KB
OSAL_Memory.c 15KB
MT_UART.c 14KB
mac_radio_defs.c 14KB
MT_UART.c 14KB
zcl_ms.c 13KB
hal_adc.c 13KB
OnBoard.c 12KB
usb_framework.c 12KB
OnBoard.c 12KB
ZMain.c 11KB
ZMain.c 11KB
loadcontrol_data.c 11KB
_hal_uart_usb.c 11KB
zcl_hvac.c 11KB
hal_flash.c 11KB
hal_flash.c 11KB
hal_flash.c 11KB
pct_data.c 11KB
MT_TASK.c 10KB
hal_adc.c 10KB
hal_adc.c 10KB
ipd_data.c 10KB
hal_assert.c 10KB
共 561 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
音符o
- 粉丝: 40
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Vue的medical-vue医疗挂号系统设计源码
- Python解析网页.xmind
- PMV185XN-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- PMV170UN-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 基于Java的长理教务管理系统设计源码
- PMV16UN-VB一款N-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 永磁同步电机-用STM32F103C8T6实现PMSM矢量控制.rar
- PMV160UP-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 3dmax超级弯曲 暴力弯曲插件
- candence原理图批量换网络的快捷操作
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功