I am implementing some secure storage features and I would like to know how much of space I used. So I tried using secstore total from console of the device, in return I got this message:
root@swi-mdm9x28-wp:~# secstore total Internal error check logs for details.
Does anyone have an idea what I am doing wrong? My legato isn’t built with the admin enabled flag but this function should be available without it also.
// Connect current client to secStorage
le_secStore_ConnectService();
// Connect current client to admin secstorage service
secStoreAdmin_ConnectService();
uint64_t* totalSize = (uint64_t*)malloc(sizeof(uint64_t));
uint64_t* freeSize = (uint64_t*)malloc(sizeof(uint64_t));
le_result_t rez = secStoreAdmin_GetTotalSpace(totalSize, freeSize);
switch (rez) {
case LE_OK:
logger.debug(Poco::format(“secStorage total space <%lu>, available storage <%lu>”, *totalSize, *freeSize ));
break;
case LE_UNAVAILABLE:
logger.error(“Couldn’t SS_AVAIL_SIZE, currently unavailable”);
break;
case LE_FAULT:
logger.error(“Couldn’t SS_AVAIL_SIZE secStorage, uknown error [FAULT]”);
break;
default:
logger.error(“Couldn’t SS_AVAIL_SIZE, unknown error”);
break;
}
free(totalSize);
free(freeSize);
Once more: the error that is produced is shown here:
SECSTOREADMIN is not disabling *GetTotalSpace function.
You might be using a WP76* product.
First WP76 firmware versions have got this limitation: QMI_SWI_SFS_GET_SPACE_INFO_REQ_V01 message is not fully supported, resulting in secStoreAdmin_GetTotalSpace returning LE_FAULT.
You should flash a FW whose version is >= SWI9X07Y_02.20.00.00.