66 Star 371 Fork 207

OpenHarmony / communication_softbus_lite

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

Intelligent Soft Bus

Introduction

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:

  • Service publishing: After a service is published, peripheral devices can discover and use it.
  • Data transmission: A session is established based on the service name and device ID to transmit data between services.
  • Security: Communication data is encrypted.

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.

Directory Structure

/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

Constraints

Language: C

Networking: Devices must be in the same LAN.

Operating system: OpenHarmony

Usage Guidelines

  1. Device discovery

    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.

  2. Transmission

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.

Repositories Involved

DSoftBus subsystem

communication_softbus_lite

communication_ipc_lite

communication_wifi_aware

About

Implementation code for virtual bus discovery, networking, and transmission | 软总线发现、组网、传输功能实现 expand collapse
Cancel

Releases (1)

All

OpenHarmony

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/openharmony/communication_softbus_lite.git
git@gitee.com:openharmony/communication_softbus_lite.git
openharmony
communication_softbus_lite
communication_softbus_lite
master

Search

E71a60c3 8189591 Df7b7c6b 8189591