logo资料库

蓝牙mesh V1.0资料 入门经典必看.pdf

第1页 / 共331页
第2页 / 共331页
第3页 / 共331页
第4页 / 共331页
第5页 / 共331页
第6页 / 共331页
第7页 / 共331页
第8页 / 共331页
资料共331页,剩余部分请下载后查看
1 Introduction
1.1 Conformance
1.2 Bluetooth specification release compatibility
1.3 Language
1.3.1 Language conventions
1.3.1.1 Reserved for Future Use
1.3.1.2 Prohibited
1.3.2 Acronyms and abbreviations
1.3.3 Terminology
2 Mesh system architecture
2.1 Layered architecture
2.1.1 Model layer
2.1.2 Foundation Model layer
2.1.3 Access layer
2.1.4 Upper transport layer
2.1.5 Lower transport layer
2.1.6 Network layer
2.1.7 Bearer layer
2.2 Overview of mesh operation
2.2.1 Network and subnets
2.2.2 Devices and nodes
2.2.3 Adding devices to a mesh network
2.2.4 Communications support
2.2.5 Low power support
2.3 Architectural concepts
2.3.1 States
2.3.2 Bound states
2.3.3 Messages
2.3.4 Elements
2.3.5 Addresses
2.3.6 Models
2.3.7 Example device
2.3.8 Publish-subscribe and message exchange
2.3.9 Security
2.3.9.1 Application and network security
2.3.9.2 Obfuscation
2.3.9.3 Network and application key identifiers
2.3.9.4 Initialization vector index
2.3.10 Friendship
2.3.11 Features
2.3.12 Topology
2.4 Mesh gateway
2.5 Concurrency limitations and restrictions
2.6 Topology limitations and restrictions
3 Mesh networking
3.1 Conventions
3.1.1 Endianness and field ordering
3.1.1.1 Big endian
3.1.1.2 Little endian
3.2 Features
3.3 Bearers
3.3.1 Advertising bearer
3.3.2 GATT bearer
3.4 Network layer
3.4.1 Endianness
3.4.2 Addresses
3.4.2.1 Unassigned address
3.4.2.2 Unicast address
3.4.2.3 Virtual address
3.4.2.4 Group address
3.4.3 Address validity
3.4.4 Network PDU
3.4.4.1 IVI
3.4.4.2 NID
3.4.4.3 CTL
3.4.4.4 TTL
3.4.4.5 SEQ
3.4.4.6 SRC
3.4.4.7 DST
3.4.4.8 TransportPDU
3.4.4.9 NetMIC
3.4.5 Network interfaces
3.4.5.1 Interface input filter
3.4.5.2 Interface output filter
3.4.5.3 Local Network Interface
3.4.5.4 Advertising Bearer Network Interface
3.4.6 Network layer behavior
3.4.6.1 Relay feature
3.4.6.2 Proxy feature
3.4.6.3 Receiving a Network PDU
3.4.6.4 Transmitting a Network PDU
3.4.6.5 Network Message Cache
3.5 Lower transport layer
3.5.1 Endianness
3.5.2 Lower Transport PDU
3.5.2.1 Unsegmented Access message
3.5.2.2 Segmented Access message
3.5.2.3 Unsegmented Control Message
3.5.2.3.1 Segment Acknowledgment message
3.5.2.4 Segmented Control message
3.5.3 Segmentation and reassembly
3.5.3.1 Segmentation
3.5.3.3 Segmentation behavior
3.5.3.4 Reassembly behavior
3.5.3.2 Reassembly
3.5.3.5 Low Power feature reassembly behavior
3.5.4 Lower transport layer behavior
3.5.4.1 Transmitting a Lower Transport PDU
3.5.4.2 Receiving a Lower Transport PDU
3.5.5 Friend Queue
3.6 Upper transport layer
3.6.1 Endianness
3.6.2 Upper Transport Access PDU
3.6.2.1 Encrypted access payload
3.6.2.2 TransMIC
3.6.3 Upper Transport Control PDU
3.6.4 Upper transport layer behavior
3.6.4.1 Transmitting an access payload
3.6.4.2 Receiving an Upper Transport PDU
3.6.5 Transport Control messages
3.6.5.1 Friend Poll
3.6.5.2 Friend Update
3.6.5.3 Friend Request
3.6.5.4 Friend Offer
3.6.5.5 Friend Clear
3.6.5.6 Friend Clear Confirm
3.6.5.7 Friend Subscription List Add
3.6.5.8 Friend Subscription List Remove
3.6.5.9 Friend Subscription List Confirm
3.6.5.10 Heartbeat
3.6.5.11 Summary of opcodes
3.6.6 Friendship
3.6.6.1 Functional overview
3.6.6.2 Friendship security
3.6.6.3 Friend feature
3.6.6.3.1 Friend establishment
3.6.6.3.2 Friend messaging
3.6.6.3.3 Friend management
3.6.6.4 Low Power feature
3.6.6.4.1 Low Power establishment
3.6.6.4.2 Low Power messaging
3.6.6.4.3 Low Power management
3.6.6.5 Examples of segmentation and reassembly
3.6.6.5.1 Incoming segmented message
3.6.6.5.2 Outgoing segmented message
3.6.7 Heartbeat
3.6.7.1 Functional overview
3.6.7.2 Publishing Heartbeat messages
3.6.7.3 Receiving Heartbeat messages
3.7 Access layer
3.7.1 Endianness
3.7.2 Model identifier
3.7.3 Access payload
3.7.3.1 Operation codes
3.7.3.2 Application parameters
3.7.4 Access layer behavior
3.7.4.1 Transmitting an access message
3.7.4.2 Receiving an access message
3.7.4.3 Security considerations
3.7.4.4 Message error procedure
3.7.5 Unacknowledged and acknowledged messages
3.7.5.1 Unacknowledged message
3.7.5.2 Acknowledged message
3.7.6 Publish and subscribe
3.7.6.1 Publish
3.7.6.1.1 State transitions
3.7.6.1.2 State change publishing
3.7.6.1.3 Periodic publishing
3.7.6.2 Subscribe
3.7.7 Example message sequence charts
3.7.7.1 Acknowledged Get
3.7.7.2 Acknowledged Set
3.7.7.3 Unacknowledged Set
3.7.7.4 Acknowledged set with periodic publishing
3.8 Mesh security
3.8.1 Endianness
3.8.2 Security toolbox
3.8.2.1 Encryption function
3.8.2.2 CMAC function
3.8.2.3 CCM function
3.8.2.4 s1 SALT generation function
3.8.2.5 k1 derivation function
3.8.2.6 k2 network key material derivation function
3.8.2.7 k3 derivation function
3.8.2.8 k4 derivation function
3.8.3 Sequence number
3.8.4 IV Index
3.8.5 Nonce
3.8.5.1 Network nonce
3.8.5.2 Application nonce
3.8.5.3 Device nonce
3.8.5.4 Proxy nonce
3.8.6 Keys
3.8.6.1 Device key
3.8.6.2 Application key
3.8.6.3 Network key
3.8.6.3.1 NID, Encryption Key, and Privacy Key
3.8.6.3.2 Network ID
3.8.6.3.3 IdentityKey
3.8.6.3.4 BeaconKey
3.8.6.4 Global key indexes
3.8.7 Message security
3.8.7.1 Upper transport layer authentication and encryption
3.8.7.2 Network layer authentication and encryption
3.8.7.3 Network layer obfuscation
3.8.8 Message replay protection
3.9 Mesh beacons
3.9.1 Endianness
3.9.2 Unprovisioned Device beacon
3.9.3 Secure Network beacon
3.9.3.1 Secure Network beacon behavior
3.10 Mesh network management
3.10.1 Mesh Network Creation procedure
3.10.2 Temporary guest access
3.10.3 Device UUID
3.10.4 Key Refresh procedure
3.10.4.1 Phase 1 – distribution of the new keys
3.10.4.2 Phase 2 – switching to the new keys
3.10.4.3 Phase 3 – revoking old keys
3.10.5 IV Update procedure
3.10.5.1 IV Update test mode
3.10.6 IV Index Recovery procedure
3.10.7 Node Removal procedure
3.11 Message processing flow
4 Foundation models
4.1 Conventions
4.1.1 Endianness
4.1.2 Log field transformation
4.2 State definitions
4.2.1 Composition Data
4.2.1.1 Composition Data Page 0
4.2.2 Model Publication
4.2.2.1 Publish Address
4.2.2.2 Publish Period
4.2.2.3 Publish AppKey Index
4.2.2.4 Publish Friendship Credentials Flag
4.2.2.5 Publish TTL
4.2.2.6 Publish Retransmit Count
4.2.2.7 Publish Retransmit Interval Steps
4.2.3 Subscription List
4.2.4 NetKey List
4.2.5 AppKey List
4.2.6 Model to AppKey List
4.2.7 Default TTL
4.2.8 Relay
4.2.9 Attention Timer
4.2.10 Secure Network Beacon
4.2.11 GATT Proxy
4.2.11.1 Binding with GATT Proxy state
4.2.12 Node Identity
4.2.13 Friend
4.2.14 Key Refresh Phase
4.2.15 Health Fault
4.2.15.1 Current Fault
4.2.15.2 Registered Fault
4.2.16 Health Fast Period Divisor
4.2.17 Heartbeat Publication
4.2.17.1 Heartbeat Publication Destination
4.2.17.2 Heartbeat Publication Count Log
4.2.17.3 Heartbeat Publication Period Log
4.2.17.4 Heartbeat Publication TTL
4.2.17.5 Heartbeat Publication Features
4.2.17.6 Heartbeat Publication NetKey Index
4.2.18 Heartbeat Subscription
4.2.18.1 Heartbeat Subscription Source
4.2.18.2 Heartbeat Subscription Destination
4.2.18.3 Heartbeat Subscription Count Log
4.2.18.4 Heartbeat Subscription Period Log
4.2.18.5 Heartbeat Subscription Min Hops
4.2.18.6 Heartbeat Subscription Max Hops
4.2.19 Network Transmit
4.2.19.1 Network Transmit Count
4.2.19.2 Network Transmit Interval Steps
4.2.20 Relay Retransmit
4.2.20.1 Relay Retransmit Count
4.2.20.2 Relay Retransmit Interval Steps
4.2.21 PollTimeout List
4.3 Message definitions
4.3.1 Supplemental parameter requirements
4.3.1.1 Key indexes
4.3.1.2 Element addresses
4.3.1.3 Model identifiers
4.3.1.4 Variable length parameters
4.3.1.5 Optional parameters
4.3.2 Configuration messages
4.3.2.1 Config Beacon Get
4.3.2.2 Config Beacon Set
4.3.2.3 Config Beacon Status
4.3.2.4 Config Composition Data Get
4.3.2.5 Config Composition Data Status
4.3.2.6 Config Default TTL Get
4.3.2.7 Config Default TTL Set
4.3.2.8 Config Default TTL Status
4.3.2.9 Config GATT Proxy Get
4.3.2.10 Config GATT Proxy Set
4.3.2.11 Config GATT Proxy Status
4.3.2.12 Config Relay Get
4.3.2.13 Config Relay Set
4.3.2.14 Config Relay Status
4.3.2.15 Config Model Publication Get
4.3.2.16 Config Model Publication Set
4.3.2.17 Config Model Publication Virtual Address Set
4.3.2.18 Config Model Publication Status
4.3.2.19 Config Model Subscription Add
4.3.2.20 Config Model Subscription Virtual Address Add
4.3.2.21 Config Model Subscription Delete
4.3.2.22 Config Model Subscription Virtual Address Delete
4.3.2.23 Config Model Subscription Overwrite
4.3.2.24 Config Model Subscription Virtual Address Overwrite
4.3.2.25 Config Model Subscription Delete All
4.3.2.26 Config Model Subscription Status
4.3.2.27 Config SIG Model Subscription Get
4.3.2.28 Config SIG Model Subscription List
4.3.2.29 Config Vendor Model Subscription Get
4.3.2.30 Config Vendor Model Subscription List
4.3.2.31 Config NetKey Add
4.3.2.32 Config NetKey Update
4.3.2.33 Config NetKey Delete
4.3.2.34 Config NetKey Status
4.3.2.35 Config NetKey Get
4.3.2.36 Config NetKey List
4.3.2.37 Config AppKey Add
4.3.2.38 Config AppKey Update
4.3.2.39 Config AppKey Delete
4.3.2.40 Config AppKey Status
4.3.2.41 Config AppKey Get
4.3.2.42 Config AppKey List
4.3.2.43 Config Node Identity Get
4.3.2.44 Config Node Identity Set
4.3.2.45 Config Node Identity Status
4.3.2.46 Config Model App Bind
4.3.2.47 Config Model App Unbind
4.3.2.48 Config Model App Status
4.3.2.49 Config SIG Model App Get
4.3.2.50 Config SIG Model App List
4.3.2.51 Config Vendor Model App Get
4.3.2.52 Config Vendor Model App List
4.3.2.53 Config Node Reset
4.3.2.54 Config Node Reset Status
4.3.2.55 Config Friend Get
4.3.2.56 Config Friend Set
4.3.2.57 Config Friend Status
4.3.2.58 Config Key Refresh Phase Get
4.3.2.59 Config Key Refresh Phase Set
4.3.2.60 Config Key Refresh Phase Status
4.3.2.61 Config Heartbeat Publication Get
4.3.2.62 Config Heartbeat Publication Set
4.3.2.63 Config Heartbeat Publication Status
4.3.2.64 Config Heartbeat Subscription Get
4.3.2.65 Config Heartbeat Subscription Set
4.3.2.66 Config Heartbeat Subscription Status
4.3.2.67 Config Low Power Node PollTimeout Get
4.3.2.68 Config Low Power Node PollTimeout Status
4.3.2.69 Config Network Transmit Get
4.3.2.70 Config Network Transmit Set
4.3.2.71 Config Network Transmit Status
4.3.3 Health messages
4.3.3.1 Health Current Status
4.3.3.2 Health Fault Get
4.3.3.3 Health Fault Clear Unacknowledged
4.3.3.4 Health Fault Clear
4.3.3.5 Health Fault Test
4.3.3.6 Health Fault Test Unacknowledged
4.3.3.7 Health Fault Status
4.3.3.8 Health Period Get
4.3.3.9 Health Period Set Unacknowledged
4.3.3.10 Health Period Set
4.3.3.11 Health Period Status
4.3.3.12 Health Attention Get
4.3.3.13 Health Attention Set
4.3.3.14 Health Attention Set Unacknowledged
4.3.3.15 Health Attention Status
4.3.4 Messages summary
4.3.4.1 Alphabetical summary of opcodes
4.3.4.2 Numerical summary of opcodes
4.3.5 Summary of status codes
4.4 Model definitions
4.4.1 Configuration Server model
4.4.1.1 Description
4.4.1.2 Behavior
4.4.1.2.1 Secure Network Beacon state
4.4.1.2.2 Composition Data state
4.4.1.2.3 Default TTL state
4.4.1.2.4 GATT Proxy state
4.4.1.2.5 Friend state
4.4.1.2.6 Relay state
4.4.1.2.7 Model Publication state
4.4.1.2.8 Subscription List state
4.4.1.2.9 NetKey List state
4.4.1.2.10 AppKey List state
4.4.1.2.11 Model to AppKey List state
4.4.1.2.12 Node Identity state
4.4.1.2.13 Reset
4.4.1.2.14 Key Refresh Phase state
4.4.1.2.15 Heartbeat Publication state
4.4.1.2.16 Heartbeat Subscription state
4.4.1.2.17 PollTimeout List state
4.4.1.2.18 Network Transmit state
4.4.1.3 Error handling behavior
4.4.2 Configuration Client model
4.4.2.1 Description
4.4.2.2 Behavior
4.4.2.2.1 Secure Network Beacon procedure
4.4.2.2.2 Composition Data procedure
4.4.2.2.3 Default TTL procedure
4.4.2.2.4 GATT Proxy procedure
4.4.2.2.5 Friend procedure
4.4.2.2.6 Relay procedure
4.4.2.2.7 Model Publication procedure
4.4.2.2.8 Subscription List procedure
4.4.2.2.9 NetKey List procedure
4.4.2.2.10 AppKey List procedure
4.4.2.2.11 Model to AppKey List procedure
4.4.2.2.12 Node Identity procedure
4.4.2.2.13 Reset procedure
4.4.2.2.14 Key Refresh Phase procedure
4.4.2.2.15 Heartbeat Publication procedure
4.4.2.2.16 Heartbeat Subscription procedure
4.4.2.2.17 PollTimeout List procedure
4.4.2.2.18 Network Transmit procedure
4.4.3 Health Server model
4.4.3.1 Description
4.4.3.2 Behavior
4.4.3.2.1 Current Fault state
4.4.3.2.2 Registered Fault state
4.4.3.2.3 Health Period states
4.4.3.2.4 Attention Timer state
4.4.4 Health Client model
4.4.4.1 Description
4.4.4.2 Behavior
4.4.4.2.1 Current Fault procedure
4.4.4.2.2 Registered Fault procedure
4.4.4.2.3 Health Period procedure
4.4.4.2.4 Attention Timer procedure
4.4.5 Summary of SIG Model IDs
5 Provisioning
5.1 Endianness
5.2 Provisioning bearer layer
5.2.1 PB-ADV
5.2.2 PB-GATT
5.3 Generic Provisioning layer
5.3.1 Generic Provisioning PDU types
5.3.1.1 Transaction Start PDU
5.3.1.2 Transaction Acknowledgment PDU
5.3.1.3 Transaction Continuation PDU
5.3.1.4 Provisioning Bearer Control
5.3.1.4.1 Link Open message
5.3.1.4.2 Link ACK message
5.3.1.4.3 Link Close message
5.3.2 Link Establishment procedure
5.3.3 Generic Provisioning behavior
5.4 Provisioning protocol
5.4.1 Provisioning PDUs
5.4.1.1 Provisioning Invite
5.4.1.2 Provisioning capabilities
5.4.1.3 Provisioning Start
5.4.1.4 Provisioning Public Key
5.4.1.5 Provisioning Input Complete
5.4.1.6 Provisioning Confirmation
5.4.1.7 Provisioning Random
5.4.1.8 Provisioning Data
5.4.1.9 Provisioning Complete
5.4.1.10 Provisioning Failed
5.4.2 Provisioning behavior
5.4.2.1 Beaconing
5.4.2.2 Invitation
5.4.2.3 Exchanging public keys
5.4.2.4 Authentication
5.4.2.5 Distribution of provisioning data
5.4.3 Provisioning security
5.4.3.1 FIPS P-256 Elliptic Curve definition
5.4.3.2 Provisioning key derivation
5.4.4 Provisioning errors
6 Proxy protocol
6.1 Endianness
6.2 Proxy roles
6.3 Proxy PDU
6.3.1 PDU format
6.3.2 Segmentation
6.4 Proxy filtering
6.4.1 Filter types
6.5 Proxy configuration messages
6.5.1 Set Filter Type
6.5.2 Add Addresses to Filter
6.5.3 Remove Addresses from Filter
6.5.4 Filter Status
6.6 Proxy Server behavior
6.7 Proxy Client behavior
6.8 MSC examples
6.8.1 White list filtering
6.8.2 Black list filtering
7 Mesh GATT services
7.1 Mesh Provisioning Service
7.1.1 Introduction
7.1.1.1 Conformance
7.1.1.2 Service dependency
7.1.1.3 Bluetooth specification release compatibility
7.1.1.4 GATT sub-procedure requirements
7.1.1.5 Transport dependencies
7.1.1.6 Application error codes
7.1.2 Service requirements
7.1.2.1 Declaration
7.1.2.2 Behaviors
7.1.2.2.1 Advertising
7.1.2.2.2 ATT_MTU
7.1.3 Mesh Provisioning Service characteristics
7.1.3.1 Mesh Provisioning Data In characteristic
7.1.3.1.1 Characteristic behavior
7.1.3.2 Mesh Provisioning Data Out characteristic
7.1.3.2.1 Characteristic behavior
7.2 Mesh Proxy Service
7.2.1 Introduction
7.2.1.1 Conformance
7.2.1.2 Service dependency
7.2.1.3 Bluetooth specification release compatibility
7.2.1.4 GATT sub-procedure requirements
7.2.1.5 Transport dependencies
7.2.1.6 Application error codes
7.2.2 Service requirements
7.2.2.1 Declaration
7.2.2.2 Behaviors
7.2.2.2.1 Advertising
7.2.2.2.2 Advertising with Network ID
7.2.2.2.3 Advertising with Node Identity
7.2.2.2.4 ATT_MTU
7.2.3 Mesh Proxy Service characteristics
7.2.3.1 Mesh Proxy Data In characteristic
7.2.3.1.1 Characteristic behavior
7.2.3.2 Mesh Proxy Data Out characteristic
7.2.3.2.1 Characteristic behavior
8 Sample data
8.1 Security sample data
8.1.1 s1 SALT generation function
8.1.2 k1 function
8.1.3 k2 function (master)
8.1.4 k2 function (friendship)
8.1.5 k3 function
8.1.6 k4 function
8.2 Mesh key derivation sample data
8.2.1 Application key AID
8.2.2 Encryption and privacy keys (Master)
8.2.3 Encryption and privacy keys (Friendship)
8.2.4 Network ID
8.2.5 IdentityKey
8.2.6 BeaconKey
8.3 Mesh message sample data
8.3.1 Message #1
8.3.2 Message #2
8.3.3 Message #3
8.3.4 Message #4
8.3.5 Message #5
8.3.6 Message #6
8.3.9 Message #9
8.3.7 Message #7
8.3.8 Message #8
8.3.10 Message #10
8.3.11 Message #11
8.3.12 Message #12
8.3.13 Message #13
8.3.14 Message #14
8.3.15 Message #15
8.3.16 Message #16
8.3.17 Message #17
8.3.18 Message #18
8.3.19 Message #19
8.3.20 Message #20
8.3.21 Message #21
8.3.22 Message #22
8.3.23 Message #23
8.3.24 Message #24
8.4 Beacon sample data
8.4.1 Unprovisioned device beacon (without URI)
8.4.2 Unprovisioned device beacon (with URI)
8.4.3 Secure Network beacon
8.4.4 Secure Network beacon (IV update in progress)
8.4.5 Secure Network beacon (IV update complete)
8.5 Provisioning Service sample data
8.5.1 Mesh Provisioning Service advertising service data
8.6 Mesh Proxy Service sample data
8.6.1 Service data using Network ID
8.6.2 Service data using Node Identity
8.7 PB-ADV provisioning sample data
8.7.1 PB-ADV Link Open
8.7.2 PB-ADV Link Ack
8.7.3 PB-ADV Provisioning Invite
8.7.3.1 PB-ADV Transaction Ack
8.7.4 PB-ADV Provisioning Capabilities
8.7.4.1 PB-ADV Transaction Ack
8.7.5 PB-ADV Provisioning Start
8.7.5.1 PB-ADV Transaction Ack
8.7.6 PB-ADV Provisioning Public Key (Provisioner)
8.7.6.1 PB-ADV Transaction Ack
8.7.7 PB-ADV Provisioning Public Key (Device)
8.7.7.1 PB-ADV Transaction Ack
8.7.8 PB-ADV Provisioning Confirmation (Provisioner)
8.7.8.1 PB-ADV Transaction Ack
8.7.9 PB-ADV Provisioning Confirmation (Device)
8.7.9.1 PB-ADV Transaction Ack
8.7.10 PB-ADV Provisioning Random (Provisioner)
8.7.10.1 PB-ADV Transaction Ack
8.7.11 PB-ADV Provisioning Random (Device)
8.7.11.1 PB-ADV Transaction Ack
8.7.12 PB-ADV Provisioning Data
8.7.12.1 PB-ADV Transaction Ack
8.7.13 PB-ADV Provisioning Complete
8.7.13.1 PB-ADV Transaction Ack
8.7.14 PB-ADV Link Close
8.8 PB-GATT SAR sample data
8.8.1 1st segment
8.8.2 2nd segment
8.8.3 3rd segment
8.8.4 4th segment
8.9 Proxy Configuration Message sample data
8.10 Composition Data sample data
9 References
Mesh Profile Bluetooth® Specification ▪ Revision: v1.0 ▪ Revision Date: 2017-Jul-13 ▪ Group Prepared By: Mesh Working Group ▪ Feedback Email: mesh-main@bluetooth.org Abstract: This Bluetooth specification defines fundamental requirements to enable an interoperable mesh networking solution for Bluetooth low energy wireless technology. Bluetooth SIG Proprietary
Mesh Profile / Specification Revision History Revision Number Date Comments v1.0 2017-07-13 Adopted by the Bluetooth SIG Board of Directors Bluetooth SIG Proprietary Page 2 of 331
Mesh Profile / Specification Contributors Name Robin Heydon Company Qualcomm Technologies International, Ltd. Jonathan Tanner Qualcomm Technologies International, Ltd. Victor Zhodzishsky Broadcom Corporation Wei Shen Christoffer Jerkeby Bogdan Alexandru Martin Turon Robert D. Hughes Marcel Holtmann Brian Gix Simon Slupik Piotr Winiarczyk Danilo Blasi Yao Wang Rustam Kovyazin Uday Agarwal Ericsson AB Ericsson AB NXP Semiconductors Google Inc. Intel Corporation Intel Corporation Intel Corporation Silvair, Inc. Silvair, Inc. STMicroelectronics IVT Wireless Limited Motorola Solutions Cypress Semiconductor Corporation Vasilii Aleksandrov Motorola Solutions LC Ko MediaTek, Inc. Omkar Kulkarni Cypress Semiconductor Corporation Bluetooth SIG Proprietary Page 3 of 331
Mesh Profile / Specification Use of this specification is your acknowledgement that you agree to and will comply with the following notices and disclaimers. You are advised to seek appropriate legal, engineering, and other professional advice regarding the use, interpretation, and effect of this specification. Use of Bluetooth specifications by members of Bluetooth SIG is governed by the membership and other related agreements between Bluetooth SIG and its members, including those agreements posted on Bluetooth SIG’s website located at www.bluetooth.com. Any use of this specification by a member that is not in compliance with the applicable membership and other related agreements is prohibited and, among other things, may result in (i) termination of the applicable agreements and (ii) liability for infringement of the intellectual property rights of Bluetooth SIG and its members. Use of this specification by anyone who is not a member of Bluetooth SIG is prohibited and is an infringement of the intellectual property rights of Bluetooth SIG and its members. The furnishing of this specification does not grant any license to any intellectual property of Bluetooth SIG or its members. THIS SPECIFICATION IS PROVIDED “AS IS” AND BLUETOOTH SIG, ITS MEMBERS AND THEIR AFFILIATES MAKE NO REPRESENTATIONS OR WARRANTIES AND DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT, FITNESS FOR ANY PARTICULAR PURPOSE, OR THAT THE CONTENT OF THIS SPECIFICATION IS FREE OF ERRORS. For the avoidance of doubt, Bluetooth SIG has not made any search or investigation as to third parties that may claim rights in or to any specifications or any intellectual property that may be required to implement any specifications and it disclaims any obligation or duty to do so. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, BLUETOOTH SIG, ITS MEMBERS AND THEIR AFFILIATES DISCLAIM ALL LIABILITY ARISING OUT OF OR RELATING TO USE OF THIS SPECIFICATION AND ANY INFORMATION CONTAINED IN THIS SPECIFICATION, INCLUDING LOST REVENUE, PROFITS, DATA OR PROGRAMS, OR BUSINESS INTERRUPTION, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, AND EVEN IF BLUETOOTH SIG, ITS MEMBERS OR THEIR AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF THE DAMAGES. If this specification is a prototyping specification, it is solely for the purpose of developing and using prototypes to verify the prototyping specifications at Bluetooth SIG sponsored IOP events. Prototyping Specifications cannot be used to develop products for sale or distribution and prototypes cannot be qualified for distribution. Products equipped with Bluetooth wireless technology ("Bluetooth Products") and their combination, operation, use, implementation, and distribution may be subject to regulatory controls under the laws and regulations of numerous countries that regulate products that use wireless non-licensed spectrum. Examples include airline regulations, telecommunications regulations, technology transfer controls and health and safety regulations. You are solely responsible for complying with all applicable laws and regulations and for obtaining any and all required authorizations, permits, or licenses in connection with your use of this specification and development, manufacture, and distribution of Bluetooth Products. Nothing in this specification provides any information or assistance in connection with complying with applicable laws or regulations or obtaining required authorizations, permits, or licenses. Bluetooth SIG is not required to adopt any specification or portion thereof. If this specification is not the final version adopted by Bluetooth SIG’s Board of Directors, it may not be adopted. Any specification adopted by Bluetooth SIG’s Board of Directors may be withdrawn, replaced, or modified at any time. Bluetooth SIG reserves the right to change or alter final specifications in accordance with its membership and operating agreements. Copyright © 2015–2017. All copyrights in the Bluetooth Specifications themselves are owned by Apple Inc., Ericsson AB, Intel Corporation, Lenovo (Singapore) Pte. Ltd., Microsoft Corporation, Nokia Corporation, and Toshiba Corporation. The Bluetooth word mark and logos are owned by Bluetooth SIG, Inc. Other third-party brands and names are the property of their respective owners. Bluetooth SIG Proprietary Page 4 of 331
Mesh Profile / Specification Contents 1 Introduction ...................................................................................................................................... 12 1.1 Conformance .............................................................................................................................. 12 1.2 Bluetooth specification release compatibility .............................................................................. 12 1.3 Language .................................................................................................................................... 12 1.3.1 Language conventions ........................................................................................................... 12 1.3.2 Acronyms and abbreviations ................................................................................................. 13 1.3.3 Terminology ........................................................................................................................... 15 2 Mesh system architecture ............................................................................................................... 16 2.1 Layered architecture ................................................................................................................... 16 2.1.1 Model layer ............................................................................................................................ 16 2.1.2 Foundation Model layer ......................................................................................................... 16 2.1.3 Access layer .......................................................................................................................... 17 2.1.4 Upper transport layer ............................................................................................................. 17 2.1.5 Lower transport layer ............................................................................................................. 17 2.1.6 Network layer ......................................................................................................................... 17 2.1.7 Bearer layer ........................................................................................................................... 17 2.2 Overview of mesh operation ....................................................................................................... 17 2.2.1 Network and subnets ............................................................................................................. 18 2.2.2 Devices and nodes ................................................................................................................ 19 2.2.3 Adding devices to a mesh network ........................................................................................ 19 2.2.4 Communications support ....................................................................................................... 20 2.2.5 Low power support ................................................................................................................ 20 2.3 Architectural concepts ................................................................................................................ 20 2.3.1 States .................................................................................................................................... 20 2.3.2 Bound states .......................................................................................................................... 20 2.3.3 Messages .............................................................................................................................. 20 2.3.4 Elements ................................................................................................................................ 21 2.3.5 Addresses .............................................................................................................................. 22 2.3.6 Models ................................................................................................................................... 23 2.3.7 Example device ..................................................................................................................... 29 2.3.8 Publish-subscribe and message exchange ........................................................................... 30 2.3.9 Security .................................................................................................................................. 31 2.3.10 Friendship .............................................................................................................................. 33 2.3.11 Features ................................................................................................................................ 34 2.3.12 Topology ................................................................................................................................ 35 2.4 Mesh gateway............................................................................................................................. 35 2.5 Concurrency limitations and restrictions ..................................................................................... 35 Bluetooth SIG Proprietary Page 5 of 331
Mesh Profile / Specification 2.6 Topology limitations and restrictions ........................................................................................... 35 3 Mesh networking.............................................................................................................................. 36 3.1 Conventions ................................................................................................................................ 36 3.1.1 Endianness and field ordering ............................................................................................... 36 3.2 Features ..................................................................................................................................... 37 3.3 Bearers ....................................................................................................................................... 38 3.3.1 Advertising bearer.................................................................................................................. 38 3.3.2 GATT bearer .......................................................................................................................... 38 3.4 Network layer .............................................................................................................................. 39 3.4.1 Endianness ............................................................................................................................ 39 3.4.2 Addresses .............................................................................................................................. 39 3.4.3 Address validity...................................................................................................................... 42 3.4.4 Network PDU ......................................................................................................................... 43 3.4.5 Network interfaces ................................................................................................................. 45 3.4.6 Network layer behavior .......................................................................................................... 46 3.5 Lower transport layer .................................................................................................................. 49 3.5.1 Endianness ............................................................................................................................ 50 3.5.2 Lower Transport PDU ............................................................................................................ 50 3.5.3 Segmentation and reassembly .............................................................................................. 54 3.5.4 Lower transport layer behavior .............................................................................................. 61 3.5.5 Friend Queue ......................................................................................................................... 61 3.6 Upper transport layer .................................................................................................................. 62 3.6.1 Endianness ............................................................................................................................ 62 3.6.2 Upper Transport Access PDU ............................................................................................... 62 3.6.3 Upper Transport Control PDU ............................................................................................... 63 3.6.4 Upper transport layer behavior .............................................................................................. 63 3.6.5 Transport Control messages ................................................................................................. 64 3.6.6 Friendship .............................................................................................................................. 74 3.6.7 Heartbeat ............................................................................................................................... 89 3.7 Access layer ............................................................................................................................... 91 3.7.1 Endianness ............................................................................................................................ 92 3.7.2 Model identifier ...................................................................................................................... 92 3.7.3 Access payload...................................................................................................................... 92 3.7.4 Access layer behavior ............................................................................................................ 94 3.7.5 Unacknowledged and acknowledged messages ................................................................... 95 3.7.6 Publish and subscribe ............................................................................................................ 96 3.7.7 Example message sequence charts ...................................................................................... 97 3.8 Mesh security.............................................................................................................................. 99 3.8.1 Endianness ............................................................................................................................ 99 Bluetooth SIG Proprietary Page 6 of 331
Mesh Profile / Specification 3.8.2 Security toolbox ..................................................................................................................... 99 3.8.3 Sequence number ............................................................................................................... 103 3.8.4 IV Index ............................................................................................................................... 103 3.8.5 Nonce .................................................................................................................................. 104 3.8.6 Keys ..................................................................................................................................... 108 3.8.7 Message security ................................................................................................................. 112 3.8.8 Message replay protection ................................................................................................... 116 3.9 Mesh beacons .......................................................................................................................... 117 3.9.1 Endianness .......................................................................................................................... 118 3.9.2 Unprovisioned Device beacon ............................................................................................. 118 3.9.3 Secure Network beacon ...................................................................................................... 120 3.10 Mesh network management ..................................................................................................... 122 3.10.1 Mesh Network Creation procedure ...................................................................................... 122 3.10.2 Temporary guest access ..................................................................................................... 122 3.10.3 Device UUID ........................................................................................................................ 123 3.10.4 Key Refresh procedure ........................................................................................................ 123 3.10.5 IV Update procedure ............................................................................................................ 127 3.10.6 IV Index Recovery procedure .............................................................................................. 130 3.10.7 Node Removal procedure .................................................................................................... 130 3.11 Message processing flow ......................................................................................................... 131 4 Foundation models ........................................................................................................................ 134 4.1 Conventions .............................................................................................................................. 134 4.1.1 Endianness .......................................................................................................................... 134 4.1.2 Log field transformation ....................................................................................................... 134 4.2 State definitions ........................................................................................................................ 135 4.2.1 Composition Data ................................................................................................................ 135 4.2.2 Model Publication ................................................................................................................ 137 4.2.3 Subscription List .................................................................................................................. 139 4.2.4 NetKey List .......................................................................................................................... 139 4.2.5 AppKey List ......................................................................................................................... 139 4.2.6 Model to AppKey List ........................................................................................................... 139 4.2.7 Default TTL .......................................................................................................................... 140 4.2.8 Relay ................................................................................................................................... 140 4.2.9 Attention Timer .................................................................................................................... 140 4.2.10 Secure Network Beacon ...................................................................................................... 141 4.2.11 GATT Proxy ......................................................................................................................... 141 4.2.12 Node Identity ....................................................................................................................... 142 4.2.13 Friend .................................................................................................................................. 142 4.2.14 Key Refresh Phase .............................................................................................................. 143 Bluetooth SIG Proprietary Page 7 of 331
Mesh Profile / Specification 4.2.15 Health Fault ......................................................................................................................... 143 4.2.16 Health Fast Period Divisor ................................................................................................... 146 4.2.17 Heartbeat Publication .......................................................................................................... 147 4.2.18 Heartbeat Subscription ........................................................................................................ 148 4.2.19 Network Transmit................................................................................................................. 150 4.2.20 Relay Retransmit ................................................................................................................. 151 4.2.21 PollTimeout List ................................................................................................................... 151 4.3 Message definitions .................................................................................................................. 152 4.3.1 Supplemental parameter requirements ................................................................................ 152 4.3.2 Configuration messages ...................................................................................................... 153 4.3.3 Health messages ................................................................................................................. 183 4.3.4 Messages summary ............................................................................................................. 188 4.3.5 Summary of status codes .................................................................................................... 194 4.4 Model definitions ....................................................................................................................... 194 4.4.1 Configuration Server model ................................................................................................. 194 4.4.2 Configuration Client model .................................................................................................. 211 4.4.3 Health Server model ............................................................................................................ 221 4.4.4 Health Client model ............................................................................................................. 224 4.4.5 Summary of SIG Model IDs ................................................................................................. 226 5 Provisioning ................................................................................................................................... 227 5.1 Endianness ............................................................................................................................... 228 5.2 Provisioning bearer layer .......................................................................................................... 228 5.2.1 PB-ADV ............................................................................................................................... 228 5.2.2 PB-GATT ............................................................................................................................. 229 5.3 Generic Provisioning layer ........................................................................................................ 230 5.3.1 Generic Provisioning PDU types.......................................................................................... 231 5.3.2 Link Establishment procedure ............................................................................................. 235 5.3.3 Generic Provisioning behavior ............................................................................................. 236 5.4 Provisioning protocol ................................................................................................................ 237 5.4.1 Provisioning PDUs ............................................................................................................... 237 5.4.2 Provisioning behavior .......................................................................................................... 245 5.4.3 Provisioning security ............................................................................................................ 257 5.4.4 Provisioning errors ............................................................................................................... 259 6 Proxy protocol ............................................................................................................................... 260 6.1 Endianness ............................................................................................................................... 260 6.2 Proxy roles ................................................................................................................................ 260 6.3 Proxy PDU ................................................................................................................................ 260 6.3.1 PDU format .......................................................................................................................... 260 6.3.2 Segmentation ...................................................................................................................... 261 Bluetooth SIG Proprietary Page 8 of 331
分享到:
收藏