BLE-WebSocket gateway for toio and other apps (e.g. Unity) on Windows.
The current communication protocol is provisional. It is subject to change in the near future.
- Unio and Unio.sln: Source codes of Unio itself and Visual Studio solution.
- UnityProjects\UnioForUniy: Unity project for Unio testing.
- Open
Unio.sln
with Visual Studio >= 2017. - Build and run.
- Open
UnioForUnity
project with Unity >= 2019. - Open
UnioTest\Scenes\SampleScene
. - Play it.
- Turn on the toio.
- Focus on Unity's Game Window and press
Connect
button to connect. - Press
Motor Run
button to go forward. - And so on.
Data between Unio and the client is represented in JSON format like the following.
{"serial":NUMBER, "uuid":"UUID", "data":ByteArray}
Here,
- Number: Integer value. NUMBER >= 1. Unio will generate a corresponding serial number for each toio.
- UUID: UUID corresponding to the toio characteristic.
- BYTE_ARRAY: Array of byte values.
The following data sent from the client to Unio represents a request to start a connection toio.
{"serial":0, "uuid":"", "data":[]}
For more information about Characteristic UUID and data format used for communication with toio, please refer to this official page. https://toio.github.io/toio-spec/docs/ble_communication_overview.html
UnioForUnity is including a binary of websocket-sharp.
These codes are licensed under CC0.