ESP32 as reader to Bangle.js #5816
Replies: 1 comment
-
Posted at 2023-04-03 by @allObjects @Q_NErk, you mean peer to peer BT communication between Bangle.js and ESP32? ...where Bangle.js raises the data and an EPS32 collecting it? ...from one or multiple Bangle.js? Posted at 2023-04-03 by Q_NErk It can be peer to peer or it can be brodacasted by bangle.js via BT. Yes, ESP32 will collect data. The best will be from multiple Bangle.js Posted at 2023-04-03 by @gfwilliams If you're thinking of multiple Bangle.js then make them advertise the data over BLE with You can then use ESP32 to read that data. If you're using Espruino on it you can do To avoid having to parse un-needed advertising packets it'd better to use manufacturerData so you can filter out the devices. So:
Posted at 2023-04-17 by Q_NErk Hello,
And I'm receiving:
What I'm doing wrong? Posted at 2023-04-18 by @gfwilliams Am I right in thinking that you're not using my example code but are instead trying to connect directly to the Bangle? It looks like you're searching for UUID Or, you could change the characteristics to the ones used for Nordic UART (https://www.espruino.com/Interfacing#bluetooth-le):
However if you were going to do what I suggested then you could skip connecting, and just read the data from the advertisement you found in I should also note that you can just run Espruino on the ESP32 too, and if you do that you don't need any C code - in fact everything you need is in my last answer Posted at 2023-04-18 by @fanoush
You picked random Arduino example without understanding what it does (at all)? Or maybe you are just some AI bot that did not get the context right? Your post #5 is pretty odd considering previous posts and this being Espruino forum :-) Anyway, you don't need to create connection to Bangle to read what it is advertising. Also you can have only one concurrent connection to the Bangle so if you have phone connected to it already you cannot make second connection from ESP32, that would also mean advertising could be the way. I think in very recent builds Bangle can still advertise while there is something already connected to it. Posted at 2023-04-18 by Q_NErk I'm not a bot (I know, all bot can say it :)) Posted at 2023-04-18 by @fanoush
It is perfectly OK to use any solution. It is just that we cannot help you much here with details of using BLE in Arduino.
We can still discuss generic BLE concepts (advertising vs connection) and how to do the Bangle.js side here. For that you already had some suggestions. Advertising is short data packet broadcasted periodically containing typically a device name but you can add anything small there (up to 31 bytes total or 2*31bytes - with optional advertising response packet). Then just scanning on the other side and parsing the advertising result should be enough - inside your MyAdvertisedDeviceCallbacks::onResult(BLEAdvertisedDevice advertisedDevice). Currently it checks serviceUUID which can be there too |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2023-04-02 by Q_NErk
Hello,
I have one question: how to read values from bangle.js by device like esp32? I want to use it for my project will external display values from wristband.
I guess that it will be needed to connect to specified bangle.js and then somehow use data similar way to js.
BR
QNerk
Beta Was this translation helpful? Give feedback.
All reactions