Thanks to visit codestin.com
Credit goes to github.com

Skip to content

enhancement: BLE to TCP/WebSocket bridge #1801

@o-murphy

Description

@o-murphy

What about wrapping bleak to TCP or WebSocket bridge?
I think it is possible to make bleak wrapper that will allow BleakScanner and BleakClient usage over tcp/WebSocket, maybe with grpc.

Fort this approach needed:

  • Communication protocol, and packet data type, few variants:
    1. Use ATT/GATT simulation
    2. Use json, grpc
    3. Custom binary format
  • Server side:
    • discover/manage ble devices
    • control connections/actions/events
  • Client side:
    • bleak-compatible backend that uses connection to server (should be simple with known protocol)
    • Running client or scanner like BleakScanner.discover(device='ws://ip:port) or BleakClient(device='ws://ip:port)

I can try to create simple example how can it work both side

The main idea is not to create some high-level abstraction, but to implement a virtual BLE Dongle and forward it between the server and the client

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions