SD Card Management

Last Updated on : 2024-11-18 11:33:14download

SD card management is implemented with data points (DPs). You can check the DP constants in IPC control on Android. For more information about how to query and use DPs, see Device Control.

Query SD card status

Returns SD card status based on the DP ID 110.

Before SD card management or SD card-stored video playback, you must check the status of the SD card. If no SD card is found on the IP camera (IPC), subsequent steps cannot be performed. If the SD card has faults, it must be formatted first.

Value Description
1 Normal
2 Exceptional, for example, such as damaged SD card or incorrect format
3 Insufficient space
4 Being formatted
5 No SD card found

To send the DP data, pass in null without a parameter.

Format an SD card

Formats an SD card based on the DP ID 111.

SD card formatting can be implemented in the following ways based on different types of IPC firmware:

  • Certain types of IPC firmware regularly report the progress of ongoing formatting. They also report the current storage capacity at the end of formatting.
  • Other few types of IPC firmware do not report the progress of formatting. Therefore, you must regularly check the progress. When the progress reaches 100, you can check the storage capacity of the SD card.

Query formatting progress

Returns the progress of formatting an SD card based on the DP ID 117.

When the progress reaches 100, the formatting task is finished. Then, you can check the storage capacity.

Query storage capacity

Returns the storage capacity of an SD card based on the DP ID 109.

The storage capacity is returned as a string in the format of total capacity|used capacity|idle capacity. Unit: KB.

Enable or disable video recording

Enables or disables SD card-stored video recording based on the DP ID 150.

Switch between video recording modes

Switches between SD card-stored video recording modes based on the DP ID 151.

After an SD card is inserted into an IPC, videos are recorded and saved to the SD card. The IPC SDK can be used to set the video recording switch and mode.

Value Description
1 Event-triggered mode. The IPC starts video recording only after a detection alert is generated. The video duration varies depending on the type and duration of the event.
2 Continuous recording mode. The IPC continuously collects audio and videos and saves them to the SD card. If the storage capacity is insufficient, the earliest content will be overwritten by the latest content.