当前位置:网站首页>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
边栏推荐
- 1.2 differences caused by keywords
- Draw a hammer
- 135. distribute candy
- Win8.1和Win10各自的優勢
- What is the difference between ROM, ram and flash? SRAM、DRAM、PROM、EPROM、EEPROM
- Clause 33: decltype is used for auto & type formal parameters, with std:: forward
- Simple-SR:Best-Buddy GANs for Highly Detailed Image Super-Resolution论文浅析
- LeetCode第297场周赛(20220612)
- C language learning log 10.11
- Chapter 2 process management
猜你喜欢

Gradient descent, learning rate

Section 8 - Practical commissioning techniques

Analysis of scoped attribute principle and depth action selector

Advanced C - Section 3 - character functions and string functions

Luogu p1036 number selection

C language learning log 10.19

QT signal is automatically associated with the slot

Advanced C language - Section 1 - data storage

LeetCode第297场周赛(20220612)

Stepping on a horse (one stroke)
随机推荐
C language learning log 10.8
Section 2 - branch and loop statements
Section 7 - structures
Chapter 14 introduction: memory operation API
2021TPAMI/图像处理:Exploiting Deep Generative Prior for Versatile Image Restoration and Manipulation
Flex布局自适应失效的问题
Explain the differences and usage scenarios between created and mounted
Simple-SR:Best-Buddy GANs for Highly Detailed Image Super-Resolution論文淺析
QT interface rendering style
C language learning log 11.7
External sort
Trust programming - linked lists: use struct to implement linked lists, use heap to merge K ascending linked lists, and customize display
QT signal is automatically associated with the slot
Ruoyi cloud startup tutorial (hand-held graphics)
Article 29: assuming that the mobile operation does not exist, is expensive, and is not used
Chapter 15 mechanism: Address Translation
All blog navigation
Handwritten promise and its method, with detailed notes
Time display of the 12th Blue Bridge Cup
Analysis of scoped attribute principle and depth action selector