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 ?
BLE working mode
Re: BLE working mode
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)
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)
Last edited by paddy_b on Thu Feb 27, 2020 8:55 am, edited 1 time in total.
Re: BLE working mode
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!
Thanks!
Who is online
Users browsing this forum: No registered users and 39 guests