https://github.com/nopnop2002/esp-idf-uart2bt
UART to Bluetooth bridge for ESP-IDF
https://github.com/nopnop2002/esp-idf-uart2bt
ble bluetooth esp-idf esp32 gateway uart
Last synced: 9 months ago
JSON representation
UART to Bluetooth bridge for ESP-IDF
- Host: GitHub
- URL: https://github.com/nopnop2002/esp-idf-uart2bt
- Owner: nopnop2002
- License: mit
- Created: 2022-06-10T22:47:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-30T22:51:39.000Z (11 months ago)
- Last Synced: 2025-02-28T19:53:16.342Z (10 months ago)
- Topics: ble, bluetooth, esp-idf, esp32, gateway, uart
- Language: C
- Homepage:
- Size: 117 KB
- Stars: 27
- Watchers: 2
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esp-idf-uart2bt
UART to Bluetooth bridge for ESP-IDF.


# Software requirements
ESP-IDF V5.0 or later.
ESP-IDF V4.4 release branch reached EOL in July 2024.
# Using classic bluetooth (ESP32 only)
```
git clone https://github.com/nopnop2002/esp-idf-uart2bt
cd esp-idf-uart2bt/classic_bt
idf.py set-target esp32
idf.py menuconfig
idf.py flash
```
# Using ble 4.2
```
git clone https://github.com/nopnop2002/esp-idf-uart2bt
cd esp-idf-uart2bt/ble
idf.py set-target {esp32/esp32s3/esp32c2/esp32c3/esp32c6}
idf.py menuconfig
idf.py flash
```
# Configuration


# Write this sketch on Arduino Uno.
You can use any AtMega microcontroller.
```
unsigned long lastMillis = 0;
void setup() {
Serial.begin(115200);
}
void loop() {
while (Serial.available()) {
String command = Serial.readStringUntil('\n');
Serial.println(command);
}
if(lastMillis + 1000 <= millis()){
Serial.print("Hello World ");
Serial.println(millis());
lastMillis += 1000;
}
delay(1);
}
```
# Connect ESP32 and AtMega328 using wire cable
|AtMega328||ESP32|ESP32S3|ESP32C2/C3/C6|
|:-:|:-:|:-:|:-:|:-:|
|TX|--|GPIO16|GPIO2|GPIO1|
|RX|--|GPIO17|GPIO1|GPIO0|
|GND|--|GND|GND|GND|
__You can change it to any pin using menuconfig.__
# Android Application
I used [this](https://play.google.com/store/apps/details?id=de.kai_morich.serial_bluetooth_terminal) app.
# iOS Application
[This](https://apps.apple.com/jp/app/bluetooth-v2-1-spp-setup/id6449416841) might work, but I don't have iOS so I don't know.
# References
https://github.com/nopnop2002/esp-idf-web-serial
https://github.com/nopnop2002/esp-idf-uart2udp
https://github.com/nopnop2002/esp-idf-uart2mqtt