Topic: Not found GATT Service
Hello,
While trying this application, I encountered a problem with the Bluetooth LE not appearing in Bluetooth Classic.
When I try to connect to my ESP32 this message is displayed: “Did not found GATT service”.
Configuration:
- Bluetooth
- ESP32 based board
- Bluetooth on chip
- Arduino IDE
Board log:
[ 0.885] Debug log started
[ 0.886] Init ESP32 BLE on chip
[ 1.637] BLE started
[ 1.638] Client started
[ 1.638] RemoteXY started
[ 99.049] BLE client connected
[ 100.349] BLE client disconnected
App log:
15:15:34.971 App version 4.8.0.1, API 30
15:15:34.971 Device started
15:15:34.971 BLEconnection started
15:15:34.972 Connecting to BLE device XX:XX:XX:XX:XX:XX ...
15:15:35.396 Did not found GATT Service
15:15:35.402 Disconnect
My code:
//////////////////////////////////////////////
// RemoteXY include library //
//////////////////////////////////////////////
// To switch from BLE and classic Bluetooth.
#define BLE
#ifdef BLE
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP32CORE_BLE
#include <BLEDevice.h>
#else
// RemoteXY select connection mode and include library
#define REMOTEXY_MODE__ESP32CORE_BLUETOOTH
#include <BluetoothSerial.h>
#endif
#define REMOTEXY__DEBUGLOG
#include <RemoteXY.h>
// RemoteXY connection settings
#define REMOTEXY_BLUETOOTH_NAME "RemoteXY"
// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255,4,0,0,0,28,0,13,13,1,
6,0,9,39,45,45,2,26,2,1,
21,15,22,11,2,26,31,31,79,78,
0,79,70,70,0 };
// this structure defines all the variables and events of your control interface
struct {
// input variables
uint8_t rgb_1_r; // =0..255 Red color value
uint8_t rgb_1_g; // =0..255 Green color value
uint8_t rgb_1_b; // =0..255 Blue color value
uint8_t switch_1; // =1 if switch ON and =0 if OFF
// other variable
uint8_t connect_flag; // =1 if wire connected, else =0
} RemoteXY;
#pragma pack(pop)
/////////////////////////////////////////////
// END RemoteXY include //
/////////////////////////////////////////////
void setup()
{
RemoteXY_Init ();
}
void loop()
{
RemoteXY_Handler ();
/*
Serial.print("On: ");
Serial.print(RemoteXY.switch_1);
Serial.print(" ; R: ");
Serial.print(RemoteXY.rgb_1_r);
Serial.print(" ; G: ");
Serial.print(RemoteXY.rgb_1_g);
Serial.print(" ; B: ");
Serial.println(RemoteXY.rgb_1_b);
*/
}
Does anyone have an idea to correct this problem?
Thank you in advance