ZigBee Protocol ZigBee 프로토콜실습 2005 Microchip Technology Incorporated. All Rights Reserved. Slide 1
강의목적 ZigBee 프로토콜에대해상위레벨친숙성배양 마이크로칩 ZigBee 스택을이용한실습 현재의 ZigBee Stack 및향후계획소개 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 2
개요 ZigBee 프로토콜이란? ZigBee 기초 Exercise 1 ZigBee Devices ZigBee 네트워킹 (Networking) ZigBee 네트워킹을이용한통신 Exercise 2 동적네트워킹 (Dynamic Networking) Exercise 3 하드웨어 ZigBee 프로토콜을이용한디자인 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 3
ZigBee 프로토콜이란?: ZigBee Alliance The ZigBee Alliance is an association of companies working together to enable reliable, cost-effective, low-power, wirelessly networked, monitoring and control products based on an open global standard. 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 4
What is ZigBee Protocol?: ZigBee Focus 단순성 (Simplicity) 신뢰성 (Reliability) 저가격 (Low cost) 저전력 (Low power) 상호연동성 (Interoperability) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 5
ZigBee 프로토콜이란? 표준무선 network stack IEEE 802.15.4 에기초 ZigBee Alliance에서정의 단순하고유연한 data 전송저가격 (< $10, 14-28KB) 저전력 (low duty cycle) 단거리네트워크 (Short range network) ~100m outside, line-of-site ~30m inside 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 6
ZigBee 프로토콜이란?: ZigBee 타겟어플리케이션 방범 조명 공조 입, 출입통제 모니터 센서 제어, 자동화 ZigBee 원격모니터 원격미터검침 모니터 진단 RF Remotes 휴대용게임 PC 주변기기 방범 조명 가전제품제어, 공조 입, 출입통제 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 7
ZigBee 프로토콜이란? Range (meters) 10,000 1,000 100 10 Proprietary Cellular Technologies GSM, GPRS ZigBee IEEE 802.15.4 WLAN Technologies IEEE802.11 Bluetooth 1 1 10 100 1,000 10,000 100,000 Data Rate (kbps) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 8
The Wireless Market SHORT < RANGE > LONG TEXT INTERNET/AUDIO COMPRESSED VIDEO ZigBee Bluetooth1 802.11b 802.11a/HL2 & 802.11g Bluetooth 2 MULTI-CHANNEL DIGITAL VIDEO 802.15.3/WIMEDIA LOW < ACTUAL THROUGHPUT > HIGH 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 9
Applications security HVAC AMR lighting control access control BUILDING AUTOMATION CONSUMER ELECTRONICS TV VCR DVD/CD remote patient monitoring fitness monitoring PERSONAL HEALTH CARE ZigBee Wireless Control that Simply Works PC & PERIPHERALS mouse keyboard joystick asset mgt process control environmental energy mgt INDUSTRIAL CONTROL RESIDENTIAL/ LIGHT COMMERCIAL CONTROL security HVAC lighting control access control lawn & garden irrigation 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 10
Home/Light Commercial Spaces 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 11
ZigBee in the Industrial/Commercial Space 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 12
Protocol Stack Features 8-bit microcontroller (e.g. PIC18) Compact protocol stack Supports even simpler slave-only stack APPLICATION/PROFILES APPLICATION FRAMEWORK ZigBee or OEM NETWORK/SECURTIY LAYERS MAC LAYER PHY LAYER ZigBee Alliance Platform IEEE Application ZigBee Platform Stack Silicon 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 13
Frequencies and Data Rates BAND COVERAGE DATA RATE # of CHANNELS 2.4GHz ISM Worldwide 250kbps 16 868 MHz Europe 20kbps 1 915MHz ISM Americas 40kbps 10 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 14
Basic Network Characteristics 65,536 network (client) nodes Optimized for timing-critical applications Network join time:30 ms (typ) Sleeping slave changing to active: 15 ms (typ) Active slave channel access time: 15 ms (typ) Network coordinator Full Function node Reduced Function node Communications flow Virtual links 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 15
Topology Models Mesh Star Cluster Tree PAN coordinator Full Function Device Reduced Function Device 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 16
개요 ZigBee 프로토콜이란? ZigBee 기초 Exercise 1 ZigBee Devices ZigBee 네트워킹 (Networking) ZigBee 네트워킹을이용한통신 Exercise 2 동적네트워킹 (Dynamic Networking) Exercise 3 하드웨어 ZigBee 프로토콜을이용한디자인 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 17
Architecture Overview Security (SEC) Application Layer (APL) Network Layer (NWK) Host Processor Medium Access Layer 868/915 MHz PHYsical Layer 2.4 GHz PHYsical Layer RF Transceiver Radio 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 18
IEEE 802.15.4 LR-WPAN Low Rate Wireless Personal Area Network Reliable data transfer Fully acknowledged protocol Support for Low latency devices Optional Guaranteed Time Slots 3가지 data speeds - 20, 40, 250 kbps 64-bit long/16-bit short addr., 16-bit PAN ID 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 19
IEEE 802.15.4 Architecture Upper Layers Host Processor Medium Access Layer 868/915 MHz PHYsical Layer 2.4 GHz PHYsical Layer RF Transceiver 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 20
IEEE 802.15.4 PHY Radio - 3 frequency bands of operation Direct Sequence Spread Spectrum - like modulation Bit To Symbol Binary Data Symbol To Chip Modulation Modulated Signal 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 21
IEEE 802.15.4 Sub-GHz PHY 868 MHz Band, Europe 20 kbps, BPSK 1 Channel Channel 0 868.3 MHz 915 MHz ISM Band, USA 40 kbps, BPSK 10 Channels Channels 1-10 902 MHz 2 MHz 928 MHz 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 22
IEEE 802.15.4 2.4GHz PHY 2.4 GHz PHY Channels 11-26 5 MHz 2.4 GHz 2.4835 GHz 2.4 GHz ISM Band Worldwide except France & Spain 250 kbps, O-QPSK (Offset QPSK) 16 Channels 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 23
IEEE 802.15.4 MAC Carrier Sense Multiple Access with Collision Avoidance (CSMA-CA) Packet B Packet A Node A Ready Node A Tx What if Node C transmits? 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 24
IEEE 802.15.4 MAC Maximum MAC frame length of 127 bytes Data verification using 16-bit CRC Acknowledged data transfer Node B Node A Data Ack 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 25
IEEE 802.15.4 MAC Ad-hoc Networks Dynamic association/disassociation 16-bit PAN Address Identifies PAN 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 26
IEEE 802.15.4 MAC Address Extended Address: 64-bit Short Address: 16-bit To reduce message/code overhead IEEE Extended Unique Identifier - EUI-64 TM 64-bit Organizational Unique Id (OUI) Value Upper 24-bit assigned by IEEE Lower 40-bit assigned by organization May use your Ethernet OUI 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 27
IEEE 802.15.4 MAC Secured and Unsecured mode Optional 128-bit AES Encryption Optional Access Control List Sequential Freshness Can differentiate stale packets 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 28
속성 (Attribute) 하나의 data 값 스위치값 (on/off) 온도값 ZigBee 기초 : ZigBee 용어 퍼센트단위와 data 형은미리정의됨 Attribute OnOff ON 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 29
ZigBee 기초 : ZigBee 용어 군 (Cluster) 하나또는그이상의속성 (attributes) 의무리 (group) 하나의속성 (attribute) 은오직하나의군 (cluster) 군 (cluster) 내의모든속성들 (attributes) 은반드시지원되어야함 Cluster OnOffCluster Attribute OnOff ON 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 30
ZigBee 기초 : ZigBee 용어 디바이스기술 (Device Description) 큰타겟어플리케이션에서부분에대한디바이스를기술하나또는그이상의군 (clusters) 을포함 군 (clusters) 이 inputs 인지 outputs 인지정의 Device - Switch Output Cluster OnOffCluster Attribute OnOff ON 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 31
ZigBee 기초 : ZigBee 용어 디바이스윤곽 (Device Profile) ` 타겟어플리케이션에서디바이스기술 (Device Description) 을모아놓은것 Profile Lighting Control Device - Switch Device - Light Output Cluster OnOffCluster Attribute OnOff ON Input Cluster OnOffCluster Attribute OnOff ON 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 32
ZigBee 기초 : 용어퀴즈 What is it? Dimmer Switch - 디바이스 속성 (Attribute) 군 (Cluster) Device Description Profile Initial Switch Configurations On/Off - 속성 Light Brightness - 속성 Home Control, Lightingprofile Complete System Status Current Draw Occupancy Sensor-Profile Building Automation-Profile 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 33
ZigBee 기초 : ZigBee 용어 종점 (Endpoint) 디바이스기술 (description) 을적용하기위해필요한, 군 (cluster) 들의사용자정의된그룹 복잡한적용을허용함 Device - Switch Endpoint EP7 (users choice) Output Cluster OnOffCluster Attribute OnOff ON Device - Light Endpoint EP12 (users choice) Input Cluster OnOffCluster Attribute OnOff ON 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 34
ZigBee 기초 : ZigBee 용어 노드 (Node) 하나의단일 radio 를공유하는 ZigBee 장치들의그룹 Node Device - Switch Endpoint EP7 (users choice) Output Cluster OnOffCluster Attribute OnOff RF Transceiver ON 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 35
Node Device Endpoint Output Cluster Attribute ZigBee 기초 : 용어 Quiz 2 Device Endpoint Output Cluster Attribute Input Cluster Attribute Attribute Attribute Attribute Endpoint Input Cluster Attribute RF Transceiver Endpoint Output Cluster Attribute Endpoint Output Cluster Attribute 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 36
Your Code Here ZigBee 기초 : ZigBee 구조 (Why Have Endpoints?) Application (APL) Layer Application Framework (AFG) ZDO ZigBee Device Objects IEEE 802.15.4 defined Layers Application Object Endpoint 240... Application Object Endpoint 1 ZDO public interface Device Mgmt. Binding Mgmt. Endpoint 0... Security Mgmt. NWK Mgmt. ZigBee TM Alliance defined Layers ZigBee TM Alliance defined Profiles and/or user defined profiles and application code Layer function Layer interface SSP Security Service Provider SSP Interface APSDE-SAP NLDE-SAP Application Support Sublayer (APS) APS Message Management Routing Management Endpoint Multiplexing APS Security Management NWK - Network Layer NWK Management APSME-SAP APS Security Management NWK Security Management NLME-SAP APSME-SAP NLME-SAP ZDO Mgmt. Plane MCPS-SAP MLME-SAP MAC (IEEE 802.15.4) PD-SAP PLME-SAP PHY (IEEE 802.15.4) 2.4 GHz 868/915 MHz 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 37
ZigBee 기초 : ZigBee 기반조명조절 ZigBee Alliance has defined a Home Control, Lighting profile. In this profile, they define the following devices: Switch Remote Control Switching Load Controller Dimmer Remote Control Dimming Load Controller Occupancy Sensor Light Sensor Monochromatic 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 38
ZigBee 기초 : Home Control, 조명 The Profile defines the cluster OnOffSRC 특성 (Attribute) OnOff 정의된값은 On=0xFF, Off=0x00, or Toggle=0xF0. For the Switch Remote Control (i.e. a switch), ZigBee 는하나의강제 output cluster 를정의한다. OnOffSRC For the Switching Load Controller (i.e. a light), ZigBee 는하나의강제 input cluster 를정의한다. OnOffSRC 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 39
ZigBee 기초 : ZigBee 기반조명조절 OnOff = On OnOff = On OnOffSRC.OnOff = Off OnOff = Off OnOff = Off 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 40
ZigBee 기초 : 어플리케이션개념 EP1 EP2 EP3 EP4 Lamp Radio EP9 EP5 Switch Radio 어떻게조명과스위치를맞게연결할것인가? 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 41
ZigBee 기초 : 바인딩 (Binding) EP1 EP2 EP3 EP4 EP9 EP5 Coordinator or Router 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 42
ZigBee 기초 : 바인딩 (Binding) EP1 EP2 EP3 EP4 Src Dest EP9 EP1, EP2 EP5 EP3, EP4 EP9 EP5 바인딩테이블 End_Device_Bind_req Bind_req Coordinator or Router 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 43
개요 ZigBee 프로토콜이란? ZigBee 기초 Exercise 1 ZigBee Devices ZigBee 네트워킹 (Networking) ZigBee 네트워킹을이용한통신 Exercise 2 동적네트워킹 (Dynamic Networking) Exercise 3 하드웨어 ZigBee 프로토콜을이용한디자인 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 44
Exercise 1 End_Device_Bind_req 를이용하여스위치 S2 를주변의 D1 LED 와바인딩시킴 2005 Microchip Technology Incorporated. All Rights Reserved. Slide 45
Typical ZigBee Hardware M Control SPI RF XCVR ANTENNA Trace, Monopole etc. 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 46
PICDEM Z Main Board LEDs Buttons Temp. Sensor RS232 ICD2 M RF Daughter Board 9VDC to 3.3VDC 9V Battery 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 47
PICDEM Z RF Daughter Board Daughter Board Connector RF XCVR Chipcon CC2420-2.4 GHz ZMD 44101 868/915 MHz Antenna Trace (PCB) Antenna 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 48
Exercise 1 : Using End_Device_Bind_req 1. 누가 light(s) 가되고누가switch가될지결정 2. 적절한프로젝트를열고 zigbee.def내의 MAC address 설정 3. 스위치라면프로그램을하고구동시킴. 이때부터네트워크이시작된다. 4. 조명이라면프로그램을한다. 스위치가먼저네트워크를시작한후구동시킨다. 이때네트워크에조인이되고짧은번지를얻는다.. 5. 스위치와조명이준비되면, 서로의 RB5 를 5 초내에누른다. 6. 바인딩이잘되었으면, 스위치는 RB4를통해RA1 LED조명을조절할수있다. 7. 다른조명들을위해서 4-7 스텝을반복한다. 어떻게하나의스위치로다른모든조명을버턴조작할수있는지에주목하라. 8. SendEndDeviceBindReq 함수가어떻게 End Device Bind request를구성하는지를살펴본다 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 49
개요 ZigBee 프로토콜이란? ZigBee 기초 Exercise 1 ZigBee Devices ZigBee 네트워킹 (Networking) ZigBee 네트워킹을이용한통신 Exercise 2 동적네트워킹 (Dynamic Networking) Exercise 3 하드웨어 ZigBee 프로토콜을이용한디자인 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 50
ZigBee Devices: IEEE 802.15.4 Devices IEEE specification 은두가지종류의무선디바이스를정의함 FFD (Full Function Devices) RFD (Reduced Function Devices) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 51
ZigBee Devices: Full Function Device ZigBee 서비스의주된부분 ( 전부는아님 ) 들지원 peer-to-peer 연결가능 네트워크내에다른디바이스 Join 허용가능 일반적으로메인전원을사용 Transceiver 는항상켜져있어야함 상대적으로많은프로그램및데이터메모리가필요함 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 52
ZigBee Devices: Reduced Function Device 제한된 ZigBee 서비스지원 FFD를통하여만네트워크에Join 함연결된 FFD를통하여서만통신함 배터리전원으로구동가능 Low duty cycle idle 상태에서 transceiver를 off 할수있음 보다적은 program 및 data memory 필요 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 53
ZigBee Devices ZigBee Specification 은세가지종류의디바이스를정의함 ZigBee Coordinator ZigBee Router ZigBee End Device 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 54
ZigBee Devices: ZigBee Coordinator 항상 Full Function Device 모든 ZigBee 서비스를지원 binding 과 routing 을포함 peer-to-peer 연결가능 Forms the network 새로운네트워크멤버에대해허용 / 거부가능 메인전원으로구동 Transceiver는항상켜져있어야함 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 55
ZigBee Devices: ZigBee Router 항상 Full Function Device 네트워크연결을다른노드 (node) 에허용함으로써네트워크의물리적연결확장모든 ZigBee 서비스지원 바인딩과라우팅포함 peer-to-peer 연결가능 메인전원으로구동 Transceiver 는항상켜져있어야함 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 56
ZigBee Devices: ZigBee End Device 일반적으로 Reduced Function Device Full Function Device 도될수있음 ZigBee 서비스의일부를제공 바인딩과라우팅을포함하지않음 오직상위노드 (parent node) 만을통하여통신배터리전원가능 Idle 상태에서 Transceiver 오프가능 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 57
개요 ZigBee 프로토콜이란? ZigBee 기초 Exercise 1 ZigBee Devices ZigBee 네트워킹 ZigBee 네트워킹을이용한통신 Exercise 2 동적네트워킹 (Dynamic Networking) Exercise 3 하드웨어 ZigBee 프로토콜을이용한디자인 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 58
ZigBee Networking: Star Network 일반적으로배터리전원 Rx는메인전원으로항상켜져있어야함 Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 59
ZigBee Networking: Star Network Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 60
ZigBee Networking: Tree (Cluster) Network 일반적으로배터리전원 Rx는메인전원으로항상켜져있어야함 Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 61
ZigBee Networking: Tree (Cluster) Network Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 62
ZigBee Networking: Mesh (Peer-to-Peer) Network 일반적으로배터리전원 Rx는메인전원으로항상켜져있어야함 Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 63
ZigBee Networking: Mesh (Peer-to-Peer) Network Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 64
ZigBee Networking: Mesh (Peer-to-Peer) Network Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 65
ZigBee Networking: Mesh (Peer-to-Peer) Network Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 66
Quiz What is an attribute? What is a cluster? What is an endpoint? How do FFDs and RFDs differ? When would you chose an RFD over an FFD? I want to develop a wireless controller for a video game system. What topology would you chose? 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 67
개요 ZigBee 프로토콜이란? ZigBee 기초 Exercise 1 ZigBee Devices ZigBee 네트워킹 ZigBee 네트워크를이용한통신 Exercise 2 동적네트워킹 (Dynamic Networking) Exercise 3 하드웨어 ZigBee 프로토콜을이용한디자인 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 68
ZigBee 네트워크를이용한통신 : Addressing Devices 방송 (Broadcast ) Address 0xFFFF 라디오범위내에있으면패킷을받는다. 패킷은모두가그패킷을받거나타임아웃될때까지재전송된다 유니캐스트 (Unicast) 목적지의 16-bit address 를사용 오직그디바이스의라디오만그패킷을받는다. ( 다른모든것은패킷을걸러서버린다 ) 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 69
ZigBee 네트워크를이용한통신 Key-Value Pair (KVP) Key Cluster/Attribute Value Data value of the attribute KVP 명령 Set set an attribute Get get an attribute Event event 발생시 Message (MSG) 자유로운데이터전송포맷 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 70
ZigBee 네트워크를이용한통신 : Key-Value Pair Frame Format Cluster: OnOffSRC Attribute: OnOff Command: SET Value: Off 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 71
ZigBee 네트워크를이용한통신 : Message Frame Format Cluster: MSG_Cluster Values: [multiple] 직접적인 binary data 전송지원 Proprietary 데이터전송 데이터크기는 IEEE frame size 와 ZigBee overhead 에의해제한됨 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 72
개요 ZigBee 프로토콜이란? ZigBee 기초 Exercise 1 ZigBee Devices ZigBee 네트워킹 ZigBee 네트워크를이용한통신 Exercise 2 동적네트워킹 (Dynamic Networking) Exercise 3 하드웨어 ZigBee 프로토콜을이용한디자인 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 73
Exercise 2 KVP Frames 구성및전송 2005 Microchip Technology Incorporated. All Rights Reserved. Slide 74
Exercise 2 Notes zigbee.def 내의 MAC address 변경디렉토리에있는 zmasters05profile.h profile definition file 확인 Coordinator로 KVP message 전송메인스크린에메시지가나타남 Bonus 그 Profile 에서유효한다른함수는무엇인가?? 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 75
개요 ZigBee 프로토콜이란? ZigBee 기초 Exercise 1 ZigBee Devices ZigBee 네트워킹 ZigBee 네트워크를이용한통신 Exercise 2 동적네트워킹 (Dynamic Networking) Exercise 3 하드웨어 ZigBee 프로토콜을이용한디자인 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 76
동적네트워킹 What we know 유효한다른종류의노드 (node) 다른종류의네트워크토플로지와용도네트워크상에서어떻게메시지를다른디바이스로보내는가? What is left? 어떻게디바이스가네트워크에조인하는가? 어떻게네트워크에서벗어난것에대해언급할수있는가?? 네트워크내의노드가실패한경우어떤일이생기나? 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 77
동적네트워킹 : 네트워크에연결 (Joining a Network) 비컨 (Beacon) request 영역내에서 ZigBee 라우터와 Coordinators 에연결된것은반응 (Respond) 함. Pick one to join to and send that device an association request ZigBee Router or ZigBee Coordinator responds with an association response If the response is Denied, try to connect to a different network or keep polling the same network to wait for an opening. 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 78
동적네트워킹 : 재연결 (Rejoining) Orphan request 를내보냄 이전 parent가여전히존재하고 Hear 할수있다면, coordinator realignment를통하여반응한다. 바인딩은유지됨 만약 orphan request의응답이없는경우는아래중하나로이동할수있음 동일한 parent 를찾기위한연속적인검색포기하고새로운 Node 인것으로연결되는경우 새로운16-bit 네트워크 address를부여받음 바인딩이재생성됨 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 79
동적네트워킹 : 네트워크에문의 (Querying the Network) ZigBee Device Profile Built-in ZigBee Functions Endpoint 0를통한Interface 서비스 Discovery 다른디바이스가무엇을하고있는지를알려줌 디바이스 Discovery 네트워크상에다른디바이스를위치시킴 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 80
동적네트워킹 : 기술자 (Descriptors) Node Descriptor Type of Node and capabilities Node Power Descriptor Node Power Characteristics Simple Descriptor Describe the application s endpoints 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 81
Mandatory, one per node 디바이스종류를표현 동적네트워킹 : Node Descriptor ZigBee Coordinator, ZigBee Router, End Device 동작주파수밴드보안성전원소스 (Power Source) If the receiver is on when Idle 버퍼크기 (Buffer size) I am: An end device 2.4 GHz Level 6 security Battery powered My Rx is off when I am Idle My buffer is 128 bytes 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 82
동적네트워킹 : Node Power Descriptor Mandatory, one per node 세부적인 power capabilities를기술 How the is receiver switched on 영구적, 주기적, 또는 When stimulated 유효한 power sources 현 power source 현 charge status 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 83
동적네트워킹 : Simple Descriptor Mandatory for each endpoint Endpoint 를기술 Endpoint number ( 개수 ) Application Profile ID, from the ZigBee Alliance Application Device ID, from the ZigBee Alliance Application Device Version, from the ZigBee Alliance Application Flags Endpoint Input Cluster Count Endpoint Input Cluster List Endpoint Output Cluster Count Endpoint Output Cluster List I have: An endpoint 8 EP8 has one output cluster of OnOffSRC 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 84
Active_EP_req 동적네트워킹 : Service Discovery 디바이스내의모든유효한 Endpoints 를요청 Match_Desc_req 주어진 Profile ID 와일치하는지를보기위하여모든유효한 Endpoints 를체크를요청 Match can optionally require a match of input or output clusters Node_Desc_req, Power_Desc_req, Simple_Desc_req 디바이스를위한 Descriptors 를요청 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 85
Match_Desc_req 동적네트워킹 : Service Discovery Requests a check of all active Endpoints to see if one matches a given Profile ID Match can optionally require a match of input or output clusters Match_Desc_req: My Endpoint 3 matches HCL profile, Out-Cluster of OnOffSRC My Endpoints 5 and 23 match Now I know of 3 switches that I can decide to bind to!! No Endpoints match; no response 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 86
NWK_Addr_req 동적네트워킹 : Device Discovery Broadcast inquiry for a Device s 16-bit network address based on its 64-bit IEEE address Response can optionally also include the 16-bit addresses of all of the nodes that are associated to that node. That s me. My Network address is 0x9241 NWK_Addr_req I am looking for IEEE: 00-46-00-A1-00-23-44-31 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 87
IEEE_Addr_req 동적네트워킹 : Device Discovery Unicast inquiry for a Device s 64-bit IEEE address based on its 16-bit network address Response can optionally also include the 16-bit addresses of all of the nodes that are associated to that node.??? B: B: 0xAA23 0x9134 B A: 0x9136 A D D: 0x0000 C C: 0x9443 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 88
IEEE_Addr_req 동적네트워킹 : Device Discovery Unicast inquiry for a Device s 64-bit IEEE address based on its 16-bit network address Response can optionally also include the 16-bit addresses of all of the nodes that are associated to that node. NWK_Addr_req I am looking IEEE_Addr_req: for IEEE: 0x9134, 00-46-00-A1-00-23-44-31 What is your IEEE address? I am IEEE: 00-46- 00-A1-00-23-44-31 B: B: 0xAA23 0x9134 B A A: 0x9136 D D: 0x0000 C C: 0x9443 That s me. My Network address is 0xAA23 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 89
개요 ZigBee 프로토콜이란? ZigBee 기초 Exercise 1 ZigBee Devices ZigBee 네트워킹 ZigBee 네트워크를이용한통신 Exercise 2 동적네트워킹 (Dynamic Networking) Exercise 3 하드웨어 ZigBee 프로토콜을이용한디자인 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 90
Exercise 3 - Peer-to-Peer 의소개 LED 메시지를상대편에게직접보내는 Device Discovery 서비스이용 2005 Microchip Technology Incorporated. All Rights Reserved. Slide 91
Exercise 3 zigbee.def 내의아래값을세팅 Your MAC address Receiver always on Masters05Lab3.c 파일에서 Device Discovery 메시지를구성 상대편노드 (Node) 의 64-bit address 를이용 RB5 를눌러서상대편의 16-bit network address 를가져옴 RB4 를누름으로상대편의 LED 를조절함 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 92
개요 ZigBee 프로토콜이란? ZigBee 기초 Exercise 1 ZigBee Devices ZigBee 네트워킹 ZigBee 네트워크를이용한통신 Exercise 2 동적네트워킹 (Dynamic Networking) Exercise 3 하드웨어 ZigBee 프로토콜을이용한디자인 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 93
하드웨어 : 일반적인 ZigBee 하드웨어 Microchip PICmicro MCU SPI RF XCVR ANTENNA Trace, Monopole etc. 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 94
하드웨어 : Block Diagram Application Microchip Device 802.15.4 Transceiver APL Security NWK APS MAC (Firmware) MAC (Hardware) Logic Tx chain Rx chain Bias/VCO Silicon ZigBee Stack Application 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 95
LR-WPAN 하드웨어 : IEEE 802.15.4 Low Rate Wireless Personal Area Network Reliable data transfer Fully acknowledged protocol 64-bit long/16-bit short addresses, 16-bit Personal Area Network (PAN) ID BAND COVERAGE DATA RATE # OF CHANNEL(S) 2.4 GHz ISM Worldwide 250 kbps 16 868 MHz Europe 20 kbps 1 915 MHz ISM Americas 40 kbps 10 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 96
개요 ZigBee 프로토콜이란? ZigBee 기초 Exercise 1 ZigBee Devices ZigBee 네트워킹 ZigBee 네트워크를이용한통신 Exercise 2 동적네트워킹 (Dynamic Networking) Exercise 3 하드웨어 ZigBee 프로토콜을이용한디자인 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 97
ZigBee 프로토콜을이용한디자인 : IEEE 802.15.4 MAC Address Extended Address: 64-bit 짧은 Address: 16-bit 메시지길이의오브헤드를줄이기위함 IEEE Extended Unique Identifier - EUI-64 TM 64-bit globally unique identification value Upper 32-bit assigned by IEEE as your Organizationally Unique Identifier (OUI) Lower 32-bit assigned by organization (~4 billion devices on one EUI) $1650 one time fee for OUI May use your Ethernet OUI 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 98
ZigBee 프로토콜을이용한디자인 : State of ZigBee ZigBee 표준 Version 1.0 완료 Downloadable by ZigBee Alliance members and adopters Fee to become a ZigBee adopter is $3500/yr www.zigbee.org/en/join 600+ pages Most sections have errata Version 1.1 spec coming? IEEE 802.15.4 spec available online http://standards.ieee.org/getieee802/download/802.15.4-2003.pdf 600+ pages 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 99
ZigBee 프로토콜을이용한디자인 IEEE OUI 구매 https://standards.ieee.org/regauth/oui/forms/oui-form.shtml 지역시장에필요한데이터 Rate 및라디오선정적합한 Microchip MCU 선정해당 application에맞게an965를이용하여해당 Stack 변경 Do all RF compliance certifications Do ZigBee interoperability compliance certification 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 100
ZigBee 프로토콜을이용한디자인 : Microchip ZigBee Stack Based on v1.0 of ZigBee Specifications Freely available as Microchip Application Note AN965 Must accept Electronic License Agreement Out-of-box support for MCC18 Support for 2.4 GHz radio Support for RFDs and FFDs (ZigBee Coordinators, ZigBee Routers, and FFDs as end devices) www.microchip.com/zigbee 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 101
ZigBee 프로토콜을이용한디자인 : Microchip ZigBee Stack Modular design Cooperative Multitasking Architecture Application Independent RTOS Independent Supports PIC18 microcontrollers Standard Microchip technical support Updates for enhancements, improvements, and fixes 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 102
ZigBee 프로토콜을이용한디자인 : Microchip ZigBee Stack Future Releases Support for 915/868 MHz radio Security support Support for other MCU families (PIC24, dspic digital signal controllers) HI-TECH support 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 103
요약 Provide high level familiarity with ZigBee protocol RFDs, FFDs, Network Topologies, Bindings, Attributes, Clusters, Profiles, Descriptors, Radio frequencies, Endpoints, Devices, ZigBee Coordinators, ZigBee Routers,... Experiment with the Microchip ZigBee stack Compiling and using the Microchip ZigBee stack 네트워크생성바인딩생성 Understand current status and future plans for the ZigBee stack 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 104
References IEEE 802.15.4-2003 http://standards.ieee.org/getieee802/download/802.15.4-2003.pdf ZigBee v1.0 specification AN965 - ZigBee application note available at www.microchip.com/zigbee 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 105
감사합니다! 2005 Microchip Technology Incorporated. All Rights Reserved. Class Slide 106