Page 1 of 1

BLE connection issues

Posted: Thu Mar 04, 2021 11:25 am
by colinives
Hi there,

Thanks for the help on another thread. I am testing with 'switch' rainmaker example

I now have code built and running on the ESP32. It boots up and rests at:

Code: Select all

I (1641) app_wifi: Provisioning Started. Name : PROV_e885a5, POP : a1eb2b5a
I (2221) protocomm_nimble: mtu update event; conn_handle=0 cid=4 mtu=185
The rainmaker app (IoS) cannot see the BLE device (Prov_ ) and a independent BLE scanner app only sees it infrequently.

When I move the phone close enough to almost touch (5cm) I get:

Code: Select all

I (51661) protocomm_nimble: mtu update event; conn_handle=0 cid=4 mtu=185
{/code]

And as I pull it away I get:
[code]
GAP procedure initiated: advertise; disc_mode=2 adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=256 adv_itvl_max=256
If I turn the phone bluetooth off then on, I can connect as long as the phone is within 5cm. In the debug console I get:

Code: Select all

E (94021) protocomm_nimble: Outbuf with handle 3 not found
E (94021) protocomm_nimble: Failed to read characteristic with attr_handle = 3
Which I'm sure is because it's the scanner accessing it and not the app.

These were messages when I was scanning with a "BLE Scanner" IOS app.

Any thoughts what may be causing this?

Thank you

Re: BLE connection issues

Posted: Fri Mar 05, 2021 7:11 am
by ESP_Prasad
@colinives , It looks a little strange to be honest. Are you conducting experiments in a very noisy RF environment ? Can you please confirm if you are facing this issue only for specific phone/model (e.g. iPhone6) ? Can you please provide debug logs with enabling debug logs from menuconfig ? Please provide your sdkconfig as well so that I can use that for reference to reproduce the behavior. Please provide the IDF branch or commit id for my reference. Please provide hardware module details as well. I will try to reproduce the issue and come back to you on this.

Re: BLE connection issues

Posted: Fri Mar 05, 2021 3:55 pm
by colinives
Hi there,

It turns out my iPhone must have a bad antenna - I switched to a friend's iPad and it all worked fine.

I provisioned 3 devices using the QR code and manually claimed them using the CLI for the cloud. They successfully appear in my dashboard.

What happened next I'll put in another post for clarity.

Thank you for your time.

Re: BLE connection issues

Posted: Tue Mar 09, 2021 8:58 am
by ESP_Prasad
Glad that your problem was solved !!