I am wishing to move a configuration file for Azure Sphere. Naturally SCP over SSH would work nicely. Can anyone direct me to a solution? I will have to modify the file sometimes depending on the layout of the equipment in use.
Thanks.
I am wishing to move a configuration file for Azure Sphere. Naturally SCP over SSH would work nicely. Can anyone direct me to a solution? I will have to modify the file sometimes depending on the layout of the equipment in use.
Thanks.
Just hint: app_manifest.json can be used as read-only setting file
see: my ... var_1 ....
{ "Name": "", "Capabilities": { "Uart": ["$AVNET_AESMS_ISU0_UART"], "AllowedConnections": [] }, "CmdArgs": [], "EntryPoint": "", "SchemaVersion": 1, "ComponentId": "9FAFA94E-3CFA-4B1D-8A13-50B82539A9B7", "my" : { "var_1" : "1", "var_2" : "2", "var_3" : "3" } }
as example
void foo(){
int fd = Storage_OpenFileInImagePackage("app_manifest.json");
char json_buffer[1024];
read(fd, json_buffer, sizeof(json_buffer));
//PARSE JSON VARIABLES
close(fd);
}
the real file name is: /mnt/apps/GUID_FROM_APP_MANIFEST/app_manifest.json
I wish to detach the settings from the code because the code is generic and the data is specific to the device. But I can see usefulness in this sample.
app_manifest.json is specific for "this" application only
app container is:
/mnt ...../GUID/app_manifest.json
/mnt ...../GUID/packed_files...
/mnt ...../GUID/bin/application
Storage_GetAbsolutePathInImagePackage() return path from this container ( print result )
other GUID is other container ( app )
I'm not sure I see any advantage to using the app_manifest.json file to define application settings. You can do this, but the only way to change them in the field is to upload a new application to AS3 and push the changes down with an OTA update. This would be similar to using constants in your application.
If you use device twins, or Direct Methods for configuration data you have a flexible implementation that does not require a new application build and you can push different values down for each device.
My 2 cents . . .
I'm not sure I see any advantage to using the app_manifest.json file to define application settings. You can do this, but the only way to change them in the field is to upload a new application to AS3 and push the changes down with an OTA update. This would be similar to using constants in your application.
If you use device twins, or Direct Methods for configuration data you have a flexible implementation that does not require a new application build and you can push different values down for each device.
My 2 cents . . .
yep ... it is app constants