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

Alter library so it can handle multiple service data #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fguiet
Copy link

@fguiet fguiet commented Dec 16, 2018

This is not very clear in the documentation but I needed to add several AD Structures with the type SERVICE_DATA in one of my project.
In order to get those several service data back with your library I had to change it a little...
Maybe others can benefit from this modification
Fred

@Pablo2048
Copy link

+1 for this PR to merge - it allows to work with Xiaomi Mijia thermo/hygrometer. Thanks @fguiet for doing this.

@guillier
Copy link

guillier commented Mar 4, 2019

Using this patch, I was able to work around the Xiaomi Mijia issue. As it is, it changes slightly the functions signatures but using std::string BLEAdvertisedDevice::getServiceData(int i=0) and BLEUUID BLEAdvertisedDevice::getServiceDataUUID(int i=0) avoids breakage while solving the problem.

1technophile added a commit to 1technophile/OpenMQTTGateway that referenced this pull request May 30, 2019
…D02)

and enable multiple services data readings for Mijia standard device. Indeed the new version seems to publish several service data compared to old ones.
Please note that I'have update the library with the work of @fguiet
see: nkolban/ESP32_BLE_Arduino#24
@1technophile
Copy link

Thanks for this. I confirm that with new Mijia indoor temperature and humidity sensor we need to be able to read several service data. This PR answer to this need.
It will be very nice if this PR could be integrated to the main repository.

@eos1d3
Copy link

eos1d3 commented Jul 7, 2019

This PR surely works with MJ_HT_V1, but introduce a small issue for LYWSD02 - another similar meter with clock from the same company.

With this, device name for LYWSD02 is always empty, but with current ESP32 Arduino library and Nordic nRF Connect all see its name "LYWSD02".

@KipK
Copy link

KipK commented Aug 7, 2019

Can this be merged ? It works flawless with latest lib, no more problem with empty names. I'm using it in one of my project,solved all my issues

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

Successfully merging this pull request may close these issues.

6 participants