1 Reply Latest reply on Apr 20, 2017 7:23 AM by epr_1639216

    About of Server-Client connections




      I downloaded Day20_BLE_UART project. I examined project.


      I have some questions.


               -How is the pair client-server devices.


               -How does the connection happen automatically? 


               -Client Central, Server Peripheral. The client wants to connect to the server. 


               - Assume that, A Client B Server C Server.  A  UART_to_BLE_central software. B-C UART_to_BLE_peripheral software. How to set up which server  is pair to A ? I have reviewed the software but have not seen such a check.


      Best Regards

        • 1. Re: About of Server-Client connections

          First of all:


          Client: API interface to retrieve data from remote device


          Server: API interface to hold data for retrieval from remote device


          Central: Device that initiates and controls BLE connection


          Peripheral: Device that waits for a BLE connection


          In order to pair two devices together, they must first connect together, then initiate and accept the pairing (central initiates, peripheral accepts).


          Once they are paired, if the central connects to the peripheral, then it will reuse the connection data and skip the whole verification process by using the stored data from the previous connection (essentially).


          There is an API function that is called to pair to a connected device by the API software:


          CyBle_GapAuthReq(cyBle_connHandle.bdHandle, &cyBle_authInfo);


          You would need to write the software in such a way as to find, connect to, then pair with the server you want the client to Pair/Bond with.


          Pairing: Connection is encrypted


          Bonding: Connection is stored for future use/connections