This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1352P: Problems with "corrupt" database files

Part Number: CC1352P
Other Parts Discussed in Thread: Z-STACK

Hi everyone,

We are having an issue with a system running on Z-Stack Linux server and stack version 4.40.04.04. The problem is mainly with the database files (CSV) that the Linux server has.

Problem 1:

Sometimes we have errors with devices file (DbDeviceInfo.csv). The first row is displayed with incorrect and incomplete data. So far, it always happens with the first row, we don't know if it happens with any other. This causes the NWK_GET_DEVICE_LIST_CNF_VALUE command to always have an empty device list.

Problem 2:

Devices sometimes change the value of EP_Count to 0, but the EPs are kept in the DbEndpoints file. This causes that when the NWK_GET_DEVICE_LIST_CNF_VALUE command is used, some devices do not have EPs.

What could be the cause of these problems? Mainly problem 1, which causes our system to not work. I attached the sample files

1440.TI.zip

BR,

Randy

  • Hi Randy,

    For Problem 1, how often does this issue occur?  If it happens every time then there could be an issue with the gszNwkMgrDb_DeviceInfoHeader which gets passed to sdb_init_db from nwkMgrDb_Init.  Otherwise, it could be an issue with sdb_lock/unlock during nwkMgrDb_AddDevice -> sdb_add_record.  Perhaps you could use sdb_get_record to confirm that the contents were correctly added or use further print line debugging in SimpleDB.c and nwkmgrdatabase.c to discover where and why the behavior appears.

    Concerning Problem 2, when is an endpoint removed and how is it processed by the Linux server?  There are no functions to update/refresh database records, this only occurs through deleting then re-adding the entry.  This is demonstrated in nwkMgrDb_SetDeviceStatus.  I'm not certain why identical entries are being repeated in the DbDeviceInfo.csv files.

    Regards,
    Ryan