esp-at icon indicating copy to clipboard operation
esp-at copied to clipboard

ESP-AT supports the existence of Bluetooth LE server and Bluetooth LE client at the same time?

Open bolotkalil opened this issue 2 years ago • 5 comments

Hello,

Anyone know how to use GATT server and client at the same time with esp-at? I found on the documentation it is possible: Look here Link to document

I couldn't find any example how to use it..

bolotkalil avatar Jun 08 '22 07:06 bolotkalil

Maybe you can refer to this example: Bluetooth LE server read and write services

Luxin812 avatar Jul 15 '22 07:07 Luxin812

Hi, I'm facing the very same issue. Unfortunately, the cited example keeps the client/server roles separated. Moreover, the AT+BLEINIT notes state that "After the initialization, the Bluetooth LE role cannot be changed unless you run AT+RST to restart the system first and then re-initialize the Bluetooth LE role."

Could you please clarify this?

albertospagnolo avatar Jul 27 '22 16:07 albertospagnolo

Hi,

This document should be revised. In fact, after initializing the BLE role, if you want to change the BLE role, you can execute the AT+BLEINIT=0 command to cancel the BLE role, and then switch the BLE role. It is not necessary to restart the system to change the BLE role. In fact, whether you are initializing the client or the server, you can use the GATT server and client at the same time with esp-at. You can synchronize your usage scenario here. Maybe I can provide you with the AT command sequence of this scenario.

Luxin812 avatar Jul 28 '22 02:07 Luxin812

Hi, thank you. This seems to conflict with another note:

After the initialization, the Bluetooth LE role cannot be changed unless you run AT+RST to restart the system first and then re-initialize the Bluetooth LE role.

Anyway, what I'd like to achieve is to have two concurrent sessions, so that I can create a daisy-chain between nodes, where every node is a server for the previous and a client for the next. This doesn't seem to be possible, right? Your statement suggests that client and server coexist in terms of function availability, but their radio activity is mutually exclusive.

Thanks again.

albertospagnolo avatar Jul 28 '22 08:07 albertospagnolo

Hi, thank you. This seems to conflict with another note:

After the initialization, the Bluetooth LE role cannot be changed unless you run AT+RST to restart the system first and then re-initialize the Bluetooth LE role.

Anyway, what I'd like to achieve is to have two concurrent sessions, so that I can create a daisy-chain between nodes, where every node is a server for the previous and a client for the next. This doesn't seem to be possible, right? Your statement suggests that client and server coexist in terms of function availability, but their radio activity is mutually exclusive.

Thanks again.

Hi,

Yes, unfortunately espat ble does not support the scenario where each node is the server of the previous node and the client of the next node.

Luxin812 avatar Sep 20 '22 06:09 Luxin812

Closing due to inactivity. Please feel free to re-open or file a new issue if you have any more questions.

ustccw avatar Jun 05 '23 03:06 ustccw