Added BT Firmware source code (ESP32 patching framework)
* Added `firmware/build_from_source.sh` to compile firmware
This commit is contained in:
parent
a751ec335a
commit
13b601c6f2
6 changed files with 31 additions and 2 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "firmware/esp32_firmware_patching_framework"]
|
||||||
|
path = firmware/esp32_firmware_patching_framework
|
||||||
|
url = https://github.com/Matheus-Garbelini/esp32_firmware_patching_framework
|
20
README.md
20
README.md
|
@ -18,7 +18,8 @@ Differently than <u>**passive**</u> sniffers, which do not interact with the BT
|
||||||
- [Example 1 - Connect to remote target (Master Role)](#example-1---connect-to-remote-target-master-role)
|
- [Example 1 - Connect to remote target (Master Role)](#example-1---connect-to-remote-target-master-role)
|
||||||
- [Example 2 - Wait for BT connection (Slave Role)](#example-2---wait-for-bt-connection-slave-role)
|
- [Example 2 - Wait for BT connection (Slave Role)](#example-2---wait-for-bt-connection-slave-role)
|
||||||
- [Example 3 - HCI Bridge Mode (connect with other BT Host stack)](#example-3---hci-bridge-mode-connect-with-other-bt-host-stack)
|
- [Example 3 - HCI Bridge Mode (connect with other BT Host stack)](#example-3---hci-bridge-mode-connect-with-other-bt-host-stack)
|
||||||
- [3) Customising BT Host programs (Profiles)](#3-customising-bt-host-programs-profiles)
|
- [3) Compile firmware from source (ESP32 Patching Framework)](#3-compile-firmware-from-source-esp32-patching-framework)
|
||||||
|
- [4) Customising BT Host programs (Profiles)](#4-customising-bt-host-programs-profiles)
|
||||||
- [Software Architecture of BrakTooth Sniffer](#software-architecture-of-braktooth-sniffer)
|
- [Software Architecture of BrakTooth Sniffer](#software-architecture-of-braktooth-sniffer)
|
||||||
- [Features Overview](#features-overview)
|
- [Features Overview](#features-overview)
|
||||||
- [Acknowledgements](#acknowledgements)
|
- [Acknowledgements](#acknowledgements)
|
||||||
|
@ -93,7 +94,22 @@ Lastly, the `--bridge-only` only creates the HCI pseudo terminal (/dev/pts/x) s
|
||||||
<img src="docs/mode_bridge_only.png" alt="mode_bridge_only" width="600" height="auto" />
|
<img src="docs/mode_bridge_only.png" alt="mode_bridge_only" width="600" height="auto" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
### 3) Customising BT Host programs (Profiles)
|
|
||||||
|
### 3) Compile firmware from source (ESP32 Patching Framework)
|
||||||
|
|
||||||
|
The source code can be built directly from the [ESP32 Firmware Patching Framework](https://github.com/Matheus-Garbelini/esp32_firmware_patching_framework) repository as follows:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd firmware
|
||||||
|
./build_from_source.sh # clone submodule & build firmware with platformio environment 'sniffer-serial'
|
||||||
|
./firmware.py flash <serial port> # flash built firmware to ESP32 via serial port
|
||||||
|
```
|
||||||
|
|
||||||
|
The ESP32 firmware binaries (firmware.bin, bootloader.bin, partitions.bin) are copied to `firmware` folder upon successful build. Then, you can proceed to flash the firmware as described in [step 1.B)](https://github.com/Matheus-Garbelini/esp32_bluetooth_classic_sniffer#b-flash-custom-firmware-to-esp32).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 4) Customising BT Host programs (Profiles)
|
||||||
|
|
||||||
Since *BrakTooth* sniffer uses a BT host stack to guide connectivity, the following modified BlueKitchen examples are used:
|
Since *BrakTooth* sniffer uses a BT host stack to guide connectivity, the following modified BlueKitchen examples are used:
|
||||||
|
|
||||||
|
|
Binary file not shown.
9
firmware/build_from_source.sh
Executable file
9
firmware/build_from_source.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
cd esp32_firmware_patching_framework
|
||||||
|
./firmware.py build sniffer-serial
|
||||||
|
cp .pio/build/sniffer-serial/bootloader.bin ../
|
||||||
|
cp .pio/build/sniffer-serial/partitions.bin ../
|
||||||
|
cp .pio/build/sniffer-serial/firmware.bin ../ && echo 'Done. flash built firmware via ./firmware.py flash <serial port>'
|
1
firmware/esp32_firmware_patching_framework
Submodule
1
firmware/esp32_firmware_patching_framework
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 8b9fb4667e3c5c1faef8e375b8362f287818b106
|
Binary file not shown.
Loading…
Reference in a new issue