• 大小: 7.48MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-26
  • 语言: 其他
  • 标签: zigbee  点对点  通信  

资源简介

基于ADK-SK套件的zigbee网络点对点网络通讯的实现示例程序。

资源截图

代码片段和文件信息

// *******************************************************************
//  common.c
//
//  common functions for sensor sample app
//
//  Copyright 2005 by Ember Corporation. All rights reserved.              *80*
// *******************************************************************

#include “app/sensor/common.h“
#include “app/util/security/security.h“

#ifdef SINK_APP
extern int16u ticksSinceLastHeard[];
#endif

#ifdef SENSOR_APP
void printDataMode(void);
#endif



// *********************************
// utility function used below in printing the security keys that are set
// *********************************
void sensorPrintKeyOptions(EmberKeyStruct* key)
{
  
  // sequence number
  emberSerialPrintf(APP_SERIAL “\r\n    seqNum [“);
  if ((key->bitmask) & EMBER_KEY_HAS_SEQUENCE_NUMBER) {
    emberSerialPrintf(APP_SERIAL “%x] “ key->sequenceNumber);
  } else {
    emberSerialPrintf(APP_SERIAL “none] “);
  }
  emberSerialWaitSend(APP_SERIAL);

  // outgoing frame counter
  emberSerialPrintf(APP_SERIAL “\r\n    outFC [“);
  if (key->bitmask & EMBER_KEY_HAS_OUTGOING_frame_COUNTER ) {
    emberSerialPrintf(APP_SERIAL “%4x] “ key->outgoingframeCounter);
  } else {
    emberSerialPrintf(APP_SERIAL “none] “);
  }
  emberSerialWaitSend(APP_SERIAL);

  // incoming frame counter
  emberSerialPrintf(APP_SERIAL “\r\n    inFC [“);
  if (key->bitmask & EMBER_KEY_HAS_INCOMING_frame_COUNTER ) {
    emberSerialPrintf(APP_SERIAL “%4x] “
                      key->incomingframeCounter);
  } else {
    emberSerialPrintf(APP_SERIAL “none] “);
  }
  emberSerialWaitSend(APP_SERIAL);

  // partner EUI
  emberSerialPrintf(APP_SERIAL “\r\n    partner [“);
  if (key->bitmask & EMBER_KEY_HAS_PARTNER_EUI64) {
    printEUI64(APP_SERIAL (EmberEUI64*) key->partnerEUI64);
    emberSerialPrintf(APP_SERIAL “]“);
  } else {
    emberSerialPrintf(APP_SERIAL “None] “);
  }
  emberSerialWaitSend(APP_SERIAL);

  // is key authorized
  emberSerialPrintf(APP_SERIAL “\r\n    auth [“);
  if (key->bitmask & EMBER_KEY_IS_AUTHORIZED) {
    emberSerialPrintf(APP_SERIAL “Y] “);
  } else {
    emberSerialPrintf(APP_SERIAL “N] “);
  }
  emberSerialWaitSend(APP_SERIAL);
  emberSerialPrintf(APP_SERIAL “\r\n“);
  
  
}

// *********************************
// utility function used below in printing the security keys that are set
// *********************************
void sensorCommonPrint16ByteKey(int8u* key) 
{
  int8u i;
  for (i=0; i    // To save on buffers we reduce the number of calls to 
    // emberSerialPrintf().
    emberSerialPrintf(APP_SERIAL “%X %X %X %X %X %X %X %X “ 
                      key[i+0] key[i+1] key[i+2] key[i+3]
                      key[i+4] key[i+5] key[i+6] key[i+7]);
    emberSerialWaitSend(APP_SERIAL);
  }
  emberSerialWaitSend(APP_SERIAL);
  
}



