IoT Device Management with Zephyr - Ryan Erickson.pdf

編號:144845 PDF 40頁 2.91MB 下載積分:VIP專享
下載報告請您先登錄!

IoT Device Management with Zephyr - Ryan Erickson.pdf

1、#EMBEDDEDOSSUMMITIoT Device Management with ZephyrRyan Erickson,Laird Connectivity How to manage gateways and end devices from the cloud Configuration of the devices from the cloud Remote Monitoring and debugOverviewCanvas Device Manager reduces IoT deployment complexity and empowers remote device o

2、perationsSoftware UpdateHealth MonitoringFactory ProvisionedTelemetry EnablementConfigurationScalabilityDiagnostic LoggingDevice ManagementCloud PlatformUnderstanding how Canvas Device Manager fits into the IoT Network EcosystemTelemetry Application Cloud PlatformApplication FirmwareIoT GatewayIoT S

3、ensorsDevice Management Operations-Application Delivery-Configuration-Health Monitoring-DiagnosticsTelemetry Application Payloads-Time-series Sensor DataFactory ProvisioningDevice ManagementApplication DeliveryTelemetry EnablementCanvas DM FirmwareApplication Firmware LTE-M/NB-IoT Cellular Connectiv

4、ity Bluetooth LE SD Card Motion Sensor Battery BackupSentrius MG100 Gateway IP67 Battery powered 4 sensor ports Analog Inputs(0-10 VDC or 4-20 mA)Digital Inputs(Dry contact)Digital Outputs I2C/SPI+UART Sentrius BT610 I/O Sensor Security Use open standards and protocols No-touch deployment and manage

5、ment Health monitoringRequirementsThe LwM2M protocol provides messaging and data model specifications well-aligned with DM operations LwM2MAn application layer protocol and schema-based object model from the Open Mobile Alliance(OMA)for IoT device management and service enablement(telemetry)defining

6、 a vendor independent,well-formed API for device data and operations.Local NetworkIoT GatewayWide Area NetworkRemote ServiceIoT End NodeLwM2MServerLwM2M GatewayLwM2MClientLwM2M ClientObject ModelProtocolObject ModelProtocol LwM2M is a standard for representing Objects and Resources on a device LwM2M

7、 defines Objects and Resources with assigned ID numbers LwM2M defines use cases for certain Objects and Resources to facilitate common device management operations(e.g.,Firmware Update)What is LwM2M?A simple way to think of it is as if the device is running an HTTP server with:a top-level directory

8、structure(Objects)containingone or more directories(Object Instances)that themselves containdirectories(Resources)that containdirectories of data(Resource Instances)/ObjID/InstRoot LevelObjectID LevelObject Instance Level/ResIDResource Level/InstResource Instance LevelExample Path:/ObjID/Inst/ResID/

9、Inst LwM2M defines ID numbers for many ObjID and ResID path elements For example,the Device Object has ObjID=3 and defines a set of ResIDsWhat is LwM2M?/3/0Device ObjectIDDevice Object Instance 0/2ResourceID 2/0Resource Instance 0Example Path:/3/0/2 Note the Resource Instance is assumed to be 0 if n

10、ot provided in the path This path is used to request Resource 2 of Object 3 from the device Resource 2 of Object 3 is the devices Serial Number per Object 3s schema LwM2M Registry defines standard object schema for Object and Resource IDshttps:/technical.openmobilealliance.org/OMNA/LwM2M/LwM2MRegist

11、ry.html LwM2M Gateway adds an additional concept to the standard LwM2M path for accessing end nodes,called prefixes/Prefix/ObjectId/ObjInstance/ResourceId/ResInstance The server can use prefixes to make requests to LwM2M Objects and Resources of end nodes through an LwM2M Gatewayread/n1/3/0/2 ;This

12、requests the serial number of an end node with prefix n1What is LwM2M Gateway?/Prefix/ObjectId/ObjInstance/ResourceId/ResInstance LwM2M Gateway provides an instance of Object 25 representing each end node The server can query Resources on Object 25 instances to discover end nodes How does the server

