Harold Hallikainen wrote: > I'm wondering about combining the USB mass storage class and the HTTP > server in the Microchip TCP/IP stack. When someone plugs in a host > computer, the MSD appears on their machine. Click on index.html, and > you're at the user interface. Or, it could even include an autostart > file to start the browser. You could, of course, look at files and > MAYBE even do GET cgi or MAYBE even POST. > > Possible? Bad idea? Probably a bad idea. First of all, when you click on "index.html" in the file selector, the browser is accessing it using "file:" protocol, not "http:". I have in fact done an index on an archival CDROM in exactly this way, but it's 100% static pages accessed entirely with "file:" protocol. Such pages CAN include browser-side Javascript (or even Java code) to make them more interactive, but there's still no "server-side" processing going on. The big problem with creating a server of some sort on the USB device is that if the host operating system is treating the device as a MSD, then it really, really does not expect the file structure or the contents of the files to change by themselves -- this would screw up all of the internal caching that it tries to do in order to optimize performance. If you really need a server running on the USB device, then make it look like a USB-to-Ethernet adapter, rather than a mass-storage device. Most operating systems have support for that built-in. -- Dave Tweed -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist