Skip to content

Commit

Permalink
Fixed formating
Browse files Browse the repository at this point in the history
  • Loading branch information
vovagorodok committed Jun 13, 2024
1 parent 2c90059 commit ce68869
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ software/hardware name/version indication.
More about library in `doc` folder.

## Upload possibilities
For upload using scripts see `tools` folder.\
For upload using mobile/web/desktop application see:\
For upload using scripts see `tools` folder.
For upload using mobile/web/desktop application see:
https://github.com/vovagorodok/ble_ota_app

## Configuration
By default `ArduinoBLE` is used. For `NimBLE-Arduino` some changes are reguired.\
By default `ArduinoBLE` is used. For `NimBLE-Arduino` some changes are reguired.
For PlatformIO. Add to `platformio.ini`:
```
build_flags =
Expand All @@ -25,5 +25,5 @@ compiler.cpp.extra_flags=-D USE_NIM_BLE_ARDUINO_LIB
```

## Opened discussions
https://github.com/JAndrassy/ArduinoOTA/discussions/157 \
https://github.com/JAndrassy/ArduinoOTA/discussions/157
https://github.com/fbiego/ESP32_BLE_OTA_Arduino/issues/19
14 changes: 7 additions & 7 deletions doc/ADVERTISING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
Service advertises on uuid: `15c155ca-36c5-11ed-adc0-9741d6a72f04`.

## Upload characteristics
Advertise in two rx and tx characteristics with max transfer block size 512 bytes.\
Rx uuid: `15c1564c-36c5-11ed-adc1-a3d6cf5cc2a4`.\
Tx uuid: `15c156e2-36c5-11ed-adc2-7396d4fd413a`.\
Advertise in two rx and tx characteristics with max transfer block size 512 bytes.
Rx uuid: `15c1564c-36c5-11ed-adc1-a3d6cf5cc2a4`.
Tx uuid: `15c156e2-36c5-11ed-adc2-7396d4fd413a`.
Comunicates via protocol: `PROTOCOL.md`.

## Software/hardware name/version characteristics
Constant characteristics that indicates special software/hardware information.\
Hardware name is `string` characteristic in uuid: `15c1576e-36c5-11ed-adc3-8799895de51e`.\
Hardware version is `uint8[3]` (major, minor, patch) characteristic in uuid: `15c157fa-36c5-11ed-adc4-579c60267b47`.\
Software name is `string` characteristic in uuid: `15c15886-36c5-11ed-adc5-1bc0d0a6069d`.\
Constant characteristics that indicates special software/hardware information.
Hardware name is `string` characteristic in uuid: `15c1576e-36c5-11ed-adc3-8799895de51e`.
Hardware version is `uint8[3]` (major, minor, patch) characteristic in uuid: `15c157fa-36c5-11ed-adc4-579c60267b47`.
Software name is `string` characteristic in uuid: `15c15886-36c5-11ed-adc5-1bc0d0a6069d`.
Software version is `uint8[3]` (major, minor, patch) characteristic in uuid: `15c1591c-36c5-11ed-adc6-dbe9603dbf19`.
14 changes: 7 additions & 7 deletions doc/PROTOCOL.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Overal
Binary protocol where each transfer block contains `uint8` head at the begining.\
Binary protocol where each transfer block contains `uint8` head at the begining.
Head codes:
```
OK 0x00
Expand All @@ -16,8 +16,8 @@ END 0x12
```

## Basic scenario
Designations for examples:\
`->` - recived from central\
Designations for examples:
`->` - recived from central
`<-` - send to central
```
-> BEGIN <uint32 firmware size>
Expand All @@ -33,11 +33,11 @@ Designations for examples:\
-> END <uint32 crc32 checksum>
<- OK
```
`<uint32 attribute size>` maximal trensfer block.\
`<uint32 buffer size>` internal buffer stored in RAM in order to handle packages without responses.\
Maximal `<uint8[] data>` size is `<uint32 attribute size> - <head size>` bytes, where `<head size>` is 1 byte.\
`<uint32 attribute size>` maximal trensfer block.
`<uint32 buffer size>` internal buffer stored in RAM in order to handle packages without responses.
Maximal `<uint8[] data>` size is `<uint32 attribute size> - <head size>` bytes, where `<head size>` is 1 byte.
Internal buffer is created in order to increase upload speed. Packages can be handled immediately, because are stored in RAM instead of flash.
Central should wait response only when buffer is overloaded.\
Central should wait response only when buffer is overloaded.
In order to know more about error codes ckeck scenarios below.

## Comunication lost scenario
Expand Down
2 changes: 1 addition & 1 deletion doc/VERSIONING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Overal
Library advertises 4 characteristics in order to indicate software/hardware type/version.
See `ADVERTISING.md`. User of library can decide what characteristics should contain.\
See `ADVERTISING.md`. User of library can decide what characteristics should contain.
Central can handle this data and check if software should be updated.

## Example
Expand Down
2 changes: 1 addition & 1 deletion tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python3 tools/uploader.py .pio/build/esp32dev/firmware.bin
```

## Upload current bin file
Works only with VS Code with PlatformIO plugin.\
Works only with VS Code with PlatformIO plugin.
Using python script:
```
python3 tools/current_binary_uploader.py
Expand Down

0 comments on commit ce68869

Please sign in to comment.