13、 discover the Device ID for end nodes?Object 25 defines ResourceID 0 as Device ID How does the server discover the prefix for each end node?Object 25 defines ResourceID 1 as Prefix How does the server discover Objects and Resources provided by end nodes?Object 25 defines ResourceID 3 as IoT Device O

14、bjectsWhat is LwM2M Gateway?LwM2M IoT Device Objects are specified during device connection(or in LwM2M terms,registration)This is provided as a String in a special format called CoRE Link Format(Link)The CoRE Link string specifies the Object Links available on the end node LwM2M Object and Resource

15、 data queried from a device is stored within the server for application accessEach time the server requests data from a device,the response is parsed,and associated data is stored in a record related to that device For end nodes,the IoT Device Objects string is provided not through the registration

16、process but as Resource 3 of Object 25 on the LwM2M Gateway the end node is connecting through.LwM2M Device CapabilitiesCommunication:Server Gateway End Device LwM2M Server mustProvide“smart”support for Object 25,allowing applications to interact with end nodes through an LwM2M Gateway based on the

17、resources present in the gateways Object 25 instances.Instantiate end node devices dynamically based on population of Object 25 instances so that applications can query and interact with them via gatewaysAllow interaction with LwM2M end node using its“prefix”Provide similar functionality at an appli

18、cation level to provide access to device management and data resource access to end nodesSupport firmware update and configuration to end nodes through gatewaysSupport access to telemetry resources on end nodes(e.g.,temp sensors)Sever RequirementsLwM2M Gateway is equipped with a Network interface ca

19、pable of UDP Socket communicationLwM2M Gateway RegistrationNetwork InterfaceNetwork InterfaceRequestResponseLwM2M ServerIoT GatewayLwM2MCoAPDTLSUDP Gateways equipped with a network interface can directly interface to the LwM2M server.*Common Protocol stack is LwM2M Object Model CoAP Request/Response

20、 mechanism DTLS as Security Layer UDP as Transport LwM2M Registration(analogous to starting a“connection”or“session”)initiated by the gateway.LwM2M Server responds with ACK,device is registered.*Assumes LwM2M bootstrap process has already occurred if neededLwM2M operations with Gateway leverage the

21、UDP Socket interfaceLwM2M Registered Gateway OperationsNetwork InterfaceNetwork InterfaceRequestResponseLwM2M ServerIoT GatewayLwM2MCoAPDTLSUDP LwM2M requests initiated by the server Gateway responds to server requests directed at its LwM2M object tree UDP Socket Interface makes it straightforward f

22、or LwM2M server and gateway to communicate directlyLwM2M End Device implements LwM2M Client,Gateway acts as proxy to serverLwM2M End Node RegistrationNetwork InterfaceEnd Node InterfaceNetwork InterfaceLwM2M ServerIoT GatewayLwM2MCoAPDTLSUDPNotificationIoT End NodeEnd Node InterfaceBroadcast/Request

23、CoRE Link RequestNon-IPLwM2MCoAP IoT End Node has its own LwM2M client and object tree,tunnels CoAP messages over Non-IP Interface to Gateway,addressable by server with a CoAP Prefix.Gateway discovers IoT End Node and adds instance of Object 25 to its own LwM2M object tree.CoAP Prefix set based on I

24、oT End Nodes Device ID.IoT End Node registration terminates at IoT Gateway.Gateway populates:Object 25,Resource 0(Device ID)from end nodes Device ID Object 25,Resource 1(Prefix)from end nodes Device ID Object 25,Resource 3(IoT Device Objects)using CoRE Link(string)from end node Gateway Object 25 obs

25、ervable by LwM2M Server,notified on each new IoT End Node discoveryCoRE Link Response/25/0/25/0/0/25/0/1/25/0/3/node-prefix/3/0/0/node-prefix/3/0/1/node-prefix/3/0/2LwM2M operations with End Nodes leverage the Gateway as an LwM2M proxyLwM2M Registered End Node OperationsNetwork InterfaceEnd Node Int

26、erfaceNetwork InterfaceLwM2M ServerIoT GatewayLwM2MCoAPDTLSUDPIoT End NodeEnd Node InterfaceRequestNon-IPLwM2MCoAP Typical LwM2M server requests to IoT End Node formed the same as to the gateway with additional Prefix value for the node pre-pended to the CoAP path.IoT Gateway may need to initiate a

