==== Environment ======
1. frdmkw38 board
2. ble_shell_freertos [BLE central]
3. wireless_uart_freertos[BLE peripheral]
======================
I am going to make a bi-directional communication BLE system with a security pairing base.
The Central system is based on [ble_shell example code].
The Peripheral system is based on [wiereless_uart example code]. (you can recommend other simple example code).
I want to now how to set or control on central side. [shell commands base]
It I have to manipulate the code please tell me.
With the upper environment. I going to make a [Security Pairing Connection].
================
gatt_uuid128.h [make same]
gatt_db.h [all same except value_device_name]
== app_preinclude.h =========
#define gAppMaxConnections_c (1U)
#define gAppUseBonding_d 0
#define gAppUsePairing_d 1
#define gAppUsePrivacy_d 0
#define gPasskeyValue_c 999999
=======================
<adv param in peripheral>
<gScanParams>
<gConnReqParams & gPairingParameters>
<smpkeys & security params>
Hi,
There is the services that are already are implemented for the BLE Shell and given as example, are listed on the guide SDK>docs>wireless>Bluethooth>Bluetooth® Low Energy Demo Applications User’s Guide.pdf>chapter 5.19:
You would need to implement the service so it can work on the Wireless UART, this might also explain the reason that it might have trouble to have connection.
It will indeed have worked connection the ShellGap_ConnectionCallback (gConnEvtPairingComplete_c) until it has succeeded or failed the pairing procedure, on your case we do see the massage of failure for it working on the W_UART.
Hope the answer helps to approached other way to the BLE Shell Example, and if there's more question, come back.
Regards,
Itzel.
Hello,
To have a security on the moment that you're paring the peripheral you are supposed to have configured the GAP Secure Mode and Level as Mode 1 Level 3 to have asked the authenticated encryption.
In order to set it you could do it from the serial port terminal with the command
gap paircfg [-usebonding usebonding] [-seclevel seclevel] [-keyflags flags]
There are also the default configurations, you could change it from the file bluetooth>gap_types.h on the define with name gGapDefaultSecurityRequirements_d.
If I understood wrongly the question, could you let me know.
Regards,
Itzel.
Dear Itzel
I test again with your guide. but still fail to pair.
Please check my debug message again.
using wireless uart code both central/periperal, pairing suceeded.
but using wireless uart peripheral mode, ble_shell base central mode.
ble connection/discovery has success. but secure pairing FAILED.
What do you recommend to check at this moment.
Always thanks your efforts.
B.R