1 Star 0 Fork 207

xuanfen_ren / communication_softbus_lite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 3.27 KB
一键复制 编辑 原始数据 按行查看 历史
Ted 提交于 2021-03-22 10:37 . Description:readme

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

Intelligent Soft Bus subsystem

communication_softbus_lite

communication_ipc_lite

communication_wifi_aware

1
https://gitee.com/xuanfen-ren/communication_softbus_lite.git
git@gitee.com:xuanfen-ren/communication_softbus_lite.git
xuanfen-ren
communication_softbus_lite
communication_softbus_lite
master

搜索帮助