27、connection to the IoT End Node in order to make the LwM2M request and receive a response.The Prefix is stripped from the CoAP request before passing it to the end node.IoT Gateway forwards response to LwM2M Server,pre-pending the nodes Prefix value to the CoAP response to indicate its source.Connect

28、ion to IoT End Node maintained until after a period of inactivity after LwM2M operations are completed.ResponseRequestResponse/25/0/0/25/0/1/25/0/3(Inactivity Timeout,Disconnect)/node-prefix/3/0/0/node-prefix/3/0/1/node-prefix/3/0/2LwM2M notifications pending from IoT End NodeLwM2M Registered End No

29、de OperationsNetwork InterfaceEnd Node InterfaceNetwork InterfaceLwM2M ServerIoT GatewayLwM2MCoAPDTLSUDPIoT End NodeEnd Node InterfaceBroadcast/RequestNon-IPLwM2MCoAP If an IoT End Node has pending LwM2M notifications and is not currently connected,a flag is set in its Broadcast(or it makes a reques

30、t to the gateway).IoT Gateway and end node may establish a connection via End Node Interface.End node passes LwM2M notification to the gateway,gateway forwards to LwM2M Server,pre-pending the nodes Prefix value to the CoAP response to indicate its source.Connection to IoT End Node maintained until a

31、fter a period of inactivity after LwM2M operations are completed.NotificationNotificationConnection Request(Inactivity Timeout,Disconnect)/25/0/0/25/0/1/25/0/3/node-prefix/3/0/0/node-prefix/3/0/1/node-prefix/3/0/2Leverage mcumgr SMP framing to“tunnel”existing LwM2M network messages over End Node Int

32、erfaceLwM2M Gateway Proxy ApproachNetwork InterfaceEnd Node InterfaceNetwork InterfaceLwM2M ServerIoT GatewayLwM2MCoAPDTLSUDPIoT End NodeEnd Node InterfaceSMPLwM2MCoAP LwM2M Read,Write,Observe CoAP requests from server are parsed by the gateway and Prefix is removed.Remaining CoAP request buffer is

33、pre-pended with an SMP Frame header using a new user-defined Group ID and passed to the IoT End Node.IoT End Node removes SMP header and passes remaining CoAP request to its LwM2M client for handling.Buffers containing CoAP Responses and Notifications from IoT End Node are pre-pended with an SMP Fra

34、me header and sent back to the Gateway Gateway removes SMP header,adds Prefix to the CoAP message and forwards it on to the LwM2M server./25/0/0/25/0/1/25/0/3/node-prefix/3/0/0/node-prefix/3/0/1/node-prefix/3/0/2SMPCoAPSMPCoAPCoAP+DTLSCoAP+DTLSSMPCoAPCoAPCoAPLwM2M Client Simple Management Protocol(S

35、MP)is defined by an 8-byte header pre-pended to an optional data packet(link).CoAP over SMP OverviewOperation CodeFlagsLengthGroupSequenceCommand IDByte 0Byte 1Bytes 2-3Bytes 4-5Byte 6Byte 7SMP Frame FormatOperation Code NameValueMGMT_OP_READ0MGMT_OP_READ_RSP1MGMT_OP_WRITE2MGMT_OP_WRITE_RSP3Group ID

36、 NameValueMGMT_GROUP_ID_OS0MGMT_GROUP_ID_IMAGE1MGMT_GROUP_ID_STAT2MGMT_GROUP_ID_CONFIG3MGMT_GROUP_ID_LOG4MGMT_GROUP_ID_CRASH5MGMT_GROUP_ID_SPLIT6MGMT_GROUP_ID_RUN7MGMT_GROUP_ID_FS8MGMT_GROUP_ID_SHELL9MGMT_GROUP_ID_PERUSER64+BytesCommand ID NameValueDataDefine a new“User”Group ID,e.g.,5683:LCZ_LWM2M_

37、TRANSPORT_BLE_SMP_GROUPDefine a“Tunnel”Command ID to tunnel CoAP message buffers“Operation Code”already defines write,write response,read and read responseEnd Node sends SMP message with LwM2M related CoAP buffers“as is”from existing LwM2M client library.End Node receives/unwraps received SMP messag

