Keep web content (.html, .js) on external flash in a filesystem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi guys,

I would like to keep web content (.html, .js) of the web server on external flash in a filesystem.

How do I do it?

I have tried to comment the following line in the  BCM943362WCD4.mk file:

INTERNAL_MEMORY_RESOURCES = $(ALL_RESOURCES)

Once built, resources content appear to be in RESOURCE_IN_FILESYSTEM:

const resource_hnd_t resources_apps_DIR_appliance_DIR_top_web_page_top_html = { RESOURCE_IN_FILESYSTEM, 785, { .fs = { 0, "top_web_page_top.html" }}};

Also wifi_firmware is RESOURCE_IN_FILESYSTEM.

However the device cannot join Wi-Fi network after that.

Not sure how to do it correctly.

I would appreciate any help on this.

Oleg

0 Likes
10 Replies
Anonymous
Not applicable

Hi,

there are multiple ways to achieve your target. As a start let me point out that there are two file systems in WICED 3.1.2.

- A simple read write file system  (which is called multi application file system). This can take up to 7 files and should usually be used for applications and configuration files

- read only resources file system, this as the name implies is more for read only resources.

- if your web content are static and don't need to change, they can be put in the resources file system.

  This is already done in BCM943362WCD4_ext platform. so rather than building for BCM943362WCD4, build for BCM943362WCD4_ext. This will put all your resources in the filesystem (it is basically doing the same thing you did plus some extra minor modifications to download the file system to external serial flash)

- if your files are dynamic you can use the mutli application read/write APIs to write these files, however pay attention to the number of files and the durability of your serial flash. for more details on this have a look at Apps/snip/ota_fr.

Regards,

Bassem

0 Likes
Anonymous
Not applicable

Bassem,

Thanks for your response.

Please could you clarify about BCM943362WCD4_ext platform. It is neither in SDK 3.1.2 nor in SDK 2.4.1. Where can I find it?

Basically when I try to make a target: "snip.ota_fr-BCM943362WCD4_ext download download_apps run"

I get error: "tools/makefiles/wiced_config.mk:193: *** Unknown component: BCM943362WCD4_ext."

Many thanks.

Oleg

0 Likes
Anonymous
Not applicable

Hi,

I just realized that the BCM943362WCD4_ext is not released, its part of the development only. However I'll create to a patch for you with the platform and send it to you.

Sorry for the confusion and late reply.

Regards,

Bassem

Anonymous
Not applicable

Hi Bassem,

Just wondering about the progress with BCM943362WCD4_ext platform. Can it be shared yet?

Many thanks,

Oleg

0 Likes

Dear Bassem,

I would like to have the BCM943362WCD4_ext platform file.

Would you send a copy to me !?

--

Thanks in advance,

Jone

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi,

Please find the attached platform files for BCM943362WCD4_ext. Sorry for being late in posting this. Before of time restrictions, this hasn't been fully tested, however, I believe it should work.

Regards,

Bassem

Anonymous
Not applicable

WiConnect firmware, which is based on WICED, solves all your interactive web issues and lots more in no time flat so you can spend your valuable time focussing on your application, rather than tearing your hair out over mundane low-level wireless/networking/security issues. Think of WiConnect as WICED-on-steroids.


The latest 2.1 release includes a mobile responsive web application that talks to the WiConnect (secure) webserver via a RESTful API &/or websockets. Use the REST API to send/receive data to the serial interface, read ADC values, control GPIOs or read & write files to a bulk serial flash up to 128MB. To help you develop web apps, the WiConnect Javascript API is easily embedded into your 100% customizable web pages that are stored on the WiConnect file system.

Want to upload/download files? No problem. Just drag those files right onto your module with a mouse using the web app that comes free with WiConnect. We provide full source and a JS build system for the web app too.

More info about the core WiConnect API is available at http://wiconnect.ack.me

Info about the HTTP(S) webserver and REST API is at WiConnect - HTTP Server with RESTful API

If you need help with other features, there's loads of WiConnect Application examples too.

jc

Bassem,

Got it!

And try it on BC943362WCD4 EVB!

It work except there are some files have to modify base on SDK 3.1.2.

--

Thanks

Jone

Anonymous
Not applicable

Hi jone,

I am also working on SDK 3.1.2 and wanted to store data on external flash using SPI.

Will you please tell me what are changes or modification needed to be done in SDK 3.1.2 .

Thanking You,

Hinesh

0 Likes
Anonymous
Not applicable

Hinesh,

Just add "BCM943362WCD4_ext" folder into "Wiced-SDK/platforms" folder and run:

"snip.ota_fr-BCM943362WCD4_ext download download_apps run" for example.

Also have a look at this thread:

Patch to put firmware on external flash

All done by Bassem. Thanks to him.

Oleg

0 Likes