Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to adapt BT connection to an ESP32 #5

Open
distancerunner opened this issue Mar 25, 2023 · 2 comments
Open

Try to adapt BT connection to an ESP32 #5

distancerunner opened this issue Mar 25, 2023 · 2 comments

Comments

@distancerunner
Copy link
Contributor

distancerunner commented Mar 25, 2023

Hi. I try to connect with an esp32 to my battery. Can you help me to understand your code?

Im actually able to connect to the battery and to the service.

I found 3 service uuids and every one has more or less characteristics uuids.

In your code line 288 to 344 you make async calls with some hex data? Can you explain it to me?

Did you know, which characteristics uuids I need?

@chadj
Copy link
Owner

chadj commented Mar 26, 2023

Here’s what I can tell you.

I logged BLE traffic between my phone and the battery to determine how to talk to the battery. So I can’t for certain stay what each byte of data means.

Now I believe this a standard protocol that generally operates over a serial line that has been adapted to work over BLE. I don’t know the name of the protocol though.

@distancerunner
Copy link
Contributor Author

distancerunner commented Mar 30, 2023

Yehaa, your work was awesome and I learned a lot after analyzing the data stream by myself. But your script was existential to understand the BLE connection. Here is my first working ESP32 program. It calls the BLE device and reads many values:
https://github.com/distancerunner/Renogy-Battery-ESP32-Bluetooth-MQTT-Bridge

I will extend its functionality in the next weeks. It is work in progress.

Here you see, it calls the BT connection to my 100Ah Battery perfect:
Screenshot_20230330_144614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants