6LOWPAN E PROTOCOLOS PARA IOT EDGARD JAMHOUR 2017,
IEEE 802.15.4 Tecnologia de Radio Low Power Baixo Consumo Pequeno Alcance Baixas Taxas de Transmissão Pequeno MTU (Maximum Transmission Unit)
CARACTERÍSTICAS DA TECNOLOGIA 802.15.4 Taxas de Transmissão: 250 Kb/s, 40 Kb/s e 20 Kb/s Topologias: Estrela ou Ponto-a-Ponto Frequências de Operação: 16 canais em 2.4 GHz (ISM) 10 canais em 915 MHz (ISM) 1 canal em 868 MHz (Europeu)
BANDAS DE OPERAÇÃO E DIVISÃO EM CANAIS (VERSÃO 2006) 868MHz / 915MHz PHY Channel 0 Channels 1-10 2 MHz 868.3 MHz 902 MHz 928 MHz 2.4 GHz PHY Channels 11-26 5 MHz 2.4 GHz 2.4835 GHz Joe Dvorak, Motorola
Slide 5 PILHA IEEE 802.15.4 Upper Layers IEEE 802.15.4 SSCS IEEE 802.2 LLC, Type I IEEE 802.15.4 MAC 05 2004 Marco Naeve, Eaton Corp. IEEE 802.15.4 868/915 MHz PHY IEEE 802.15.4 2400 MHz PHY
Joe Dvorak, Motorola IEEE 802.15.4 PHY OVERVIEW PACKET STRUCTURE PHY Packet Fields Preamble (32 bits) sincronização Start of Packet Delimiter (8 bits) PHY Header (8 bits) PSDU length PSDU (0 to 1016 bits) Data field Preamble Start of Packet Delimiter PHY Header PHY Service Data Unit (PSDU) 6 Octets 0-127 Octets
TIPOS DE DISPOSITIVOS FULL Function Device (FFD) Qualquer topologia Pode ser coordenador de PAN Conversa com qualquer outro dispositivo Implementa toda a pilha do protocolo Reduced Function Device (RFD) Opera em topologias estrela ou como folhas (end-devices) Não podem ser coordenadores PAN Implementação simples Implementação simplificada da pilha de protocolos
Slide 8 STAR TOPOLOGY PAN coordinator Todos os nós se comunicam com um controlador PAN central Master/slave Controlador PAN é um nó com uma fonte de energia confiável FFD RFD Communications flow Marco Naeve, Eaton Corp.
PEER-PEER TOPOLOGY Cluster tree PAN coordinators Marco Naeve, Eaton Corp. FFD RFD Point to point Communications flow Nós podem se comunicar através do controlador Central e através de nós FFD
CLUSTER TREE
Slide 11 COMBINED TOPOLOGY Clustered stars múltiplas redes em topologia estrela controladas por diferentes controladores e conectadas entre si FFD Communications flow RFD Marco Naeve, Eaton Corp.
Slide ESTRUTURA DE SUPERFRAME OPCIONAL Battery life extension GTS 3 GTS 2 GTS 1 Contention Access Period Contention Free Period Slot 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 15ms * 2 n where 0 n 14 Network beacon Beacon extension period Contention period Transmitido pelo coordenador PAN Espaço reservado para crescimento do Beacon Acesso livre por CSMA-CA Guaranteed Time Slot Acesso de nós que precisam de garantia de banda [n = 0]. Marco Naeve, Eaton Corp.
Slide OPTIONAL FRAME STRUCTURE Inactive Period 15ms * 2 SO where 0 SO 14 15ms * 2 BO where SO BO 14 SO = Superframe order BO = Beacon order Superframe pode ter um periodo de inatividade Marco Naeve, Eaton Corp.
IEEE 802.15.4 MAC OVERVIEW ESTRUTURA GERAL DOS QUADROS Payload MAC Layer MAC Header (MHR) MAC Service Data Unit (MSDU) MAC Footer (MFR) PHY Layer Synch. Header (SHR) PHY Header (PHR) MAC Protocol Data Unit (MPDU) PHY Service Data Unit (PSDU) 4 TIPOS DE QUADROS MAC Data Frame Beacon Frame Acknowledgment Frame MAC Command Frame Joe Dvorak, Motorola
Slide FORMATO GERAL DOS QUADROS MAC Octets:2 1 0/2 0/2/8 0/2 0/2/8 variable 2 Destination Source Destination Source Frame Frame Sequence PAN PAN Frame address address check control number identifier identifier payload sequence Addressing fields MAC header MAC payload MAC footer Bits: 0-2 3 4 5 6 7-9 10-11 12-13 14-15 Dest. Source Sequrity Frame Frame type Ack. Req. Intra PAN Reserved addressing Reserved addressing enabled pending mode mode Marco Naeve, Eaton Corp. 05 2004 Frame control field
Slide 16 QUADRO DO TIPO BEACON Octets:2 1 4 or 10 2 variable variable variable 2 Frame control Beacon sequence number MAC header Source address information Superframe specification GTS fields Pending address fields MAC payload Beacon payload Frame check sequence MAC footer Bits: 0-3 4-7 8-11 12 13 14 15 Beacon Superframe Final CAP Battery life PAN Association Reserved order order slot extension coordinator permit Marco Naeve, Eaton Corp. 05 2004
QUADROS DE COMANDO Octets:2 1 4 to 20 1 variable 2 Frame control Data sequence number MAC header Address information Command type Tipos de Comando: Command payload MAC payload Frame check sequence MAC footer Association request Association response Disassociation notification Data request PAN ID conflict notification Orphan Notification Beacon request Coordinator realignment GTS request Marco Naeve, Eaton Corp.
QUADROS DE DADOS E ACK Octets:2 1 4 to 20 variable 2 Data Frame Frame Address sequence Data payload check control information number sequence MAC MAC header MAC Payload footer QUADROS ACK Octets:2 1 2 Data Frame Frame sequence check control number sequence MAC MAC header footer Marco Naeve, Eaton Corp.
TIPOS DE COMUNICAÇÃO Com ou Sem confirmação (ACK) Direto ou Indireto Com ou sem garantia (GTS em modo beacon) Maximum data length (MSDU) amaxmacframesize (102 bytes) Marco Naeve, Eaton Corp.
PRIMITIVAS MAC A camada MAC oferece uma interface entre a camada de Aplicação e a camada PHY São oferecidos dois grupos de serviços: MLME-SAP: Serviços de Gerenciamento PIB (PAN Information Base) MCPS-SAP: Serviços de Dados Marco Naeve, Eaton Corp.
FUNCIONAMENTO DAS PRIMITIVAS wpan_: funções MAC usr_: funções callback
PRIMITIVAS MAC Marco Naeve, Eaton Corp.
DATA TRANSFER MESSAGE SEQUENCE DIAGRAM Originator higher layer Originator MAC Recipient MAC Recipient higher layer MCPS-DATA.request Data frame Acknowledgment (if requested) MCPS-DATA.indication MCPS-DATA.confirm Marco Naeve, Eaton Corp.
INDIRECT DATA TRANSFER MESSAGE SEQUENCE DIAGRAM Coordinator higher layer Coordinator MAC Device MAC Device higher layer MCPS-DATA.request (indirect) Beacon frame Data request Acknowledgement Data frame Acknowledgment MCPS-DATA.indication MCPS-DATA.confirm Marco Naeve, Eaton Corp.
ASSOCIATION MESSAGE SEQUENCE DIAGRAM Device higher layer Device MAC Coordinator MAC Coordinator higher layer MLME-ASSOCIATE.request Association request Acknowledgment MLME-ASSOCIATE.indication aresponsewaittime MLME-ASSOCIATE.response Data request Acknowledgment Association response MLME-ASSOCIATE.confirm Acknowledgement MLME-COMM-STATUS.indication Marco Naeve, Eaton Corp.
Slide DISASSOCIATION MESSAGE SEQUENCE DIAGRAM = Originator higher layer Originator MAC Recipient MAC Recipient higher layer MLME-DISASSOCIATE.request Disassociation notification Acknowledgment MLME-DISASSOCIATE.confirm MLME-DISASSOCIATE.indication Marco Naeve, Eaton Corp. 05 2004
DATA POLLING MESSAGE SEQUENCE CHART Device higher layer MLME-POLL.request Device MAC Coordinator MAC Data request Acknowledgment (FP = 0) MLME-POLL.confirm No data pending at the coordinator Marco Naeve, Eaton Corp.
Slide DATA POLLING MESSAGE SEQUENCE CHART Device higher layer MLME-POLL.request Device MAC Data request Coordinator MAC Acknowledgment (FP = 1) Data MLME-POLL.confirm Acknowledgement MCPS-DATA.indication Data pending at the coordinator Marco Naeve, Eaton Corp.
Slide 29 PASSIVE SCAN Device higher layer Device MAC Coordinator MAC MLME-SCAN.request Set 1 st Channel ScanDuration Beacon Set 2 nd Channel MLME-SCAN.confirm Marco Naeve, Eaton Corp.
ACTIVE SCAN Device higher layer Device MAC Coordinator MAC MLME-SCAN.request Set 1 st Channel Beacon request CSMA ScanDuration Beacon Set 2 nd Channel Beacon request MLME-SCAN.confirm Marco Naeve, Eaton Corp.
Slide ESPAÇAMENTO INTER-FRAME Acknowledged transmission Long frame ACK Short frame ACK t ack LIFS t ack SIFS Unacknowledged transmission Long frame Short frame LIFS SIFS aturnaroundtime t ack (aturnaroundtime (12 symbols) + aunitbackoffperiod (20 symbols)) LIFS > amaxlifsperiod (40 symbols) SIFS > amacsifsperiod (12 symbols) For frames amaxsifsframesize use short inter-frame spacing (SIFS) For frames > amaxsifsframesize use long inter-frame spacing (LIFS) Marco Naeve, Eaton Corp.
OPERAÇÃO CSMA NÃO SLOTTED Un-slotted CSMA NB = 0, BE = macminbe Delay for random(2 BE - 1) unit backoff periods Perform CCA Usado em Redes sem Beacon Channel idle? N Y NB = NB+1, BE = min(be+1, amaxbe) N NB> macmaxcsmabackoffs? Y Failure Success Marco Naeve, Eaton Corp.
Slide OPERAÇÃO CSMA MODO SLOTTED Slotted CSMA NB = 0, CW = 0 Delay for random(2 BE - 1) unit backoff periods Battery life extension? Y BE = lesser of (2, macminbe) Perform CCA on backoff period boundary N BE = macminbe Channel idle? Y N Locate backoff period boundary CW = 2, NB = NB+1, BE = min(be+1, amaxbe) CW = CW - 1 N NB> macmaxcsmabackoffs? CW = 0? N Modo Beacon Y Failure Y Success
VERSÕS DA TECNOLOGIA IEEE 802.15.4 VERSÃO DETALHES IEEE 802.15.4-2003 DSSS (Direct Sequence Spread Spectrum) com taxas de 20 e 40Kbit/s IEEE 802.15.4-2006 Maiores taxas de transmissão em DSSS Adição do modo PSS (Parallel Sequence Spread Spectrum) IEEE 802.15.4a IEEE 802.15.4c IEEE 802.15.4d IEEE 802.15.4e IEEE 802.15.4f IEEE 802.15.4g Adição do modo UWB (Direct Sequence Ultra-WideBand) Adição do modo CSS (Chirp Spread Spectrum) ATUALIZAÇÃO DA PHYs e BANDA NA CHINA 779-787 MHz. ATUALIZAÇÃO DA PHYs e BANDA NO JAPÃO 950-956 MHz EXTENSÕES PARA AUTOMAÇÃO INDUSTRIAL NOVAS PHYS PARA UWB, 2.4 e 433 MHz PHY PARA SERVIÇOS MUNICIPAIS UTILITÁRIOS (ELETRICIDADE, GAS e AGUA) INCLUIR MELHORIAS NA BANDA 902-928 MHz
WISUN ALLIANCE WWW.WI-SUN.ORG Especificação da FAN (Field Area Network) para Redes Utilitárias Comparação de Tecnologias Wireless para IoT: https://www.wi-sun.org/index.php/tcwp-en/file
MOTIVAÇÃO PARA 6LOWPAN Oferecer suporte a tecnologia IP para dispositivos de IoT Aplicações desenvolvidas sobre IP são independentes da tecnologia de comunicação Adaptar o uso de IPv6 as tecnologias de rádio existentes IPv6: MTU mínimo de 1280 bytes Cabeçalho IPv6: 40 bytes Cabeçalho UDP: 8 bytes IEEE 802.15.4: MSDU 102 bytes 54 bytes por pacote (sem segurança) 33 bytes por pacote (com segurança)
6LOWPAN (RFC 4944) Camada de adaptação para transporte de pacotes IPv6 sobre enlaces IEEE 802.15.4 Usa IEEE 802.15.4 em modo CSMA/CA unslotted (sem beacom) Beacon apenas para descoberta de dispositivos Introduz a fragmentação e remontagem de pacotes IPv6 Compressão dos cabeçalhos IPv6, UDP e ICMP Suporte ao roteamento MESH (mesh under)
6LOWPAN & IEEE 802.15.4 Chaiporn Jaikaeo
BYTE DISPATCH NO CABEÇALHO 6LOWPAN
6LOWPAN DISPATCH CODES 6LowPAn inclui um cabeçalho que indica como o pacote foi encapsulado Diversos formatos são suportados:
COMPRESSÃO HC1 A versão é sempre 6 O Endereço IPv6 (HOST) pode ser inferido a partir do MAC O tamanho do pacote pode ser obtido do quadro Flow Label e Traffic Class são raramente usados (0) Next Header é quase sempre TCP, UDP ou ICMP Cabeçalho IPv6
COMPRESSÃO HC1
COMPRESSÃO HC2 Compressão de UDP de 8 para 3 bytes O tamanho pode ser deduzido pelo tamanho do quadro Restringir as portas a faixa: 61616-61631 (16 valores) Portas podem ser representadas por 4 bits 2 bytes 2 bytes CABEÇALHO UDP
COMPRESSÃO H1+H2
PAYLOAD COM E SEM COMPRESSÃO Sem Compressão (código 01000001) Com Compressão (código 01000010 = HC1) Pode ser seguido de compressão HC2 Funciona apenas para endereços Link-Local
IPHC: IMPROVED HC Compressão HC1 e HC2 são sem estado e funcionam apenas para endereços IPv6 do tipo Link Local IPHC é uma forma de compressão mais geral, que operar em modo com ou sem estado Os prefixos IPv6 são removidos
QUADROS FRAMENTADOS 1. Pacotes IPv6 maiores que o MTU são fragmentados 2. Introduz campo de offset para fragmentos 3. Tempo máximo de remontagem é 60 segundos
IMPLEMENTAÇÃO 6LOWPAN (STACK)
IMPLEMENTAÇÃO 6LOWPAN (GATEWAY) RNDIS: Remote Network Driver Interface Specification
EXEMPLOS DE REDES 6LOWPAN Gateway 6LowPan para IPv6 Chaiporn Jaikaeo
MESH UNDER VS ROUTER Emula um único domínio de broadcast na rede 6LowPan Para camada de rede, a comunicação na WPAN é single hop RPL
CABEÇALHO MESH UNDER Hop Left é decrementado a cada salto O quadro é descartando quando o valor chega a zero
IEEE 802.15.5 Solução de Mesh-Under para redes IEEE 802.15.4-006 IETF não especificou protocolos Mesh-Under para 6LowPan RPL é o protocolo padrão proposto pelo IETF para Router-Over em redes 6LowPan