Clarification of message-id in invocation of MsgHandler_add() in ble_bass.c

I am looking at ble_peripheral_server_bond sample app and BASS_Initialize() is called from main() which in turn has the following statement:
MsgHandler_Add(TASK_ID_BASS, BASS_MsgHandler);

where TASK_ID_BASS is 0x24

How does that reconcile with the RSL10 Firmware reference, page 34 where a message_id is a 2 byte value where the task_id is in the upper byte. Surely just giving a value of 0x24 means that ID is 0x24 associated with task_id 0x00 which is TASK_IS_LLM?

I am confused. :slight_smile:

Look forward to clarification.


Based on the Firmware Reference manual p34, I think 0x24 is task type ID number. Task_Type[15:8]. It is 1 byte size.


In the RSL10, the lower 8 bits, they have been used for connection index.

For example: the device has been connected with 8 peer devices.

/* Number of APP Task Instances, here BLE_CONNECTION_MAX=8 */

TASK_ID_LL (0x00) is link layer Manager. It is used to send/receive Link Layer Manager messages. You do not need to use that. It is for our BLE stack. You can use TASK_APP for your application kernel messages.

You make my point.
The task id is shifted to the upper byte of the message ID.

So I think this might be a typo error in the code.