 Hands-on Authorization Characteristic value may require authorization by the user app before BLE stack proceeds with read or write operation Authorization is enabled when adding the characteristic to the service by calling gut at characteristic and the parameter security permission. In KUPA mix we can do this simply in the configuration of our custom service and the next thing we need to do is to enable the event for every single read operation. In this event handler we will confirm or reject the read operation. So I will go to the configuration of the VPN middleware and in the configuration over our custom service I will enable the authorization to read and also enable the event that will be generated by BLE stack on every read attempt by the gut client. Notice that I disabled the requirement for the authenticated link or encrypted link so no pairing will take place. And this is it. We can generate the project and make another test. In KUPA IDE we need to implement the event handler for parameter request which is generated by BLE stack on every read attempt of a characteristic value. So let's go to the VPN folder and let's locate custom underscore stm.c and first we need to include one header file. So let's put it online 27 and the name of the header file is custom underscore app.h And then we need to define an external variable which contains the connection handle and this will be later used in the event handler. So let's put online 72 external variable which is of the type custom underscore app and you can use control space for context help. This is the type of this variable and the name of this variable is handle notification and the event handler itself is online 140 41 you see read permit request and inside the user section we can add a call to enable to allow the read. So let's call ACI gut again you can use a context help and we are looking for allow allow read which takes a single parameter and that's the connection handle. So let's locate the variable and one of its field is the connection handle and we may also add some application traces to know that this event handler was executed. So let's call app dbg and again let's use context help and here we can write a string read permit it and newline character and this is it we can compile the code and load it. So if I now try to connect to my target and read the characteristic you see it's successful and you see in the traces that read was permitted. So in fact the event handler was executed and this is the end of the hands-on.