If you see MQTT calls between sl_FsGetFileList, is because we are using MQTT to request/send data about file system (at our solution, we don't have access to UART, so it is easier to read using MQTT). Every 5 files are sent in 1 MQTT publish command. The code used to read FS info is pasted at bottom. The steps was: Powered up the board, waited until connect to AP, ping gateway, connect to MQTT broker; Send a MQTT command, requesting FS info. First, sl_FsCtl was used to request SL_FS_CTL_GET_STORAGE_INFO. This data was stored in string form and sent over MQTT. After, consecutive calls of sl_FsGetFileList was done, with 5 as max file count. Each return call was stored in string form and sent over MQTT. This step is repeated until there no more files. I reseted launchpad, pressing reset button (SW1 - RESET); Released reset button, waited until connect to AP, when start pinging gateway I pressed reset button again; Released reset button, waited until connect to AP, ping gateway, connect to MQTT broker; Send a MQTT command, requesting FS info. The data received over MQTT can be seen below: ______________________ DeviceBlockSize 4096 DeviceBlocksCapacity 1024 NumOfAllocatedBlocks 895 NumOfReservedBlocks 2 NumOfReservedBlocksForSystemfiles 6 LargestAllocatedGapInBlocks 121 NumOfAvailableBlocksForUserFiles 121 Padding 0 0 MaxFsFiles 240 IsDevlopmentFormatType 1 Bundlestate 0 Reserved 255 MaxFsFilesReservedForSysFiles 56 ActualNumOfUserFiles 19 ActualNumOfSysFiles 21 Padding 0 NumOfAlerts 0 NumOfAlertsThreshold 15 FATWriteCounter 49 Name: config.txt AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: /sys/macadd.bin AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/stacfg.ini AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/ap.cfg AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/dhcpsrv.cfg AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/httpsrv.cfg AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/mode.cfg AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/devname.cfg AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/phybg.cal AllocatedBlocks: 6 MaxSize(byte): 11848 Flags: 0040 Name: /tmp/table.arp AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/date_time.cfg AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0060 Name: /sys/dhcp.bin AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: digicert_high_assurance_ev_root_ca.cer AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: /sys/certstore.lst AllocatedBlocks: 4 MaxSize(byte): 7752 Flags: 02D0 Name: /sys/servicepack.ucf AllocatedBlocks: 66 MaxSize(byte): 134728 Flags: 02D0 Name: /sys/mcuflashimg.bin AllocatedBlocks: 514 MaxSize(byte): 1052232 Flags: 02D0 Name: /sys/mcuflashimghash.bin AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0070 Name: /sys/factory.img AllocatedBlocks: 157 MaxSize(byte): 638536 Flags: 0070 Name: /sys/ucf_signatures.bin AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0060 Name: /tmp/dnscache.bin AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0050 Name: /tmp/chanhist.tbl AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/phypwr.cal AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 00E0 Name: locator.crt AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: locator.key AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: ota_vendor_cert.der AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: safe_config.txt AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: spi-secure.gbl AllocatedBlocks: 53 MaxSize(byte): 216648 Flags: 0020 Name: /www/config.html AllocatedBlocks: 2 MaxSize(byte): 7752 Flags: 0020 Name: /www/css/style.css AllocatedBlocks: 8 MaxSize(byte): 32328 Flags: 0020 Name: /www/images/favicon.ico AllocatedBlocks: 3 MaxSize(byte): 11848 Flags: 0020 Name: /www/js/jquery.min.js AllocatedBlocks: 21 MaxSize(byte): 85576 Flags: 0020 Name: /www/js/scripts.js AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: /www/ota.html AllocatedBlocks: 3 MaxSize(byte): 11848 Flags: 0020 Name: /tmp/crashminidump.bin AllocatedBlocks: 7 MaxSize(byte): 28232 Flags: 0020 Name: /sys/phya.cal AllocatedBlocks: 6 MaxSize(byte): 11848 Flags: 1100 ------------------ UNTIL HERE, EVERYTHING IS OK: JUST 1 FILE /sys/phya.cal at sflash, but with SL_FS_INFO_OPEN_WRITE and SL_FS_INFO_NOT_VALID flags set. --------------- ------------------- HERE I RESETED THE LAUNCHPAD, WAITED UNTIL CONNECT AT AP AND RESETED AGAIN ------------------------------------------------------------------------- --------------------THE FOLLOWING IS A RESPONSE TO THE SAME COMMAND USED BEFORE, BUT THE LAST FILES AT LIST ARE /sys/phya.cal ------------------------------------------ DeviceBlockSize 4096 DeviceBlocksCapacity 1024 NumOfAllocatedBlocks 901 NumOfReservedBlocks 2 NumOfReservedBlocksForSystemfiles 6 LargestAllocatedGapInBlocks 115 NumOfAvailableBlocksForUserFiles 115 Padding 0 0 MaxFsFiles 240 IsDevlopmentFormatType 1 Bundlestate 0 Reserved 255 MaxFsFilesReservedForSysFiles 56 ActualNumOfUserFiles 20 ActualNumOfSysFiles 21 Padding 0 NumOfAlerts 0 NumOfAlertsThreshold 15 FATWriteCounter 52 Name: config.txt AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: /sys/macadd.bin AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/stacfg.ini AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/ap.cfg AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/dhcpsrv.cfg AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/httpsrv.cfg AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/mode.cfg AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/devname.cfg AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/phybg.cal AllocatedBlocks: 6 MaxSize(byte): 11848 Flags: 0040 Name: /tmp/table.arp AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/date_time.cfg AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0060 Name: /sys/dhcp.bin AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: digicert_high_assurance_ev_root_ca.cer AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: /sys/certstore.lst AllocatedBlocks: 4 MaxSize(byte): 7752 Flags: 02D0 Name: /sys/servicepack.ucf AllocatedBlocks: 66 MaxSize(byte): 134728 Flags: 02D0 Name: /sys/mcuflashimg.bin AllocatedBlocks: 514 MaxSize(byte): 1052232 Flags: 02D0 Name: /sys/mcuflashimghash.bin AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0070 Name: /sys/factory.img AllocatedBlocks: 157 MaxSize(byte): 638536 Flags: 0070 Name: /sys/ucf_signatures.bin AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0060 Name: /tmp/dnscache.bin AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0050 Name: /tmp/chanhist.tbl AllocatedBlocks: 2 MaxSize(byte): 3656 Flags: 0040 Name: /sys/phypwr.cal AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 00E0 Name: locator.crt AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: locator.key AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: ota_vendor_cert.der AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: safe_config.txt AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: spi-secure.gbl AllocatedBlocks: 53 MaxSize(byte): 216648 Flags: 0020 Name: /www/config.html AllocatedBlocks: 2 MaxSize(byte): 7752 Flags: 0020 Name: /www/css/style.css AllocatedBlocks: 8 MaxSize(byte): 32328 Flags: 0020 Name: /www/images/favicon.ico AllocatedBlocks: 3 MaxSize(byte): 11848 Flags: 0020 Name: /www/js/jquery.min.js AllocatedBlocks: 21 MaxSize(byte): 85576 Flags: 0020 Name: /www/js/scripts.js AllocatedBlocks: 1 MaxSize(byte): 3656 Flags: 0020 Name: /www/ota.html AllocatedBlocks: 3 MaxSize(byte): 11848 Flags: 0020 Name: /tmp/crashminidump.bin AllocatedBlocks: 7 MaxSize(byte): 28232 Flags: 0020 Name: /sys/phya.cal AllocatedBlocks: 6 MaxSize(byte): 11848 Flags: 0100 Name: /sys/phya.cal AllocatedBlocks: 6 MaxSize(byte): 11848 Flags: 1100 -------------- Code: (just to test this issue, not present at production firmware) -------------- _i32 Status; SlFsControlGetStorageInfoResponse_t GetStorageInfoResponse; Status = sl_FsCtl( ( SlFsCtl_e)SL_FS_CTL_GET_STORAGE_INFO, 0, NULL , NULL , 0, (_u8*)&GetStorageInfoResponse, sizeof(SlFsControlGetStorageInfoResponse_t), NULL ); if( Status < 0 ) { /*error */ } int index = 0; char msg[600]; index += snprintf(msg + index, 50, "DeviceBlockSize %d\r\n", GetStorageInfoResponse.DeviceUsage.DeviceBlockSize); index += snprintf(msg + index, 50, "DeviceBlocksCapacity %d\r\n", GetStorageInfoResponse.DeviceUsage.DeviceBlocksCapacity); index += snprintf(msg + index, 50, "NumOfAllocatedBlocks %d\r\n", GetStorageInfoResponse.DeviceUsage.NumOfAllocatedBlocks); index += snprintf(msg + index, 50, "NumOfReservedBlocks %d\r\n", GetStorageInfoResponse.DeviceUsage.NumOfReservedBlocks); index += snprintf(msg + index, 50, "NumOfReservedBlocksForSystemfiles %d\r\n", GetStorageInfoResponse.DeviceUsage.NumOfReservedBlocksForSystemfiles); index += snprintf(msg + index, 50, "LargestAllocatedGapInBlocks %d\r\n", GetStorageInfoResponse.DeviceUsage.LargestAllocatedGapInBlocks); index += snprintf(msg + index, 50, "NumOfAvailableBlocksForUserFiles %d\r\n", GetStorageInfoResponse.DeviceUsage.NumOfAvailableBlocksForUserFiles); index += snprintf(msg + index, 50, "Padding %d %d\r\n", GetStorageInfoResponse.DeviceUsage.Padding[0], GetStorageInfoResponse.DeviceUsage.Padding[1]); index += snprintf(msg + index, 50, "MaxFsFiles %d\r\n", GetStorageInfoResponse.FilesUsage.MaxFsFiles); index += snprintf(msg + index, 50, "IsDevlopmentFormatType %d\r\n", GetStorageInfoResponse.FilesUsage.IsDevlopmentFormatType); index += snprintf(msg + index, 50, "Bundlestate %d\r\n", GetStorageInfoResponse.FilesUsage.Bundlestate); /*see SlFsBundleState_e*/ index += snprintf(msg + index, 50, "Reserved %d\r\n", GetStorageInfoResponse.FilesUsage.Reserved); index += snprintf(msg + index, 50, "MaxFsFilesReservedForSysFiles %d\r\n", GetStorageInfoResponse.FilesUsage.MaxFsFilesReservedForSysFiles); index += snprintf(msg + index, 50, "ActualNumOfUserFiles %d\r\n", GetStorageInfoResponse.FilesUsage.ActualNumOfUserFiles); index += snprintf(msg + index, 50, "ActualNumOfSysFiles %d\r\n", GetStorageInfoResponse.FilesUsage.ActualNumOfSysFiles); index += snprintf(msg + index, 50, "Padding %d\r\n", GetStorageInfoResponse.FilesUsage.Padding); index += snprintf(msg + index, 50, "NumOfAlerts %d\r\n", GetStorageInfoResponse.FilesUsage.NumOfAlerts); index += snprintf(msg + index, 50, "NumOfAlertsThreshold %d\r\n", GetStorageInfoResponse.FilesUsage.NumOfAlertsThreshold); index += snprintf(msg + index, 50, "FATWriteCounter %d\r\n", GetStorageInfoResponse.FilesUsage.FATWriteCounter); MQTTClient_publish(gMqttClient, publish_topic_file_system_info, strlen(publish_topic_file_system_info), msg, index, MQTT_QOS_1); _i32 NumOfEntriesOrError = 1; _i32 Index = -1; slGetfileList_t File[5]; _i32 i; int retries = 0; Status = 0; while( NumOfEntriesOrError > 0) { NumOfEntriesOrError = sl_FsGetFileList( &Index, 5, (_u8)(SL_FS_MAX_FILE_NAME_LENGTH + sizeof(SlFileAttributes_t)), (unsigned char*)File, SL_FS_GET_FILE_ATTRIBUTES); if (NumOfEntriesOrError < 0) { Status = NumOfEntriesOrError;//errorbreak; } index = 0; for (i = 0; i < NumOfEntriesOrError; i++) { index += snprintf(msg + index, 50, "Name: %s\r\n", File[i].fileName); index += snprintf(msg + index, 50, "AllocatedBlocks: %5d ",File[i].attribute.FileAllocatedBlocks); index += snprintf(msg + index, 50, "MaxSize(byte): %5d \r\n\n", File[i].attribute.FileMaxSize); index += snprintf(msg + index, 20, "Flags: %04X \r\n\n", File[i].attribute.Properties); } MQTTClient_publish(gMqttClient, publish_topic_file_system_info, strlen(publish_topic_file_system_info), msg, index, MQTT_QOS_0); sleep(1); }