+-----------------------------+
|         Introduction        |
|            Page             |
+--------------V--------------+
               |
               |
+--------------V--------------+
|         Discovering         |
|                             <------+
|            Page             |      |
+--------------V--------------+      |
               |                     |
               |                     |
+--------------V--------------+      |
|             IF              |      |
|      device is selected     |      |
|                             |      |
|             AND             N------+
|     device name not empty   |
+--------------Y--------------+
               |
               |
+--------------V--------------+                                    +----------------------+
|              IF             |       +--------------------+       |          IF          |
|   legacyPairing is false    N------->       Pin Page     >------->     AutomaticPin     N-------+
|   (Means that SSP == true)  |       +--------------------+       |                      |       |
+--------------Y--------------+                                    +-----------Y----------+       |       +----------------------+        +-------------------+
               |                                                               |                  |       |          IF          |        |   Pairing Page    |
               |                                                               |                  +------->   type == Keyboard   N-------->   show "Working   |
+--------------V--------------+                                    +-----------V----------+       |       |                      |        |                   |
|      Is PIN confirmed?      N---> Exit                           |   Try to get one     |       |       +-----------Y----------+        +-------------------+
+--------------V--------------+                                    |   from the xml or    |       |                   |
               |                                                   |   generate a random  >-------+                   |                  +--------------------+
               |                                                   |   one                |                           |                  |    Pairing Page    |
    +----------V----------+                                        |                      |                           +------------------>      show "PIN"    |
    |   Services Page     |                                        +----------------------+                                              |                    |
    |         End         |                                                                                                              +--------------------+
    +---------------------+