On Mon, 3 Dec 2007, Brad Schick wrote: > Looking for some input on the following problem that I realized isn't > really usb specific: > > My goal is to display an html page that resides on a usb mass-storage > device and changes over time. The mass-storage device will be > read-only from the host OS, but needs to self modify its own data. The > end-user will view an html page that periodically refreshes itself and > hopefully changes over time. My concern is how caching in the host OS > may hide these changes.
Sounds more like you're concerned about preventing caching in the host from hiding the changes. > The usb device's MCU is very small and doesn't have space for a FAT > driver. To modify its data I was planning to just poke changes > directly to hard-coded offsets (the files can be pre-allocated since > data is not created, just modified). Perhaps I could also poke the FAT > file date, but would that be enough to cause Linux to reload the file? No. > Or will the kernel assume all changes to local file-systems must pass > through the kernel and miss even that? It will. So will Windows or any other OS. > Maybe there is a better approach? One big limitation is that nothing > can be installed on the host. And I'll have to figure out Windows > eventually as well. If you want to use the mass-storage protocols then you're stuck. The only choice is to make the peripheral read-only and to go through a disconnect/reconnect cycle whenever the data changes. Or else you could have a program on the host that flushes the cached pages. A less clumsy approach might be to avoid being a mass-storage device. But I don't know what other protocol would be more suitable. Does PTP support dynamic updating? Alan Stern ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users