FLASH subscription

Hi all,
i am using q2686 module
i am tring to subscribe flash multiple time using different handles and number of object range.
how many time we can subscribe to the flash?

ascii flash_hdl1,flash_hdl2;

s8 sReturn,sReturn1;
/* first subscription /
sReturn = adl_flhSubscribe ( &flash_hdl1,30 );
Second subscription */
sReturn1 = adl_flhSubscribe ( &flash_hdl2,50 );

waiting for reply

you need to define name of yours objects set:

static const char CONFIG_STR_HANDLE[] = “CONFIG”;

adl_flhSubscribe(CONFIG_STR_HANDLE, 1);

thank for reply,
for flash subscription we have to give the flash hdl and number of object.
then what is use of giving the object name.
please take a look in the following code which i have written:

ascii flash_hdl1, flash_hdl2;	
s8 sReturn1,sReturn2;

typedef struct{
char *nam;
name men, women;

sReturn1 = adl_flhSubscribe ( flash_hdl1, 2 );
sReturn2 = adl_flhSubscribe ( flash_hdl2, 4 );

both the functions return OK;

men.nam = "ABC";
women.nam = "XYZ";

adl_flhWrite ( flash_hdl1, 1, sizeof(men), (u8 *)&men );

this function return OK;

adl_flhWrite ( flash_hdl2, 3, sizeof(women), (u8 *)&women );

this function return ADL_FLH_RET_ERR_ID_OUT_OF_RANGE;

my doubt is:
as we are getting different handle for each cellid, in application and data storage subcription
can we get the different handle for the flash with variable/different objects range (10,20 etc.)

waiting for reply

If you look in the documentation you can clearly see that adl_fldSubscribe expects a STRING as a handle.
A unique string for each handle you want to use.

Are you sure that the subscriptions return OK or is it “already subscribed”? Which could be treated as OK, as you will get that every time the program starts unless you make sure to erase all flash objects between.

Clear the flash and check what they both return in its current form, then replace:
ascii flash_hdl1, flash_hdl2;
static const ascii flash_hdl1[]=“men”;
static const ascii flash_hdl2[]=“women”;
and see if you still have problems.

The way you have it written now suggest that both your handles point to the same objects, and you would therefore only get 2 ID’s available as the second subscription doesn’t happen, or it does happen but on write the OS can’t know which of them you want to work with.

You are not “getting” a handle. You are providing the handle with the handle strings. The OS looks at the string to determine which flash objects you want to work with, so if you need to have different handles, you also need unique identifier strings.

Hi all !

Tobias is right ! From Wavecom FAQ :