wifwucite / esphome-ble-controller

Bluetooth Low Energy (BLE) controller for ESPHome
MIT License
106 stars 21 forks source link

Is the number of characteristics limited? #26

Open zorgoban opened 1 month ago

zorgoban commented 1 month ago

Good day!

The attached code I use on an ESP32 Dev Kit C only advertises 4 of the configured 6 characteristics. Battery and Temperature are missing. Pressure is missing the Descriptors.

BeeBLESensor.txt

Many Greetings! Remo

zorgoban commented 1 month ago

Looks like this project is not maintained.

archef2000 commented 1 month ago

This is an open source project you have no right of support and no expectation of answer time. And you only posted this 2 days ago.

Have you tried setting all of the characteristics to the same sensor? Enable debug log and send what you get. Here are the supported types: sensors https://github.com/wifwucite/esphome-ble-controller?tab=readme-ov-file#supported-components . Where do you only see 4 of the 6 have tried a mobile app to explore them?

zorgoban commented 1 month ago

I posted this 4 days ago and I didn't ask for support. I'm reporting a bug. I already started coding this in C, since I really don't expect any reaction since no one had a look at it for 4 days.

The code is included. It should be easily reproducible. Just flash it onto an ESP32 Dev Kit C or equivalent and verify my findings with a Handy App like NRF Connect. If it is not reproducible I would have to look into it on my side.

archef2000 commented 1 month ago

Ok then it was 4 days still I don't have one that I can flash at the moment. You could also say how you tested it or answer my questions Also no I can't easily flash it as it uses the hx711 and bme280_i2c platform that I don't have. You could create a simpler example that only has a number template for all the same sensors and post your DEBUG log level logs. With a picture of the only 4 listed characteristics you see in the mobile app.

zorgoban commented 1 month ago

I'm hesitant in investing my time into a non official ESPHome extension. I rather invest my time into my C code that I know will be working in the end and I have full control over.

Your suggestions of testing are unfit since it will change the memory usage of the resulting code. You will eventually need the tools to test your code, or someone who is willing to put the time into it.

zorgoban commented 1 month ago

What I can tell you that might help is: It doesn't matter if the sensors are actually connected. The behavior is the same with and without connected sensors.

wifwucite commented 3 weeks ago

Unfortunately I have not much time these days due to private engagements. I can’t remember any hard-coding of numbers in my code. So, I assume the problems are caused by limitations of the framework I use. You might run into them as well when you do your own coding. Let me know if you discover anything.

zorgoban commented 3 weeks ago

I'm speculating the issue is low RAM. To avoid this problem within my code I used esp-idf from the beginning. The ESP32 framework is not very economical with available resources, but it works. But I also switched to 16 bit identifiers instead of the 128 bit.