A basic API written in Rust for the CHEMION glasses.
This program is entirely based on the research conducted in the ChemionHacking repository.
This program is a WIP.
Build the program using
$ cargo build
Method : GET
Returns the BLE devices without a name.
Example :
OUTPUT :
[{"device_name":"Glasses-0E:1B","device_address":"F7:E6:B5:7B:0E:1B"}]
Method : POST
Connects to the given BLE device.
Example :
INPUT :
device_name=Glasses-0E%3A1B&device_address=F7%3AE6%3AB5%3A7B%3A0E%3A1B
THIS WILL BE CHANGED TO A JSON ENDPOINT
Method : GET
Disconnects from the current device.
Method : POST
Encodes a model to an UART command
Example :
INPUT :
{"glasses_frame":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]}
OUPUT :
{"glasses_frame":[[250,3,0,57,1,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,7,85,169]]}
Method : POST
Displays the given frame to the glasses
Example :
INPUT :
{"glasses_frame":[[250,3,0,57,1,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,7,85,169]]}
On error, the server returns an HTTP error 500.
All the error messages are following this template :
{"message":"Error message"}
- Create a web-based matrix designer
- Write endpoints' documentation
- Add configuration file
- Make a good UI
- Create tests
- Hover display
- Add error fields on all pages
- Disconnect on Ctrl+C
- mcaravati