Regarding ad memory info api functionality


:astonished: Hello Everyone ,

I want to log data to AD memory , can u tell me that does info api tell correct information , when i m reading the cell , i am getting correct handle but id is different frm wat id i subscribed , I had printed the handle while subscription . Can u help !!! plzz help


and this problem is coming only when i have deleted another cell , help


You need to post the smallest complete, compilable example that illustrates your problem.
Remember to use copy-and-paste; do not manually re-type the code into the forum!


Actually I hav divided the ad memory into 4 parts , and i m incresing the cell id 's each time subscribing next one in timer handler , now i delete first cell id ,recompact , and again subscribe next cell id and write some data into it , now i want to read the data frm 2nd cell , 3rd cell , then 4th cell, and agin 1’st cell upto where i hav wrtten , but when i use info api to get cell id frm cell handle it gives me wrong id .


now i think that after recompact the previous cell handles become invalid , so i have unsubscribed previous handles and again subscribed for the same cel id’s , and reading it , its working perfect , upto now .
Thanks for replying


Hi Soni !

Maybe i misunderstood what you explain, but if you delete a cell with the corresponding handle, this handle wont be valid any more… The same happend if the module reset !

From wavecom FAQ :

Please note that ADL internally stores the Cell ID and the memory that has been allocated to it. The adl_adSubscribe () returns a valid handle which is then used to refer to the cell and perform all the operation (like write, read etc) on that cell. If the Wireless CPU is reset, the contents of the subscribed cell are not lost. If the application again wants to write/read to the cell, the API adl_adSubscribe () can be called again to get a valid handle once again. It should be noted that the Cell ID is valid but the application can get different handles each time after a reboot

So, when you subscribe to A&D memory cell, the handle received will stay valid till the next adl_adDelete(), adl_adUnsubscribe(), adl_adFormat() or reset of the module. And adl_adInfo() only works with valid handle…


hi All

Actually I hav taken an array containing 4 handles becoz i hav to subscribe for 4 cells , each time I subscribe i store the handle in it , but when I delete only cell corresponding to the cell handle which I hav deleted should become invalid naa but all other cellhandle are giving wrong corresponding cell id’s by info and this is happening only after recompact , before recompact every thing is fine and that too after after the recompact which i hav done on writing to the whole memory .

So when i hav to read i unsubscribe the previous cell handle and get new cell handle by subscribe api then it works fine , now agin i hav written to whole memory , but now it if i delete and recomact the cell handles are valid and if i unsubscribe and again subscribe , subscribe gives -4 , I m not able to solve this problem …


One more problem , I had tried to write to ad memory without subscribing for undefined size , but it did’nt work ,can u tell me what might be the problem .


I have found that this is for sure that after recompact cell handle are lost , u hav to resubscribe to get them back .

Thanks for support. That was the problem