38、es and pipes to LwM2M client library.CoAP over SMP OverviewOperation CodeFlagsLengthGroupSequenceCommand IDByte 0Byte 1Bytes 2-3Bytes 4-5Byte 6Byte 7SMP Frame FormatGroup ID NameValueMGMT_GROUP_ID_LWM2M5683 BytesLwM2M CoAP BufferCommand ID NameValueLWM2M_MGMT_CMD_ID_TUNNEL0Data SMP Service over GATT

39、 used to“wrap/frame”LwM2M CoAP requests/responses between gateway and end device Gateway must inspect LwM2M server CoAP requests and parse the prefix to determine which end device to forward the request to When gateway and end device are connected,gateway writes to SMP characteristic and receives no

40、tifications from end deviceStandard SMP GATT service writes/notifications map to CoAP operations.Bluetooth Low Energy“End Node”advertisements contain new flag indicating pending LwM2M notificationsMay trigger gateway to connect and exchange LwM2M messages over SMPGateway+End Device Details25Zephyr L

41、wM2M Stack Modifications Separate dependency on UDP sockets End device and Gateway Add hooks for received LwM2M messages Gateway Pull socket implementation out of lwm2m_engine.c Add transport id to struct lwm2m_ctx Create lwm2m_transport.c and lwm2m_transport_udp.chttps:/ Pluggable LwM2M Transports

42、Add callback for incoming CoAP requests This paves the way for implementing Object 25https:/ Application Hook for LwM2M Messages First implement the actual object and its resources The APIs for object 25 Create/delete instances at runtime Allow/block list support Lookup by ID Code implemented as a Z

43、ephyr module for reusehttps:/ LwM2M Gateway(Object 25)If an end device is discovered create obj 25 instance End device indicates it has data,BLE connection is established for data transfer After inactivity timeout,BLE connection is closed If prefix exists in LwM2M request from server,forward the mes

44、sage to the end device If an end device hasnt been seen for some time,remove the obj 25 instancehttps:/ Gateway ProxyDevice Management Portal-EdgeIQDevice Management Portal-EdgeIQRemote Firmware Debug-MemfaultRemote Firmware Debug-MemfaultApplication FirmwareGateways and SensorsMQTTLwM2MAzure IoT Hu

45、bApplication PlatformCumulocity IoT Application PlatformAWS IoTApplication PlatformTelemetry DataCustomization RequiredStandard IoT protocol support enables a path to Application Platforms for customers who are“builders”LwM2M is designed specifically for integration with the SoftwareAG Cumulocity Io

46、T platform Adding MQTT support for telemetry data provides access to more platforms at the cost of removing supporting NB-IoT.Each cloud supporting MQTT has additional requirements for device authentication and data format.We can target any MQTT cloud platform,with the understanding additional custo

47、m firmware engineering work is required for each application and cloud platform.Canvas Enables the Path to Application Cloud Platforms for your Sensor Telemetry Data Via shell commands Attribute system SMP over shell All settings stored in file system Push new files and apply settings Configuration TemplatesDevice Configuration Hardware unique key Dual bootloader secure boot Signed firmware Shell login All secrets encrypted at rest Encrypted BLE communication(adverts and data sent in a connection)Security FeaturesGatewayhttps:/ is open source!

友情提示

1、下載報告失敗解決辦法
2、PDF文件下載后,可能會被瀏覽器默認打開,此種情況可以點擊瀏覽器菜單,保存網頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站報告下載后的文檔和圖紙-無水印,預覽文檔經過壓縮,下載后原文更清晰。

本文(IoT Device Management with Zephyr - Ryan Erickson.pdf)為本站 (2200) 主動上傳,三個皮匠報告文庫僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對上載內容本身不做任何修改或編輯。 若此文所含內容侵犯了您的版權或隱私,請立即通知三個皮匠報告文庫(點擊聯系客服),我們立即給予刪除!

溫馨提示:如果因為網速或其他原因下載失敗請重新下載,重復下載不扣分。
客服
商務合作
小程序
服務號
折疊
午夜网日韩中文字幕,日韩Av中文字幕久久,亚洲中文字幕在线一区二区,最新中文字幕在线视频网站