Page 1 of 2

cannot pair esp32 with android device using

Posted: Mon Jan 09, 2017 12:23 pm
by tanvipatel
Hi,

I am new to esp32 .

I am trying to do pair between my mobile device and sparkfun esp 32 board.

But i am facing error of incorrect PIN or Passkey.

I had flashed BLE_adv code into esp 32 .ESP32 shows when i turned on my device's bluetoth. but i am facing error when i try to pair from mobile device.


Please help me to solve this issue

Thank you
Tanvi Patel.

Re: cannot pair esp32 with android device using

Posted: Tue Jan 10, 2017 11:45 pm
by Josegm
That's expected, the ESP-IDF doesn't have functions to support BLE pairing yet.

Re: cannot pair esp32 with android device using

Posted: Wed Jan 11, 2017 7:22 am
by tanvipatel
Then how can i pair my mobile device with my esp32 board?

Please help me

Re: cannot pair esp32 with android device using

Posted: Wed Jan 11, 2017 8:41 am
by Josegm
tanvipatel wrote:Then how can i pair my mobile device with my esp32 board?

Please help me


Well you can't pair yet - but also for the BLE_adv demo you don't need to, that's just Bluetooth advertisements (in other words broadcasts).

You can set adv_data in the example to the data you want to send, for example:

uint8_t adv_data[31]={0x02,0x01,0x06, 0x1A,0xFF,0x4C,0x00,0x02,0x15,0x71,0x3d,0x00,0x00,0x50,0x3e,0x4c,0x75,0xba,0x94,0x31,0x48,0xf1,0x8d,0x94,0x1e,0x00,0x00,0x00,0x00,0xC5};

will emulate an iBeacon with UUID 713d0000503e4c75ba943148f18d941e major 0 and minor 0. Then you can use an iBeacon scanning app on your phone to detect this.

There are other beacon formats, for example Eddystone.

Re: cannot pair esp32 with android device using

Posted: Wed Jan 11, 2017 8:43 am
by WiFive
Don't try to pair, just use nrf connect app or similar

Re: cannot pair esp32 with android device using

Posted: Wed Jan 11, 2017 10:04 am
by tanvipatel
I tried with nrfconnect app but it shows like attached image .

Screenshot_2017-01-11-15-18-57_no.nordicsemi.android.mcp.png
Screenshot_2017-01-11-15-18-57_no.nordicsemi.android.mcp.png (149.28 KiB) Viewed 133 times

It shows NOTBONDED
It must be bonded ryt?? Then n then my esp32 and mobile device will connect with each other.

Re: cannot pair esp32 with android device using

Posted: Wed Jan 11, 2017 11:58 am
by tanvipatel
facing same issue
I tried as You say.

I just want to connect my mobile device and esp32 board.

if you know than please help me to do that

Thank you

Re: cannot pair esp32 with android device using

Posted: Wed Jan 11, 2017 7:32 pm
by Josegm
What are you expecting to happen by connecting your phone to the esp32 over Bluetooth LE?

There's nothing running there by default to offer any kind of service, it's just doing exactly what you told it to - broadcast advertising packets - nothing more.

If you want to connect with your phone and se some sample values try the gatt_server example and then use the nRF app.

Re: cannot pair esp32 with android device using

Posted: Thu Jan 12, 2017 5:32 am
by tanvipatel
I am expecting that if esp32 and my mobile device connected means it should be bonded.... as per my knowledge.

so If any notification arrived on mobile i can show on board using led blinking.. for that esp32 and mobiledevice must be connected or i can say bonded.

Re: cannot pair esp32 with android device using

Posted: Thu Jan 12, 2017 7:58 am
by tanvipatel
Josegm wrote:What are you expecting to happen by connecting your phone to the esp32 over Bluetooth LE?

There's nothing running there by default to offer any kind of service, it's just doing exactly what you told it to - broadcast advertising packets - nothing more.

If you want to connect with your phone and se some sample values try the gatt_server example and then use the nRF app.




hello ,

I tried with gatt_server example ans try to connect my mobile with esp32 using ntfconnect app its shows as shown in attached image error:
Screenshot_2017-01-12-12-59-23_no.nordicsemi.android.mcp.png
Screenshot_2017-01-12-12-59-23_no.nordicsemi.android.mcp.png (181.9 KiB) Viewed 81 times