Re: Mynewt Nimble OOB pairing

2019-04-30 Thread Amr Bekhit
Hi Łukasz, Thanks for looking into this. However in logs I cannot see SMP Pairing Response, but I should see it if > you would use NoInputNoOutput on Nimble side as you said in previous email. > Could you confirm that you used different IO capabilities for this test? > Yes, for this test I had

Re: Mynewt Nimble OOB pairing

2019-04-30 Thread Łukasz Rymanowski
Hi Amr, yes this is the Android side issue. Actually when you look at btsnoop you can see Pairing Request showing OOB flag is 0. SMP: Pairing Request (0x01) len 6 IO capability: KeyboardDisplay (0x04) OOB data: Authentication data not present (0x00) Authentication

Re: Mynewt Nimble OOB pairing

2019-04-29 Thread Amr Bekhit
After some further research and debugging, I believe I've been chasing a red herring. Debugging the mynewt device during the pairing process shows that the requester (Android phone) does not have its OOB bit set (this can be seen in ble_sm_lgcy_io_action). This explains why OOB was failing. It

Re: Mynewt Nimble OOB pairing

2019-04-29 Thread Amr Bekhit
Hi Łukasz, I've sent you the Android Bluetooth HCI log separately to your email. The log was saved while the following events took place: - With my device in idle mode, I used my phone to read the device's NFC tag. I configured the NFC tag to represent a Bluetooth Carrier

Re: Mynewt Nimble OOB pairing

2019-04-26 Thread Łukasz Rymanowski
Hi Amr, I would call it on gap connected event. Then OOB data are stored and SM can present/use OOB flag during pairing. Best Lukasz On Fri, Apr 26, 2019, 18:57 Amr Bekhit wrote: > Hi Łukasz, > > Thanks for your reply. Where and when should the call to ble_sm_inject_io > take place? In my

Re: Mynewt Nimble OOB pairing

2019-04-26 Thread Amr Bekhit
Hi Łukasz, Thanks for your reply. Where and when should the call to ble_sm_inject_io take place? In my current setup, I had configured my device to use passkey pairing, but for testing purposes, was hardcoding the passkey. The BLE stack was requesting the passkey by calling the GAP event

Re: Mynewt Nimble OOB pairing

2019-04-26 Thread Łukasz Rymanowski
Hi Amr, Nimble does support OOB for Legacy and Secure Connections Pairing. In both cases you just need to provide OOB (TK) data exchanged by other means e.g. NFC to the NimBLE stack using "int ble_sm_inject_io(uint16_t conn_handle, struct ble_sm_io *pkey)". For Secure Connection make sure to

Mynewt Nimble OOB pairing

2019-04-25 Thread Amr Bekhit
Hello all, I'm interested in using OOB pairing over NFC to connect my peripheral device to a master (an Android phone in this case). The NFC Forum has a specification ( https://nfc-forum.org/our-work/specifications-and-application-documents/application-documents/) which dictates how two