5 Replies Latest reply on Mar 9, 2020 12:08 AM by user_1536336

    EZ-Serial: BLE pairing with random passkey

    user_1536336

      I have got a CYBT-333047 eval-board and I'm using EZ-Serial via CySPP communication interface.

       

      Now, I need a secured connection, where the user of the central device (a proprietary app) has to type in a random passkey which is generated by the CYBT-333047 module and shown at our display. So the user of the central device needs to have hardware access to couple with the module (peripheral). It mustn't be possible that anybody in the near can connect to our module without typeing in the right passkey. The passkey should be random or course.

       

      I found the chapter Pairing with a Random Passkey (BLE) in EZ-Serial WICED Firmware Platform User Guide for CYW2070x-based Modules (p. 48 -49) and I hope, that this chapter describes my issue.

       

      I tried this example but didn't get the expected results

       

      RESET

      Boot event

      @E,003B,BOOT,E=01010E06,S=05020016,P=0103,H=D1,C=00,A=F60F3EE81861\CR\LF

      40 45 2C 30 30 33 42 2C 42 4F 4F 54 2C 45 3D 30 31 30 31 30 45 30 36 2C 53 3D 30 35 30 32 30 30 31 36 2C 50 3D 30 31 30 33 2C 48 3D 44 31 2C 43 3D 30 30 2C 41 3D 46 36 30 46 33 45 45 38 31 38 36 31 0D 0A

      Advertisement changed event

      @E,000E,ASC,S=01,R=03\CR\LF

      40 45 2C 30 30 30 45 2C 41 53 43 2C 53 3D 30 31 2C 52 3D 30 33 0D 0A

      Set random passkey generation

      SSBP,M=4D,B=1,K=10,P=0,I=4,F=3\CR\LF

      53 53 42 50 2C 4D 3D 34 44 2C 42 3D 31 2C 4B 3D 31 30 2C 50 3D 30 2C 49 3D 34 2C 46 3D 33 0D 0A

      Success event

      @R,000A,SSBP,0000\CR\LF

      40 52 2C 30 30 30 41 2C 53 53 42 50 2C 30 30 30 30 0D 0A

      Central connects to the module

      Connection event

      @E,0035,C,C=01,A=6ECB0FFB7A44,T=00,I=0028,L=0000,O=02BC,B=00\CR\LF

      40 45 2C 30 30 33 35 2C 43 2C 43 3D 30 31 2C 41 3D 36 45 43 42 30 46 46 42 37 41 34 34 2C 54 3D 30 30 2C 49 3D 30 30 32 38 2C 4C 3D 30 30 30 30 2C 4F 3D 30 32 42 43 2C 42 3D 30 30 0D 0A

      NOT documented event

      @E,001A,W,C=01,H=000B,T=00,D=0200\CR\LF

      40 45 2C 30 30 31 41 2C 57 2C 43 3D 30 31 2C 48 3D 30 30 30 42 2C 54 3D 30 30 2C 44 3D 30 32 30 30 0D 0A

       

       

      I do not get the expected and documented result

      pairing.PNG

       

      Best Regards!