The use of different communication modes (such as USB, WLAN, and Bluetooth) varies greatly and is complex. In addition, the convergence, sharing, and conflicts between communication links cannot be resolved, and communication security is difficult to guarantee. The distributed virtual bus manages unified distributed communication between near-field devices and provides device discovery and data transmission APIs that apply to all links. Currently, the following features are available:
You can use APIs of the distributed communication subsystem to implement fast and secure communication between devices without caring about management of communication details, thereby achieving cross-platform development.
/foundation/communication/softbus_lite/ ├── authmanager # Device authentication mechanism and device knowledge library management ├── discovery # Device discovery based on CoAP ├── os_adapter # OS adaption code └── trans_service # Authentication and transmission channels
Networking: Devices must be in the same LAN.
Operating system: OpenHarmony
When using device discovery, ensure that the device to perform a discovery and the device to discover are in the same LAN and the devices can receive packets from each other.
a. After a device sends a discovery request, it uses Constrained Application Protocol (CoAP) to send a broadcast packet in the LAN.
b. The device to discover uses the PublishService API to publish services. After receiving the broadcast packet, the device sends a CoAP unicast packet to the device that performs the discovery.
c. After receiving the packet, the device that performs the discovery updates device information.
The virtual bus provides unified session-based transmission. Services can receive and send data or obtain basic attributes through sessionId. Currently, services can determine whether to accept a received session based on the service requirements and session attributes. Currently, sessions cannot be enabled.
：Code submit frequency
：React/respond to issue & PR etc.
：Well-balanced team members and collaboration
：Recent popularity of project
：Star counts, download counts etc.