- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to hello_client application implementation, hello_client can behave as central and peripheral at the same time.
However, I am facing below paring problem. If you have any suggestion, please let me know kindly.
<Precondition>
- I am trying to establish below 2 connections simultaneously.
Connection 1 :
central : iOS (Light blue app)
peripheral : WICED Smart (hello_client app)
Connection 2 :
central : (hello_client app)
peripheral : WICED Smart (hello_sensor app)
- I’d like to use passkey bonding for Connection 1.
- I confirmed Connection 1 and Connection 2 can establish successfully if not simultaneous.
<Problem A> Cannot establish simultaneous connection.
1. Establish Connection 2 ( hello_client and hello_sensor) successfully.
2. After 1, try to make Connection 1 (iOS and hello_client), but it fails.
iOS displays “paring confirmation dialog”, and user select OK. However, connection fails.
LOG is attached (paring_fail_1.txt)
<Problem A'> Cannot establish simultaneous connection.
When I modify hello_client_create as below, Connection 1 establish successfully.
However, Connection 2 becomes to be failed.
blecen_Create();
+ lesmp_setSMPRole(LESMP_ROLE_RESPONDERS)
// we will not do scan until user pushes the button for 5 seconds
blecen_Scan(NO_SCAN);
LOG is attached (paring_fail_2.txt)
Do you have any idea to establish Connection 1 and Connection 2 at a time?
<Problem B> Cannot connect hello_sensor and hello_client with passkey paring
On default, hello_client and hello_sensor connect with Just Works.
To use passkey paring I modified as below. After the modification paring
between hello_client and hello_sensor cannot connect.
// Uncomment the following line to enable passkey pairing. Change passKey[] below to the desired key.
- // #define PASSKEY_PAIRING
+ #define PASSKEY_PAIRING
x lesmp_setPairingParam(
- LESMP_IO_CAP_DISP_NO_IO,
// IOCapability,
-+ LESMP_IO_CAP_DISP_ONLY,
LOG is attached (passkey_paring_fail.txt)
Thank you very much for your support!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hint: If you use SDK IDE you can view traces using internal plugin in the console window. When you do that you will see decoding of stack messages starting with @$*#. See quick start guide how to do that.
For the passkey_pairing_fail. I can see on the traces that Pairing request (01) is received with IO Capabilities Display Only (00). Pairing response (02) is sent with IO Capabilities NoInputNoOutput (03)
l2cap Rx:
40200b0007000600 01 00 00 05 10 07 07
l2cap Tx:
40200b0007000600 02 03 00 01 10 07 07
I am guessing peer calls lesmp_setJustWorksNotPermitted. So pairing fails.
For the other 2, what version of the iOS you are running. There is a bug in iOS6 & iOS7 (works in 5 and 😎 which causes pairing failure if slave initiates pairing. If you want to support those, please remove call to lesmp_sendSecurityRequest. Instead of that add LEGATTDB_PERM_AUTH_READABLE to UUID_CHARACTERISTIC_DEVICE_NAME or to any other characteristic that iPhone going to access. When iPhone tries to read it, we will reply with appropriate result code and iPhone will start pairing which will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hint: If you use SDK IDE you can view traces using internal plugin in the console window. When you do that you will see decoding of stack messages starting with @$*#. See quick start guide how to do that.
For the passkey_pairing_fail. I can see on the traces that Pairing request (01) is received with IO Capabilities Display Only (00). Pairing response (02) is sent with IO Capabilities NoInputNoOutput (03)
l2cap Rx:
40200b0007000600 01 00 00 05 10 07 07
l2cap Tx:
40200b0007000600 02 03 00 01 10 07 07
I am guessing peer calls lesmp_setJustWorksNotPermitted. So pairing fails.
For the other 2, what version of the iOS you are running. There is a bug in iOS6 & iOS7 (works in 5 and 😎 which causes pairing failure if slave initiates pairing. If you want to support those, please remove call to lesmp_sendSecurityRequest. Instead of that add LEGATTDB_PERM_AUTH_READABLE to UUID_CHARACTERISTIC_DEVICE_NAME or to any other characteristic that iPhone going to access. When iPhone tries to read it, we will reply with appropriate result code and iPhone will start pairing which will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear victorz
Thank you for your prompt reply.
"passkey_pairing_fail" has been fixed successfully.
However, we are using iOS8 but we cannot connect. Paring request dialog is displayed on iOS but paring is failed (hello_client_log_1.txt and hello_client_1.zip).
About LEGATTDB_PERM_AUTH_READABLE, I removed lesmp_sendSecurityRequest on hello_client_connection_up, and added EGATTDB_PERM_AUTH_READABLE as a parameter of HELLO_CLIENT_DATA. Because of lesmp_sendSecurityRequest removal, iOS doesn't display paring dialog in connection phase, but when user try to read HELLO_CLIENT_DATA data, paring request displays and fail.. (hello_client_log_2.txt and hello_client_2.zip)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What iOS version are you using. We will not be able to repro your issues if you are on something older than 8.3.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear victorz,
Yes, we are using iOS 8.3. 8.1.2 and 8.2 have same issue.
Could you try to reproduce our issue?
Regards,