I think you cannot - the alert levels are defined in the service specification for the alert service. But you can look into the generated source code and check how the levels are created, and change that.
As @hli pointed out, Find Me is a BLE SIG defined profile and it's definition cannot be changed. So, you can work only with 3 alert levels.
If you want to implement your own Find me with 4 levels, you can develop your own custom profile/services, which are profiles/services defined by you. You can check out the application note AN91162 for details. Do note that with custom profiles, you need to develop your own interface/App/GUI to recognize the profile and communicate over it.
Great thank you for the information.
1 of 1 people found this helpful
You can create a custom profile which could simulate a Find Me Profile. You can create a GATT server with custom profile and then the client could send indexes from 0-4. The server could then simulate a Find Me based on the received index.
For testing, you can send different commands from PC CySmart tool and based on the command received, you can change the frequency of an LED thereby simulating different alerts.
I am trying to control a motor (RC car) sending 4 signals ( Forward, backward, left , right) as 0,1,2,3. I created a custom profile but cannot make the server simulate a Find me. On the characteristic (Motor Control) value, how do I create a pull down menu to accept all those different alert levels like the Find Me application does?. This is the case statement code I am using for the custom declaration in case you care to comment:
/*When this event is triggered, the peripheral has received a write command on the custom characteristic */
/* Extract the write value from the event parameter */
wrReqParam = (CYBLE_GATTS_WRITE_REQ_PARAM_T *) eventParam;
/* Check if the returned handle is matching to Motor Control Client custom configuration*/
if(CYBLE_ROBOT_SOTINO_MOTOR_CONTROL_CHAR_HANDLE == wrReqParam->handleValPair.attrHandle)
carcontrol = wrReqParam->handleValPair.value.val[CYBLE_ROBOT_SOTINO_MOTOR_CONTROL_CHAR_INDEX] ;
Thanks a lot
You cannot create a Pull Down menu for the custom characteristic in the BLE component. Best approach for your application is to have the server send commands in firmware for the 4 options. The client can then decode them to move in the correct direction. Please have a look at:
Thanks for the info and the reference design. It seems very similar to what I am doing.