lexus2k / tinyproto

Tiny Software Protocol for communication over UART, SPI, etc
GNU General Public License v3.0
236 stars 51 forks source link

Add support for ESP32 "BluetoothSerial.h"? #33

Closed ipsod closed 2 years ago

ipsod commented 2 years ago

In case it would help, I can post a simple serial string loopback test using PyBluez on Python and BluetoothSerial.h on esp32.

I'd like to do the rest of the work, too, but the code in this library is a bit over my head and would take more work than I think I can afford right now.

lexus2k commented 2 years ago

Hi,

it depends on your case and the protocol you use in your project. If you're talking about full-duplex protocol, you need to take care of tiny_fd_get_tx_data and tiny_fd_run_rx in your code. The first one fill the buffer provided with the data to be sent over some communication channel (in your case Bluetooth SPP), and the second one parses the data you read from communication channel (Bluetooth SPP).

Similar technique is used by ESP32 SPI example