// *********************************
// Set the securit

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      71168  2009-10-26 08:25  STM32W108ucast_demo\tool\stm32w_flasher\bz2.pyd

     文件      35840  2008-12-10 02:08  STM32W108ucast_demo\tool\stm32w_flasher\d2xx._d2xx.pyd

     文件     206144  2008-10-30 12:22  STM32W108ucast_demo\tool\stm32w_flasher\FTD2XX.dll

     文件    1486848  2010-01-21 10:27  STM32W108ucast_demo\tool\stm32w_flasher\JlinkARM.DLL

     文件    2149888  2009-10-26 08:24  STM32W108ucast_demo\tool\stm32w_flasher\python26.dll

     文件     110592  2009-07-05 13:35  STM32W108ucast_demo\tool\stm32w_flasher\pywintypes26.dll

     文件      11776  2009-10-26 08:27  STM32W108ucast_demo\tool\stm32w_flasher\select.pyd

     文件    1943926  2010-03-01 15:04  STM32W108ucast_demo\tool\stm32w_flasher\stm32w_flasher.exe

     文件     585728  2009-10-26 08:25  STM32W108ucast_demo\tool\stm32w_flasher\unicodedata.pyd

     文件      49664  2009-10-26 08:23  STM32W108ucast_demo\tool\stm32w_flasher\w9xpopen.exe

     文件      96256  2009-07-05 13:35  STM32W108ucast_demo\tool\stm32w_flasher\win32api.pyd

     文件      73728  2009-10-26 08:25  STM32W108ucast_demo\tool\stm32w_flasher\_ctypes.pyd

     文件      40448  2009-10-26 08:25  STM32W108ucast_demo\tool\stm32w_flasher\_socket.pyd

     文件     645120  2009-10-26 08:25  STM32W108ucast_demo\tool\stm32w_flasher\_ssl.pyd

     文件      50994  2010-02-04 14:35  STM32W108ucast_demo\tool\em3xx\em3xx_convert.exe

     文件     487936  2010-02-08 08:56  STM32W108ucast_demo\tool\em3xx\em3xx_isa.dll

     文件     191079  2010-02-04 14:35  STM32W108ucast_demo\tool\em3xx\em3xx_load.exe

     文件        242  2010-02-04 14:36  STM32W108ucast_demo\tool\certificates\0000000000000001.txt

     文件        242  2010-02-04 14:36  STM32W108ucast_demo\tool\certificates\0000000000000002.txt

     文件      67450  2010-02-04 14:36  STM32W108ucast_demo\tool\certificates\hashing-cli.exe

     文件         47  2010-02-04 14:37  STM32W108ucast_demo\tool\certificates\test-install-code-em3xx.txt

     文件      20196  2010-02-04 14:37  STM32W108ucast_demo\tool\certificates\hashing-cli\hashing-cli.c

     文件      62936  2010-02-04 14:37  STM32W108ucast_demo\tool\certificates\hashing-cli\rijndael-alg-fst.c

     文件       1963  2010-02-04 14:38  STM32W108ucast_demo\tool\certificates\hashing-cli\rijndael-alg-fst.h

     文件      12152  2010-02-04 14:38  STM32W108ucast_demo\tool\certificates\hashing-cli\rijndael-api-fst.c

     文件       4746  2010-02-04 14:38  STM32W108ucast_demo\tool\certificates\hashing-cli\rijndael-api-fst.h

     文件      19340  2010-02-04 14:39  STM32W108ucast_demo\tool\bootloader\standalone-bootloader\serial-uart-bootloader.ewd

     文件      24426  2010-02-04 14:39  STM32W108ucast_demo\tool\bootloader\standalone-bootloader\serial-uart-bootloader.ewp

     文件        176  2010-02-04 14:40  STM32W108ucast_demo\tool\bootloader\standalone-bootloader\serial-uart-bootloader.eww

     文件      19341  2010-02-04 14:40  STM32W108ucast_demo\tool\bootloader\app-bootloader\app-bootloader-i2c.ewd

............此处省略601个文件信息

评论

共有 条评论