accessing website on mbed filesystem causes "automatic playback"

21 Feb 2011

hi i got a strange problem... i setup a webserver with mounted local filesystem and a htm page on it. when i access the website windows pops up the "automatic playback" screen. everytime i reload the page this popup comes again as if i unplugged and replugged the mbed... any known problem with that?

21 Feb 2011

Hi uC,

Took me a while to work out was going on here :) I think it is the following:

  • You request a webpage
  • The program on your mbed opens the requested file, and hence the mbed USB disk is "removed" from the PC
  • The page is served
  • Once the file is served, the file is closed on the mbed, hence the mbed USB disk re-enabled
  • Windows sees the new disk, and trying to be helpful, pops up a "what do you want to do" screen (automatic playback)
  • Rinse, repeat

So, if I remember correctly, the pop-up has an option "do nothing", and also a checkbox saying "always do this action" (or alike). So if you check the box and click do nothing, it should never bother you again!

Simon

22 Feb 2011

yeah, thats exactly my problem :)

but i think this is just a workaround to tell the popup to never show up... the disconnect and reconnect will keep going. did you found no solution for that? maybe i should check the code of the httpserver library...

22 Feb 2011

Hi uC,

This is expected behaviour, and basically down to the fact you have two masters trying to use the filesystem, so it has to switch between them. There are probably two good options:

  1. At the start of your program, open a file and never close it; the mbed will hang on to the USB disk for the entire lifetime of your program, not just whilst it reads a file to serve. This will stop it reconnecting, and hence your popup. This will mean you'll have to hold down reset to see the USB disk appear on the PC, to be able to delete/write a new .bin file.
  2. Graduate to using a filesystem on an SD card or USB stick on your design. The LocalFileSystem is great for trying things out, but does have limitations like this and speed, so you may want to consider adding storage to your project; see the Cookbook.

Hope that helps,

Simon

23 Feb 2011

thanks for your explanation, sounds good to me :) i will just ignore that popup now because my mbed would not be constantly connected to the pc ;) thx