This demo demonstrates how to use the Aurora SDK's PersistentConfigManager to manage device configuration entries.
- Enumerate: List all registered configuration entries on the device
- Get: Retrieve configuration values in JSON format
- Set: Update configuration values with JSON data
- Reset: Reset individual or all configurations to default values
- Aurora device with firmware >= 2.1.1
- Aurora Remote SDK 2.1.1 or later
persistent_config <server_address> <command> [args...]| Command | Description |
|---|---|
enum |
List all registered config entries |
get <filter_path> [-o <file>] |
Get config (optionally save to file) |
set <filter_path> <key> <json|file> |
Set config with key |
reset <filter_path> |
Reset config to default |
reset-all |
Reset all configs to default |
List all configuration entries:
./persistent_config 192.168.11.1 enumGet a specific configuration:
./persistent_config 192.168.11.1 get recorder.dashcamSave configuration to a file:
./persistent_config 192.168.11.1 get recorder.dashcam -o config.jsonSet configuration from JSON string:
./persistent_config 192.168.11.1 set recorder.dashcam @overwrite '{"enabled":true}'Set configuration from file:
./persistent_config 192.168.11.1 set recorder.dashcam @overwrite config.jsonReset a specific configuration:
./persistent_config 192.168.11.1 reset recorder.dashcamReset all configurations:
./persistent_config 192.168.11.1 reset-allWhen setting configuration, you can use different keys to control how the value is applied:
@overwrite: Completely replace the existing configuration- Other keys may be module-specific, refer to device documentation
This demo uses the following SDK APIs:
RemoteSDK::persistentConfig.enumAllEntries()- List all config entry pathsRemoteSDK::persistentConfig.getConfig()- Get config as JSON stringRemoteSDK::persistentConfig.setConfig()- Set config with key and JSON valueRemoteSDK::persistentConfig.resetConfig()- Reset specific config to defaultRemoteSDK::persistentConfig.resetAllConfig()- Reset all configs to default
- "Failed to enumerate entries": Ensure the device firmware supports persistent config (>= 2.1.1)
- "Failed to set config": Check that the JSON format is valid and the filter path exists
- "Config is empty": The specified config path may not exist or has no value set