This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3235SF: Extend Provisioning web page with user.js

Part Number: CC3235SF
Other Parts Discussed in Thread: UNIFLASH

The hard-coded Provisioning web page includes the line "<script src='user.js'></script>

This is presumably intended to make it possible for additional functions to be added to the Provisoning page - which is exactly what I want to do.

My ideal scenario would be to add a new menu tab to top of the page, so instead of reading "Status, Profiles, Device..." it reads "Status, MyConfig, Profiles, Device.." where MyConfig would be a sub-page allowing the user to set up operating parameters for my application.

However, I can't see how one could do this

Can someone point me to a document which gives a few worked examples of exploiting the user.js feature?  A web search has not turned up anything helpful, and neither have any of the many TI documents I have already reviewed.

  • I think I have pieced together what has to be done (but would much prefer to see an official doc)

    The hook mentioned above allows me to put in two objects  - u_menu and u_objs - which will be ingested by the page builder.  If I can get it to work, I will post here.

  • Unless I missed something, you are now talking about standard HTML/Java-script issues.

    This is not specific to the SimpleLink which simply hosts the pages for your browser to get and display.

    Please refer to html, js tutorials for that.

    If you are referring to the RESTful API (or other feature supported by the SimpleLink device), then I'm not sure what is the question. Please clarify.

    Info on supported API can be found in the chapter 9 of the Programmers Guide (https://www.ti.com/lit/ug/swru455l/swru455l.pdf). 

    Br,

    Kobi

  • One more comment,

    In the SDK's LocalOTA and OutOfBox example, under the uniflash/ folder, you can find a full uniflash project that includes the HTML/JS files.

    You can find there the scrips.js, that you can download and update. Together with the example html pages, this should give you all the references needed.

    Br,

    Kobi 

  • I have read Chapter 9 of swru455l carefully times and it does not provide the necessary hints as to how to add entries in to the provisioning page.

    In particular, the provisioning page hard coded in the device contains some 'hooks' to allow the developer to add menu items - but I can find no document describing this extremely useful facility.

    Basically by adding a file user.js in the user www file space this is picked up allowing one to add items such the elements ringed in the picture below

    So I have started to get it to work, but I would prefer to do this knowing that 'user.js' facilities are documented somewhere by TI, and will continue to be supported.

    Surely there must be some documentation covering this?

    (I still have a way to go to add functionality to the UI elements I have added, but it is a start!).

  • You are asking about HTML content which will not be documented by the programmers guide as it is not handled by the NWP.

    The NWP only handles the resources (including special handlers for reserved resources, i.e. the RESTful API) and the internal "tokens" (within the pages). Those are explained in the programmers guide.

    The HTML format (such as menus/forms structure) is standard. 

    As I mentioned, the OOB and LocalOTA example contains set of html/js (including provisioning) that you can use as reference.

    The ROM JS handlers were not meant to be reused by customized pages.

    Please refer to the "scripts.js" instead.

    Br,

    Kobi

  • Understood - if a little disappointing.  Somebody has created a very clever and useful 'hook' there, its a shame it's not supposed to be used.

    I will - as you suggest - adapt the example scripts.

    I greatly appreciate your responses, even if the outcome wasn't what I'd hoped!  Thankyou