Performing AT+WOPEN=3 or equivalent via Application


I’m having an issue about ADL FLASH API

I recently changed the FLASH structure that we’re using on our application. So I have to empty the application data remotely to make our application work successfully. I tried deleting all flash data via:


But that doesn’t seem to be working, because I have figured out that subscribing to that flash handle is failing during the startup (It gives the error code “-4”)

So, what I need is a workaround for “AT+WOPEN=3”, since It’s not possible to use that when an application is running, the only thing I’m thinking of right now is ,if possible, scheduling command series of:


with 1 minute intervals.

Do you have any other ideas? I need to do this remotely to go further on development of this application.

You really don’t want to do that - for the reasons you have discovered!

Can’t you keep the existing structure the same, and just add the new bit(s)…?

By structure, I meant order of Flash objects in handles.

I have two handles on the flash;

first one contains device settings, and two addresses and it is set to have 5 items.

The second handle is set to have 1000 items, which is where we keep our data to be sent in case of a possible gprs connection unavailability. and to secure the “first in first out” principle, those two addresses in the first handle contains the address of the first and last sent data.

Previous structure had two items:

0 -> address of the last logged item.
1 -> settings string.
2,3,4 -> empty
Now it is like:

0 -> settings string.
1 -> address of first logged item.
2 -> address of last logged item.
3,4 -> empty

I wanted to keep the flash in order. So I think you are advising me not to change the address of the setting string and place those two new strings to 0 and 2.

If I do that, I will still need to empty the second handle that contain 1000 items. What I don’t understand is,
the handles’ sizes are the same as before, why do I get that error when I set it like this and try to subscribe after reboot?


I figured out that the log handle item count was set to “10” on some of devices. And I really need to set them to 1000.

Otherwise logging mechanism will not make sense. What happens if possible (because I didn’t see anything to do that on API) I unsubscribe that flash handle, and subscribe to another flash handle that has 1000 items? (in short, change the name of the handle that i use for logging)

Or on the other hand, what is the total size of a handle that is set to have 1000 items and all items in it is deleted. Will it cause any problem to leave that emptied handle as it is and use a new handle that meets my requirements.

Best Regards,