Closed BS-GIFHUB closed 1 year ago
Changed in BTooth.cpp
The if condition to
if (advertisedDevice.haveServiceUUID() && advertisedDevice.isAdvertisingService(serviceUUID) ) {
Now I have the connection with the AC 500, but.......
no AC DC ON OFF state
AC DC command works
Hello Bernhard,
I have changed the line to
if (advertisedDevice.haveServiceUUID() && advertisedDevice.isAdvertisingService(serviceUUID) && (strcmp(advertisedDevice.getName().c_str(),settings.bluetti_device_id)==0) )
otherwise the device name is not checked at all and it will not be possible any more to have more than one devices.
Greetings, Martin
Merged some of the PR's those should fix connection issues.
I own a AC500 and with bluetti-mqtt I got very quick a connection.
Now using the ESP32 I'm not getting an connection to my Bluetti station via BT. device id was checked 10 times and is fine. Connection to the mqtt server is fine but no connection the Bluetti.
The only change I did is to change in config.h
ifndef BLUETTI_TYPE
define BLUETTI_TYPE BLUETTI_AC500
endif
The problem seems to be timing in the BLE scan
I changed in BTooth.cpp following values and then AC500 will be found: //pBLEScan->setInterval(1349); //pBLEScan->setWindow(449); //pBLEScan->setActiveScan(true); //pBLEScan->start(5, false); pBLEScan->setInterval(1349); pBLEScan->setWindow(5000); pBLEScan->setActiveScan(true); pBLEScan->start(40, false);
Now I'm trying to solve the next issue, because it is now found but not connected. it seems to be that the if cause doesn't work of the module BTooth.cpp
/**
Any ideas ?
Thanks Bernhard