hello Nordic
i am working with nrf52832 (and 52840) with ncs v2.3.0
i am trying to use the SMP service "user" group id to add some functionality according to this link https://docs.zephyrproject.org/latest/services/device_mgmt/smp_protocol.html#:~:text=This%20is%20the%20base%20group%20for%20defining%20an%20application%20specific%20management%20groups.
i have tried to implement the following
static struct mgmt_callback augu_mgmt_callbacks;
enum augu_mgmt_event_id {
AUGU_MGMT_EVENT_ID_DELET_FILE = MGMT_DEF_EVT_OP_ID(MGMT_EVT_GRP_USER_CUSTOM_START,0),
};
int32_t mgmt_augu_cb_function(uint32_t event, int32_t rc, bool *abort_more, void *data,
size_t data_size)
{
switch (event)
{
case AUGU_MGMT_EVENT_ID_DELET_FILE:
LOG_INF("DELETE command works");
break;
default:
AUGU_LOG_ERR("unsupported callback event (event %d)", event);
break;
}
/* Return OK status code to continue with acceptance to underlying handler */
return MGMT_ERR_EOK;
}
/// this lines are within an init function (also register for mgmt_fs which works)
/// ...
img_mgmt_dfu_callbacks.callback = mgmt_dfu_cb_function;
img_mgmt_dfu_callbacks.event_id = MGMT_EVT_OP_IMG_MGMT_DFU_STOPPED |
MGMT_EVT_OP_IMG_MGMT_DFU_PENDING |
MGMT_EVT_OP_IMG_MGMT_DFU_CONFIRMED |
MGMT_EVT_OP_IMG_MGMT_DFU_STARTED;
mgmt_callback_register(&img_mgmt_dfu_callbacks);
img_mgmt_fs_callbacks.callback = mgmt_fs_cb_function;
img_mgmt_fs_callbacks.event_id = MGMT_EVT_OP_FS_MGMT_FILE_ACCESS;
mgmt_callback_register(&img_mgmt_fs_callbacks);
augu_mgmt_callbacks.callback = mgmt_augu_cb_function;
augu_mgmt_callbacks.event_id = AUGU_MGMT_EVENT_ID_DELET_FILE;
mgmt_callback_register(&augu_mgmt_callbacks);
///...
////
and send an empty command but i get "not supported" on the other side,
any idea what i am missing?
hope to read from you soon
best regards
Ziv