gatt server example not accesible under windows 10

jumjum123
Posts: 199
Joined: Mon Oct 17, 2016 3:11 pm

gatt server example not accesible under windows 10

Postby jumjum123 » Wed Apr 04, 2018 5:38 pm

My application is recognized on Android with NRF-connect.
But on Windows it does not connect.

To learn from example gatt_server I added a function to ESP_LOGW all events in gatts event handler
Short end of this story, its not working

This is the log, any idea ?

Code: Select all

I (544) GATTS_DEMO: REGISTER_APP_EVT, status 0, app_id 0

I (554) GATTS_DEMO: CREATE_SERVICE_EVT, status 0,  service_handle 40

I (554) GATTS_DEMO: SERVICE_START_EVT, status 0, service_handle 40

I (554) GATTS_DEMO: ADD_CHAR_EVT, status 0,  attr_handle 42, service_handle 40

I (564) GATTS_DEMO: the gatts demo char length = 3

I (574) GATTS_DEMO: prf_char[0] =11

I (574) GATTS_DEMO: prf_char[1] =22

I (584) GATTS_DEMO: prf_char[2] =33

I (584) GATTS_DEMO: ADD_DESCR_EVT, status 0, attr_handle 43, service_handle 40

I (594) GATTS_DEMO: REGISTER_APP_EVT, status 0, app_id 1

I (604) GATTS_DEMO: CREATE_SERVICE_EVT, status 0,  service_handle 44

I (604) GATTS_DEMO: SERVICE_START_EVT, status 0, service_handle 44

I (614) GATTS_DEMO: ADD_CHAR_EVT, status 0,  attr_handle 46, service_handle 44

I (624) GATTS_DEMO: ADD_DESCR_EVT, status 0, attr_handle 47, service_handle 44

I (94324) UTILS: Event GATTS:ESP_GATTS_CONNECT_EVT gatts_if:3

I (94324) GATTS_DEMO: ESP_GATTS_CONNECT_EVT, conn_id 0, remote 58:00:e3:68:39:3c:
I (94334) UTILS: Event GATTS:ESP_GATTS_CONNECT_EVT gatts_if:4

I (94334) GATTS_DEMO: CONNECT_EVT, conn_id 0, remote 58:00:e3:68:39:3c:
I (95104) UTILS: Event GATTS:ESP_GATTS_MTU_EVT gatts_if:3

I (95114) GATTS_DEMO: ESP_GATTS_MTU_EVT, MTU 500
I (95114) UTILS: Event GATTS:ESP_GATTS_MTU_EVT gatts_if:4

I (95114) GATTS_DEMO: ESP_GATTS_MTU_EVT, MTU 500
I (95124) UTILS: Event GAP:ESP_GAP_BLE_SEC_REQ_EVT

I (95704) UTILS: Event GAP:ESP_GAP_BLE_UPDATE_CONN_PARAMS_EVT

I (95704) GATTS_DEMO: update connetion params status = 0, min_int = 16, max_int = 32,conn_int = 30,latency = 0, timeout = 400
E (124314) BT: L2CA_EnableUpdateBleConnParams - unknown BD_ADDR 5800e368393c
E (124324) BT: L2CA_RemoveFixedChnl()  CID: 0x0006  BDA: 5800e368393c not connected
E (124324) BT: Device not found

E (124324) BT: BTA got unregistered event id 31

E (124334) BT: BTA got unregistered event id 31

I (124334) UTILS: Event GATTS:ESP_GATTS_DISCONNECT_EVT gatts_if:3

I (124344) GATTS_DEMO: ESP_GATTS_DISCONNECT_EVT
I (124354) UTILS: Event GATTS:ESP_GATTS_DISCONNECT_EVT gatts_if:4


chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: gatt server example not accesible under windows 10

Postby chegewara » Wed Apr 04, 2018 7:41 pm

What client app are you using on windows to connect to esp32?
Here is log when you are trying to connect:

Code: Select all

E (124314) BT: L2CA_EnableUpdateBleConnParams - unknown BD_ADDR 5800e368393c
E (124324) BT: L2CA_RemoveFixedChnl()  CID: 0x0006  BDA: 5800e368393c not connected
E (124324) BT: Device not found

E (124324) BT: BTA got unregistered event id 31

E (124334) BT: BTA got unregistered event id 31

I (124334) UTILS: Event GATTS:ESP_GATTS_DISCONNECT_EVT gatts_if:3

I (124344) GATTS_DEMO: ESP_GATTS_DISCONNECT_EVT
I (124354) UTILS: Event GATTS:ESP_GATTS_DISCONNECT_EVT gatts_if:4

jumjum123
Posts: 199
Joined: Mon Oct 17, 2016 3:11 pm

Re: gatt server example not accesible under windows 10

Postby jumjum123 » Wed Apr 04, 2018 9:16 pm

I'm using admin page, devices, bluetooth
Click on "add bluetooth or other devices"
Next I get a list of scanned bluetooth devices and click o ESP32 device

Now we reached the point, where I get the lines with error, as in chegewara selected
All log lines are in my post to show full log from beginning to end

My computer is working with german language, tried to translate everything correctly ;)

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: gatt server example not accesible under windows 10

Postby chegewara » Wed Apr 04, 2018 10:29 pm

Thats why windows is disconnecting. Esp32 with current configuration(your configuration) is not recognised by windows and there is no reason to stay connected. If you write client code that will recognise services and characteristics from esp32 then your client app will stay connected, or if you flash for example code that will be recognised by windows as HID device then windows will stay connected.
This is normal behaviour in your case.

jumjum123
Posts: 199
Joined: Mon Oct 17, 2016 3:11 pm

Re: gatt server example not accesible under windows 10

Postby jumjum123 » Thu Apr 05, 2018 7:36 am

Between us, I like your answer up to the part "this is normal behaviour" ;)
Windows has been the point of problems in so many cases for me. And this is one more.
BLE is on the market for some time now. It should be supported fully by an so called standard OS.

Anyway, now have to find an example for BLE HID support, anybody having experience with that ?


Who is online

Users browsing this forum: No registered users and 52 guests