In the course of trying to figure out why terminating BLEClient connections also disconnects BLEServer connections, I found that BLEServer has a connect() method just like BLEClient. I managed to call it on a BLEAdvertisedDevice, but nothing really happened. What is it supposed to do? It seems like it forcibly connects the client to the server? But why would that be desirable?
Source: https://github.com/espressif/arduino-es ... LEServer.h
What does BLEServer connect() do, exactly?
-
- Posts: 27
- Joined: Tue Nov 22, 2022 5:15 am
-
- Posts: 826
- Joined: Mon Jul 22, 2019 3:20 pm
Re: What does BLEServer connect() do, exactly?
If the peer (the client in the case of BLEServer) is advertising a service, connect to it. The note in the code (https://github.com/espressif/arduino-es ... #L334-L335) says "Allow to connect GATT server to peer device. Probably can be used in ANCS for iPhone"
-
- Posts: 27
- Joined: Tue Nov 22, 2022 5:15 am
Re: What does BLEServer connect() do, exactly?
Forgive my inexperience, but I thought services only existed on the server side? Does this mean that the client device has to be dual-mode BLE (like the ESP32 is)? There's no way in BLEClient.h to create a service AFAIK.
Who is online
Users browsing this forum: No registered users and 68 guests