Skip to content

Commit 67c7edc

Browse files
authored
Merge branch 'espressif:master' into master
2 parents fa2de53 + ac312aa commit 67c7edc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+7539
-4356
lines changed

.gitlab-ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,23 @@ deploy_master_github:
3131
- git remote remove github &>/dev/null || true
3232
- git remote add github [email protected]:espressif/esp-hosted.git
3333
- git push github "${CI_COMMIT_SHA}:refs/heads/${CI_COMMIT_REF_NAME}"
34+
35+
.deploy_force_master_github:
36+
stage: deploy
37+
image: $CI_DOCKER_REGISTRY/esp32-ci-env
38+
tags:
39+
- deploy
40+
when: manual
41+
only:
42+
- master
43+
script:
44+
- mkdir -p ~/.ssh
45+
- chmod 700 ~/.ssh
46+
- echo -n $GH_KEY > ~/.ssh/id_rsa_base64
47+
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
48+
- chmod 600 ~/.ssh/id_rsa
49+
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
50+
- git remote remove github &>/dev/null || true
51+
- git remote add github [email protected]:espressif/esp-hosted.git
52+
- git push -f github "${CI_COMMIT_SHA}:refs/heads/${CI_COMMIT_REF_NAME}"
53+

README.md

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ ESP-Hosted solution provides following WLAN and BT/BLE features to host:
4040
- WLAN Station
4141
- WLAN Soft AP
4242
- BT/BLE Features:
43-
- v4.2 BR/EDR and BLE
43+
- ESP32 supports v4.2 BR/EDR and BLE
44+
- ESP32-C3 supports v5.0 BLE
4445

4546
### 1.2 Supported ESP boards
4647

@@ -68,32 +69,60 @@ ESP-Hosted uses SDIO or SPI bus for interfacing ESP boards and host platform. No
6869
##### 1.5.1 Linux Host
6970
Below table explains which feature is supported on which transport interface for Linux based host.
7071

71-
| ESP device | Transport Interface | WLAN support | Virtual serial interface | BT/BLE support |
72+
| ESP device | Transport Interface | WLAN support | Virtual serial interface | Bluetooth support |
7273
|:---------:|:-------:|:---------:|:--------:|:--------:|
73-
| ESP32 | SDIO | Yes | Yes | Yes |
74-
| ESP32 | SPI | Yes | Yes | Yes |
75-
| ESP32 | UART | No | No | Yes |
74+
| ESP32 | SDIO | Yes | Yes | BT/BLE 4.2 |
75+
| ESP32 | SPI | Yes | Yes | BT/BLE 4.2 |
76+
| ESP32 | UART | No | No | BT/BLE 4.2 |
7677
| ESP32-S2 | SDIO | NA | NA | NA |
7778
| ESP32-S2 | SPI | Yes | Yes | NA |
7879
| ESP32-S2 | UART | No | No | NA |
7980
| ESP32-C3 | SDIO | NA | NA | NA |
80-
| ESP32-C3 | SPI | Yes | Yes | No |
81-
| ESP32-C3 | UART | No | No | No |
81+
| ESP32-C3 | SPI | Yes | Yes | BLE 5.0 |
82+
| ESP32-C3 | UART | No | No | BLE 5.0 |
83+
84+
Note:
85+
* BT stands for Bluetooth BR/EDR and BLE stands for Bluetooth Low Energy specifications.
86+
* ESP-Hosted related BR/EDR 4.2 and BLE 4.2 functionalities are tested with bluez 5.43+. Whereas BLE 5.0 functionalities are tested with bluez 5.45+.
87+
* We suggest latest stable bluez version to be used. Any other bluetooth stack instead of bluez also could be used.
88+
* bluez 5.45 on-wards BLE 5.0 HCI commands are supported.
89+
* BLE 5.0 has backward compability of BLE 4.2.
8290

8391
##### 1.5.2 MCU Host
8492
Below table explains which feature is supported on which transport interface for MCU based host.
8593

