How to retrieve the app name being updated through LWM2M

Hello,

In my usecase, I need to manage the LWM2M update process.

I have to be able to know which app is being updated. I found in legato documentation I could use the api le_avc_GetAppUpdateName but this function always return LE_FAULT because this function is “not implemented”. (cf: legato-af/avcServer.c at master · legatoproject/legato-af · GitHub)

How can I retrieve this app name ?
It doesn’t matter if I have to modify sources of legato framework.

Best regards

Do you want to know the name of the app before “accepting download”? It is not be possible to know the app name till the install process. i.e we need to unzip the package and read the headers to figure out the app name.

@prushp, thanks for your reply.

The app is already downloaded when I have to know its name. I want to retrieve its name just before “accepting install”.

we need to unzip the package and read the headers to figure out the app name

I can’t figure out where packages are downloaded on my WP85 hence I’m stuck on this “workaround”.

Best regards

It is not supported. But if you are modifying legato source code for this feature, take a look at avcAppUpdate.c file. The downloaded package should be under /legato/download/download.update
The download part is handled within the avcService app. The install is handled by the updateDaemon which is part of legato framework. Take a look at le_update_Start() & le_update_Install() apis to see how the package is parsed on installed to the target. You may be also interested in looking at the security-pack / security-unpack feature in legato. This is a hook to run a script after a download is done. If you make a custom package, you may be able to extract some information by running a script after download is complete.

Hi @babare,
do you need more information, or could we sert this topic as solved?
best regards,

Hi,

I could solve my problem by reading avcService configTree and crossing it with the system configTree.

Best regards