300 likes | 950 Views
Z-stack MAC API & TI cc2530 platform introduction. Speaker: 葉俊克 Date: 2010/11/16. Outline. ZigBee Architecture MAC Layer Operation Scenarios Introduction to Platform(CC 2530ZDK) Directory Hierarchy in Developing An Application Demo Environment Demo. ZigBee Architecture.
E N D
Z-stack MAC API & TI cc2530 platform introduction Speaker: 葉俊克 Date: 2010/11/16
Outline • ZigBee Architecture • MAC Layer Operation Scenarios • Introduction to Platform(CC 2530ZDK) • Directory Hierarchy in Developing An Application • Demo Environment • Demo
ZigBee Node Type • ZigBee Node Type : • Coordinator • Forms network • Routes packets • Security Trust Center • Allows nodes to join network • Router • Join network • Routes packets • Allows nodes to join network • End-Device • Join network • Battery operated and may sleep • Smallest code size
MAC Layer Operation ScenariosNon Beacon-Enabled Network Start
Introduction to Platform • Devices of TI CC2530 ZDK (zigbee development kit): • 2 Collectors (SmartRF05EB Evaluation Boards) • 5 End-devices (SmartRF05 Battery Boards) • 7 CC2530EM Evaluation Modules • USB Dongle Antennas and batteries IAR EW8051 C-compiler with C-SPY debugger • IAR Embedded Workbench for MCS-51 7.51A Evaluation
Directory Hierarchy in Developing An Application HAL(Hardware (H/W) Abstraction Layer):硬體層目錄,包含有與硬體相關的配置和驅動及操作函數。 MAC:MAC層目錄,包含了MAC層的參數配置文件及其MAC的LIB庫的函數介面文件。 NWK(ZigBee Network Layer):網路層目錄,含網路層配置參數文件及網絡層的函數介面文件,APS層的函數介面。 Profile:AF(Application Framework)層目錄,包含AF層處理函數文件。 ZDO(ZigBee Device Objects):ZDO目錄。 Security:安全層目錄,安全層處理函數,比如加密函數等。
Directory Hierarchy in Developing An Application Con. APP(Application Programming):應用層目錄,這是用戶創建各種不同動作的區域,在這個目錄中包含了應用層的內容和這個項目的主要內容。 MT(Monitor Test):實現通過序列埠可控各層,於各層進行直接溝通。 OSAL(Operating System (OS) Abstraction Layer):protocol stack的操作系統。 Services:地址處理函數目錄,包括著地址模式的定義及地址處理函數。 Tools:工程配置目錄,包括空間劃分及Z-Stack相關配置信息。 ZMac: MAC層目錄,包括MAC層參數配置及MAC層LIB API回傳處理。 ZMain:主函數目錄,包括初始化函數及硬件配置。 Output:輸出文件目錄,這個EW8051 IDE自動生成的。
Demo Environment • CC2530ZDK Sensor Demo Software • ZStack-CC2530-2.3.0-1.4.0 • SmartRF Flash Programmer(swrc044i) • IAR 8051 7.51A • Zigbee SFTP • 10.10.59.32 • Driver • C:\Program Files\Texas Instruments\Extras\Drivers
Open Workspace • IAR Embedded Workbench
Open Workspace • IAR Embedded Workbench
EDIT • IAR Embedded Workbench
Set Virtual Registers • IAR Embedded Workbench
Rename and Output Format • IAR Embedded Workbench
Build Hex • IAR Embedded Workbench
Download hex • SmartRF Flash Programmer
Demo 情境1 • Non enable security over NWK layer • Coordinator • CollectorEB.hex • Sensor • SensorEB.hex
情境2 • Enable security over NWK layer • Network key is preconfigured (Set zgPreConfigkeys = TRUE in ZGlobals.c) • Setting preconfigured Network key ( Defaultkey = {KEY} in nwk_globals.c) • Coordinator • CollectorEB_ssec.hex • Sensor • SensorEB_ssec.hex • SensorEB_sseck.hex (different key)
情境3 • Enable security over NWK layer • Network key is not preconfigured (Set zgPreConfigkeys = FALSE in ZGlobals.c) • Setting preconfigured Network key ( Defaultkey = {KEY} in nwk_globals.c) • Coordinator • CollectorEB_ssecf.hex • Sensor • SensorEB_ssecf.hex
參考資料 • TI 802.15.4_MAC_API.pdf • IAR 設定 • http://e2e.ti.com/support/low_power_rf/f/160/p/18242/70813.aspx#70813