I've seen wifi routers host html webpages over ethernet cables. This eliminates the need for a PC app/software and the device can be configured using a PC web browser. I want to do something similar, but NOT using ethernet. I'm using Nuvoton NANO120LE3BN which has USB device. Is it possible to host a html webpage when the M0-cortex is connected to a PC/MAC as a USB device. Does Keil have a stack for doing this? If we do this do we need a driver on the PC ( Windoews 7/8 or MAC OSX)?
Your web browser cares about retrieving web pages from a networked server - you enter a host name when you specify the URL in the browser. If the web browser instead gets a file name, then it can show a HTML page from a disk, but a disk file is static - you need to interface with a web server to get dynamic content. In the end, the concept of the World Wide Web is all about networking.
It's possible to have a USB-connected device show up as a networked device, since it's possible to have USB-connected network cards, WiFi routers etc. But it isn't simple. It's easier to have your device show up as a HID or serial port and to ship a Windows application that hosts a local web server and retrieves the page content from the USB-connected device.
not necessarily...
If you point your browser at an HTML file on your disk, then edit the file with a separate application, save it, then "refresh" the page in the browser - you will see the changed content!
You can code the HTML to have the browser automatically refresh: www.htmlcodetutorial.com/.../index_tagsupp_4.html
There may be some issues with OS caching and file locking, though...
It's all a question of the definition of static/dynamic.
Constant reload of a file is regularly used to pick up the latest log lines from a running program, or to re-display the contents of a state file.
But it doesn't send information to the server, so the file doesn't get updated with dynamic content based on the client (unless that state file shows number of bytes sent out by the file server). So the file content retrieved isn't really dynamically produced based on user actions.
The closest you could get would be to have the web browser retrieve sequences of different file names, and have the file server understand the names served and take the file names as commands to regenerate files based on the sequence of files retrieved. But it would suffer quite a long list of severe disadvantages.
In the end, dynamic information - instead of just page reloads - makes use of two-way interaction.
View all questions in Keil forum