Xinyuan-LilyGO / TTGO_TWatch_Library

MIT License
863 stars 282 forks source link

BLE beacon for presence detection #93

Open anarchking opened 3 years ago

anarchking commented 3 years ago

I think it would be very useful to have an app that you click a button and it turns on the ble Beacon Broadcasting so other devices can be scanning in all rooms so you're so you're smart home can recognize what room you're in.

anarchking commented 3 years ago

Example: https://github.com/nkolban/ESP32_BLE_Arduino/blob/master/examples/BLE_iBeacon/BLE_iBeacon.ino

lewisxhe commented 3 years ago

What do you want to express?

careyer commented 3 years ago

Hi Lewis,

 

I think the suggestion was that there should be an option to continously transmit a BLE beacon from the Watch so that sensors placed arround you in the environment (like in your smarthome) can track in which room you are and trigger actions accordingly. Basically "Presence detection" via means of BLE. Many Bluetooth gadgets lilke sport trackers and alike do this. This would really be a nice addition.

Best regards careyer  

Gesendet: Montag, 30. November 2020 um 05:01 Uhr Von: "lewis he" notifications@github.com An: "Xinyuan-LilyGO/TTGO_TWatch_Library" TTGO_TWatch_Library@noreply.github.com Cc: "Subscribed" subscribed@noreply.github.com Betreff: Re: [Xinyuan-LilyGO/TTGO_TWatch_Library] BLE beacon for presence detection (#93)

 

What do you want to express?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

anarchking commented 3 years ago

I looked deep into this esp32 ble and it seems that the esp32 has trouble being a true Bluetooth "LOW ENERGY" with out adding a crystal to it. Its would be nice to get it as low as possible by setting the pace it beacons "broadcasts or ppm i think" and tx power (distance or rssi signal). Advertising sensor values

lewisxhe commented 3 years ago

@careyer As @anarchking says, esp32's Bluetooth is not "low energy" in the true sense. It has no meaning at all as a battery-powered beacon, unless you have been plugged in USB.

If you need sample code, you can refer here

https://github.com/espressif/arduino-esp32/tree/master/libraries/BLE/examples/BLE_iBeacon