当前位置:网站首页>Modification and analysis of libcoap source code by Hongmeng device discovery module
Modification and analysis of libcoap source code by Hongmeng device discovery module
2022-06-13 05:02:00 【Snow * sleet * snow】
The soft bus device discovery module of Hongmeng system discovery The module uses coap agreement , And based on libcoap Open source library for development , The specific use is libcoap2.0 edition ( at present libcoap Updated to 3.0).
Use coap The protocol mainly considers the operation HarmonyOS In addition to mobile phones with good hardware performance 、 Computers and other equipment , There are also Internet of things devices with limited resources , Of these devices ram、rom Relatively small .coap The protocol supports lightweight and reliable transmission , It is suitable for small embedded devices with limited resources .
discovery The premise of the implementation is to ensure that the discovery end device and the receiving end device are in the same LAN and can receive each other's messages . The process consists of three steps :
- Discovery end device , Use coap The protocol sends the broadcast over the LAN ;
- Use of receiving end equipment PublishService Interface publishing service , When the receiver receives the broadcast , send out coap Protocol unicast to discovery end ;
- The discovery end device receives the reply unicast message , Update device information .
But the original libcoap Broadcast not supported , So we need to make some changes to its source code , So that it can support broadcasting .
Hongmeng libcoap Source warehouse :third_party_libcoap
The code mainly uses a macro to separate :COAP_SUPPORT_SOCKET_BROADCAST
边栏推荐
- E - Lucky Numbers
- C language learning log 10.5
- C language learning log 11.7
- metaRTC4.0稳定版发布
- C # get all callable methods of WebService interface [webmethod]
- Little C's Notepad
- Search DFS and BFS
- Elliptic curve encryption
- Chapter 17 free space management
- PostgreSQL Guide: Insider exploration (Chapter 7 heap tuples and index only scanning) - Notes
猜你喜欢
C language learning log 12.14
Robot pose description and coordinate transformation
The games that you've tasted
Section 7 - structures
Advanced C - Section 3 - character functions and string functions
RuoYi-Cloud启动教程(手把手图文)
Avantages de win8.1 et win10
PostgreSQL Guide: Insider exploration (Chapter 7 heap tuples and index only scanning) - Notes
What is the saturate operation in opencv
Cesium:cesiumlab makes image slices and loads slices
随机推荐
Keil uses j-link to burn the code, and an error occurs: Flash download failed - one of the "Cortex-M3" solutions
Chapter 17 free space management
Sort (internal sort) + external sort
C language exercise 1
Clause 28: understanding reference folding
Reductive elimination
About mission planning and improving execution
PostgreSQL Guide: inside exploration (Chapter 10 basic backup and point in time recovery) - Notes
Flex布局自适应失效的问题
RMQ、LCA
Design system based on MVC using javeswingjdbc
Analysis on the usage, response and global delivery of provide/inject
Chinese trumpet creeper
shell变量学习笔记
Shell built-in string substitution
Must know must know -c language keywords
lookup
Spice story
Bm1z002fj-evk-001 startup evaluation
LeetCode第297场周赛(20220612)