86-
| ESP device | Transport Interface | WLAN support | Virtual serial interface | BT/BLE support |
94+
| ESP device | Transport Interface | WLAN support | Virtual serial interface | Bluetooth support |
8795
|:------------:|:-------:|:---------:|:--------:|:--------:|
8896
| ESP32 | SDIO | No | No | No |
89-
| ESP32 | SPI | Yes | Yes | HCI interface can be implemented over virtual serial interface |
90-
| ESP32 | UART | No | No | No |
97+
| ESP32 | SPI | Yes | Yes | BT/BLE 4.2\* |
98+
| ESP32 | UART | No | No | BT/BLE 4.2\*\* |
9199
| ESP32-S2 | SDIO | NA | NA | NA |
92100
| ESP32-S2 | SPI | Yes | Yes | NA |
93101
| ESP32-S2 | UART | No | No | NA |
94102
| ESP32-C3 | SDIO | NA | NA | NA |
95-
| ESP32-C3 | SPI | Yes | Yes | No |
96-
| ESP32-C3 | UART | No | No | No |
103+
| ESP32-C3 | SPI | Yes | Yes | BLE 5.0\* |
104+
| ESP32-C3 | UART | No | No | BLE 5.0\*\* |
105+
106+
Note: BT stands for Bluetooth BR/EDR and BLE stands for Bluetooth Low Energy specifications.
107+
108+
\* BT/BLE over SPI
109+
> BT/BLE support over SPI is not readily available. In order to implement it, one needs to:
110+
>
111+
> Port BT/BLE stack to MCU, \
112+
> Add a new virtual serial interface using the serial interface API's provided in host driver of ESP-Hosted solution.
113+
> HCI implementation in Linux Driver `host/linux/host_driver/esp32` could be used as reference. Search keyword: `ESP_HCI_IF`
114+
> Register this serial interface with BT/BLE stack as a HCI interface.
115+
116+
\*\* BT/BLE over UART
117+
> BT/BLE support over UART is not readily available. In order to implement this, one needs to:
118+
>
119+
> Port BT/BLE stack to MCU, \
120+
> Register the UART serial interface as a HCI interface with BT/BLE stack
121+
> With the help of this UART interface, BT/BLE stack can directly interact with BT controller present on ESP32 bypassing host driver and firmware
122+
> ESP Hosted host driver and a firmware plays no role in this communication
123+
124+
* Linux hosts support OTA update (Over The Air ESP32 firmware update) in C and python. MCU hosts can refer the same for their development. For detailed documentation please read
125+
[ota_update.md](docs/Linux_based_host/ota_update.md).
97126

98127
---
99128

@@ -172,18 +201,20 @@ This section describes the data communication protocol used at the transport lay
172201
##### 3.2.1 Payload Format
173202
This section explains the payload format used for data transfer on SDIO and SPI interfaces.
174203

175-
* Host and peripheral makes use of 8 byte payload header which preceeds every data packet.
204+
* Host and peripheral makes use of 12 byte payload header which preceeds every data packet.
176205
* This payload header provides additional information about the data packet. Based on this header, host/peripheral consumes transmitted data packet.
177206
* Payload format is as below
178207

179208
| Field | Length | Description |
180209
|:-------:|:---------:|:--------|
181210
| Interface type | 4 bits | Possible values: STA(0), SoftAP(1), Serial interface(2), HCI (3), Priv interface(4). Rest all values are reserved |
182-
| Reserved | 4 bits | Not in use |
183-
| Reserved | 1 byte | Not in use |
211+
| Interface number | 4 bits | Unused |
212+
| Flags | 1 byte | Additional flags like `MORE_FRAGMENT` in fragmentation |
184213
| Packet length | 2 bytes | Actual length of data packet |
185214
| Offset to packet | 2 bytes | Offset of actual data packet |
186-
| Reserved | 1 byte | Not in use |
215+
| Checksum | 2 bytes | checksum for complete packet (Includes header and payload) |
216+
| Reserved2 | 1 byte | Not in use |
217+
| seq_num | 2 bytes | Sequence number for serial inerface |
187218
| Packet type | 1 byte | reserved when interface type is 0,1 and 2. Applicable only for interface type 3 and 4 |
188219

189220
### 3.3 Integration Guide

0 commit comments

Comments
 (0)