Page 1 of 1

BLE working mode

Posted: Tue Feb 25, 2020 6:43 am
by jenya7
I have a remote sensor and a station that have to get some data form the sensor.
Both based on ESP32. The station connected to a power supply so no problem. But the sensor is powered from a battery and it has to be as low power consumption as possible. So I think what BLE topology should I choose. If the sensor is a server it should advertise constantly and if it's a client it should scan constantly. What is more power friendly - a client or a server ?

May I use a ble_ibeacon example ? Sensor - iBeacon Sender, station - iBeacon Receiver ?

Re: BLE working mode

Posted: Tue Feb 25, 2020 8:59 pm
by paddy_b
To form a connection, your client must be scanning while your server is advertising. Advertisements are sent at intervals, so you could have for example:
A client scanning constantly, with constant radio activity, meaning constant power use.
A server advertising at set intervals, with radio active only while adverts are transmitted, and therefore periodic power use.

Which is why it makes sense to have your low-power sensor device as the server.

Whether or not you use:
A periodic connection (wake up, connect, make a data transfer, disconnect, go to sleep, repeat)
A persistent connection (connect, periodically transfer, stay connected)
or
A Connectionless transfer like beacons, where data is embedded in advertisement packets and received by a scanning device without forming a connection

Depends on how much data you need to transfer and how often (as well as other a load of other considerations)

Re: BLE working mode

Posted: Wed Feb 26, 2020 6:01 am
by jenya7
Thank you.

Re: BLE working mode

Posted: Fri May 29, 2020 3:32 pm
by DuaneB
Is there anyway to have the battery operated server (with the sensor data) to be in some LP mode and have the Client poll it ( or something) to wake it up, connect, make a data transfer, disconnect, go to sleep, repeat?

Thanks!