Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to ZBOSS Embedded Systems Software Training Center

Similar presentations


Presentation on theme: "Introduction to ZBOSS Embedded Systems Software Training Center"— Presentation transcript:

1 Introduction to ZBOSS Embedded Systems Software Training Center
COPYRIGHT © 2015 DSR CORPORATION

2 Instructor Introduction
Maxim Malezhin, Senior software developer DSR Corporation Copyright © 2015 DSR Corporation

3 Objectives Learn basics about ZBOSS stack by DSR.
Learn how to install ZBOSS and run zdo_start_secur example. Learn how to use Wireshark as ZigBee traffic sniffer. Develop test task Copyright © 2015 DSR Corporation

4 Test tasks Configure and build ZBOSS Open Source stack with examples;
Run zdo_start_secur test with network simulator; Analyze ZigBee traffic with Wireshark, learn network association sequence and data exchange. Modify zdo_start_secur example to transfer user data. For example, send your First Name and Last Name. Change device’s IEEE addresses Study zdo_start_secur source code Copyright © 2015 DSR Corporation

5 ZBOSS installation COPYRIGHT © 2015 DSR CORPORATION

6 What is ZBOSS? ZBOSS is an implementation of ZigBee PRO wireless stack by DSR Corporation. ZBOSS stands for ZigBee Open Source Stack. Two versions available: ZBOSS v. 1.0 – free, open source version under GPL 2.0 license. ZBOSS v. 2.x – commercial version Copyright © 2015 DSR Corporation

7 ZBOSS useful links ZBOSS download page ZBOSS documentation ZBOSS build instruction ZBOSS API description Wireshark homepage Copyright © 2015 DSR Corporation

8 ZBOSS on Virtual Machines
ZBOSS is already installed on ESTC virtual machines: ~/projects/zboss_test_project/stack/ Copyright © 2015 DSR Corporation

9 ZBOSS build instructions for PC/Linux platform
1. Create symbolic links to configuration files: $ ln -s build-configurations/Platform-linux Platform $ ln -s build-configurations/Options-linux-debug Options 2. Build stack and included test examples $ make rebuild 3. Create tags for text editor (optional, for Emacs/Vi/Vim) $ make tags Copyright © 2015 DSR Corporation

10 Building Network simulator
ZBOSS Network simulator is a tool, which allows simulated ZigBee devices work with each other. ZBOSS Network simulator included in ZBOSS/devtools is compiled during the stack build with all the other development tools. Separate Network Simulator can be compiled running “make” from its directory. To use with Network Simulator ZBOSS stack should be compiled with ZB_NS_BUILD define. In this case ZBOSS will use Linux pipes as mac transport. Copyright © 2015 DSR Corporation

11 Your first ZBOSS application
It’s quite useful to start learning ZBOSS with an existing application. ZBOSS includes several samples and tests: refer to stack/tests/ folder The “Hello world!” application in ZBOSS is “zdo_start_secur” test Copyright © 2015 DSR Corporation

12 Running zdo_startup_secur
1. Go to zdo_start_secur folder and build the test: $ cd stack/tests/zdo_start_secur $ make 2. Run the test, check output and wait for finish: $ ./run.sh 3. Check new files created: *.log files – ZBOSS text trace *.dump files – ZBOSS raw dump *.pcap files – ZBOSS parsed dump for Wireshark Copyright © 2015 DSR Corporation

13 Running zdo_startup_secur
1. Go to zdo_start_secur folder and build the test: $ cd stack/tests/zdo_start_secur $ make 2. Run the test, check output and wait for finish: $ ./run.sh 3. Check new files created: *.log files – ZBOSS text trace *.dump files – ZBOSS raw dump *.pcap files – ZBOSS parsed dump for Wireshark Copyright © 2015 DSR Corporation

14 Sample ZBOSS text log file

15 Sample Wireshark capture file

16 How does it work? Analyze run.sh script!
Copyright © 2015 DSR Corporation

17 Running network simulator
Network simulator is the command line Linux application. Its command line has the following format: $ ./network_simulator -–nNode=<number of virtual devices> [--pipeName=<pipe name prefix>] [--xgml=<xgml with topology>] In this case: nNode is the number of virtual devices (running stack instances); pipeName is the Network simulator pipes name prefix ,it should be used when more then one instance of Network Simulator should be running (for several tests, for example); xgml is the xgml document containing the description of the network devices' visibility areas. Copyright © 2015 DSR Corporation

18 Running ZBOSS stack instances with NS
ZBOSS Stack processes use named pipes to communicate with Network Simulator. Pipe names contain prefix , suffix and the number, which is node number. Prefix can be set via --pipeName parameter when starting Network Simulator, There are two suffixes: “read” means that pipe's direction is from stack to simulator; “write” means that pipe's direction is from simulator to stack. Copyright © 2015 DSR Corporation

19 Running zdo_start_secur with NS
Run NS: $ ./network_simulator --nNode=2 --pipeName=/tmp/zt >ns.txt 2>&1 Run coordinator $ ./zdo_start_sec_zc /tmp/zt0.write /tmp/zt0.read & Run router $ ./zdo_start_sec_zr /tmp/zt1.write /tmp/zt1.read & Copyright © 2015 DSR Corporation

20 NETWORK SIMULATOR'S TRAFFIC DUMP
Network simulator produces dump that can be converted to use with Wireshark. Dump file has “.dump” extension and can be converted by “dump_converter” utility. To convert dump file: run dump_converter with “-n0” key and specify the path to file. For example: $ ./dump_converter –n0 file.dump file.pcap Run Wireshark: $ wireshark-gtk file.pcap & Copyright © 2015 DSR Corporation

21 Are there any questions?
Copyright © 2015 DSR Corporation

22 Thank you! COPYRIGHT © 2015 DSR CORPORATION
22


Download ppt "Introduction to ZBOSS Embedded Systems Software Training Center"

Similar presentations


Ads by Google