Installing a .dwl file from file-system

ADL, A&D memory, Flash objects, multi-tasking, file system, DOTA.

Installing a .dwl file from file-system

Postby ajaygarg » Tue Mar 21, 2017 2:56 pm

Hi All.

We are using the SL808xT module.

As per the ADL-User guide,

As this service is managed above the file system on the AirPrime SL808xT & Q2698 embedded
modules, it is highly recommended to use the file system service directly instead of the A&D storage
service. However the A&D storage service API is available for compatibility purpose with 2G
products.


Reading the above, we would love to have the following mechanism ::

a)
Download the dwl-file-bytes from internet, and keep storing the dwl-file-bytes on the file-system on the fly.

b)
Once the download is complete, use an equivalent function of s32 adl_adInstall ( s32 CellHandle );

where CellHandle could somehow be mapped to the dwl-file stored on the filesystem.

Is this even possible? Am I being too hopeful? :)

Would love to hear back from you experts !!!


Thanks and Regards,
Ajay
ajaygarg
 
Posts: 14
Joined: Sun May 22, 2016 10:23 pm
Has thanked: 1 time
Have thanks: 0 time

Re: Installing a .dwl file from file-system

Postby ajaygarg » Thu Mar 23, 2017 12:16 pm

Ping !!

Any help will be greatly appreciated :)
Thanks in advance.

Thanks and Regards,
Ajay
ajaygarg
 
Posts: 14
Joined: Sun May 22, 2016 10:23 pm
Has thanked: 1 time
Have thanks: 0 time

Re: Installing a .dwl file from file-system

Postby ajaygarg » Mon Mar 27, 2017 7:55 am

Ping
ajaygarg
 
Posts: 14
Joined: Sun May 22, 2016 10:23 pm
Has thanked: 1 time
Have thanks: 0 time

Re: Installing a .dwl file from file-system

Postby Rex_alex » Tue Mar 28, 2017 7:31 am

Hello Ajay,
You can use adl_fsinstall function to install .dwl file which you have downloaded in File system.

Thanks & Regards,
Rex
User avatar
Rex_alex
 
Posts: 1334
Joined: Thu Jan 01, 1970 12:00 am
Has thanked: 0 time
Have thanks: 81 times

Re: Installing a .dwl file from file-system

Postby ajaygarg » Thu Mar 30, 2017 7:59 am

Thanks Rex for the help.

Unfortunately, I could not find any complete-working hello-world program for the same (no sample-program with OpenAT, neither any reference in the ADL-User-Guide).


Following is the code.
Upon execution, it gets stuck at Beginning installation ... (even though file energy-meter_maestro-m100-2g_5.5.0_5.5.0.dwl is present on the file-system).

Code: Select all
/**********************************************************************************************************************/

/*****************************************************************************/
/*  Includes                                                                 */
/*****************************************************************************/
#include "wm_types.h"       /* Sierra Wireless types definitions             */
#include "wm_stdio.h"       /* Sierra Wireless standard input/output         */
                            /* definitions                                   */
#include "wm_list.h"        /* Sierra Wireless List and Stack API definitions*/
#include "adl_str.h"        /* String service                                */
#include "adl_port.h"       /* Port service                                  */
#include "adl_at.h"         /* AT commands related structures definition     */
#include "adl_ad.h"         /* Application & Data storage service            */

#include "adl_traces.h"     /* Traces macros definition                      */
#include "adl_memory.h"     /* Memory management functions                   */
#include "adl_error.h"      /* Error functions and definitions               */

#include "adl_AppliInit.h"  /* Application initialization definitions        */
#include "adl_RspHandler.h" /* AT command response definitions               */
#include "adl_CmdHandler.h" /* AT command service definitions                */

#include "adl_filesystem.h"
/***************************************************************************/
/*  Mandatory variables                                                    */
/***************************************************************************/
// Application tasks prototypes
extern void main_task ( void );

// Application tasks declaration table
const adl_InitTasks_t adl_InitTasks [] =
{
    { main_task,  3072, "main", 1 },
    { 0, 0, 0, 0 }
};


static char LOG_GLOBAL_BUFFER[1024];

static void info_log(char * buf)
{
   TRACE((4, (char*) buf));
   memset(buf, 0, sizeof(LOG_GLOBAL_BUFFER));
}


void main_task ( void )
{
    memset(LOG_GLOBAL_BUFFER, 0, sizeof(LOG_GLOBAL_BUFFER));
    info_log("Beginning installation ...");

    {
       s32 ret = adl_fsInstall("energy-meter_maestro-m100-2g_5.5.0_5.5.0.dwl");

       sprintf(LOG_GLOBAL_BUFFER, "return code is [%d]", ret);
       info_log(LOG_GLOBAL_BUFFER);
    }
}


Kindly point me to a complete working example for the adl_fsInstall API, I will be grateful.


Thanks and Regards,
Ajay
ajaygarg
 
Posts: 14
Joined: Sun May 22, 2016 10:23 pm
Has thanked: 1 time
Have thanks: 0 time

Re: Installing a .dwl file from file-system

Postby ajaygarg » Wed Apr 19, 2017 7:47 am

Ping ..
Will be grateful to listen back
ajaygarg
 
Posts: 14
Joined: Sun May 22, 2016 10:23 pm
Has thanked: 1 time
Have thanks: 0 time


Return to Operating system

Who is online

Users browsing this forum: No registered users and 1 guest