Minibox - HTTP file server on the spark core

Well, here it is, the world’s smallest dropbox clone!!!



Yes, sure, you can question the actual usefulness of a wireless file server that has just 1MB storage - but not the coolness factor!

The code uses libraries for the spark that I have built or ported:

  • my library flashee - this provides byte-eraseable storage in external flash. I just recently added file system storage also based on the fatfs library.
  • webduino (repo) a simple webserver, I’ve ported this to the spark, which I’ll publish soon as a standalone library.

Minibox actually works! You can upload (text) files, view file contents, create directories and navigate the directory hierarchy, via HTTP GET, PUT and DELETE!

The code and firmware binaries are here, along with some documentation on how to use it…

Finally, please keep in mind I hacked this together in an afternoon, so don’t go using it as the sole storage for all your critical documents just yet!


Very cool @mdma! How fast can you upload files? Would this be faster than writing to an SD card?

Very awesome @mdma!, thanks for sharing.

1 Like

I had a thought earlier about a more fully-featured HTTP server on the Spark Core. Mostly how handy it could be with something like your Flexible sensors, actuators and controllers application post. Maybe include some sort of server-side templating/parsing so that you could include variables/function outputs/etc as some sort of variable in your HTML template. Parsing templates might be a pretty rough on a Core, though!


No it’s not quicker than writing to an SD Card (and it’s a fraction of the storage size of your typical multi-gigabyte SD card.) The flashee manpage lists performance measurements of the different flash storage schemes.

The actual performance is much less than the Flash write performance. For one thing, the TCP overhead slows things down a lot. The WebServer library reads the request body one character at a time… sloooowly! I’ve filed an issue about this, I’ll have a look at fixing this during the week.

1 Like

It’s a nice idea, but too much to squeeze into the current core. Even with this basic app there’s barely any flash or ram left. Future cores with more resources, then maybe!

The flexible sensors framework uses a hex-encoded binary protocol for code space efficiency, which can be sent over serial or TCP, and there’s a python service layer to provide a high-level interaction and management of the objects. This service is quite substantial, and wouldn’t fit in the spark, and fortunately there’s not much need for it either. The python service will sit in the cloud, as a broker to talk to the sparks, similar to how spark’s own cloud software acts as a broker to sparks today.

1 Like

That is awesome! Nice work! :slight_smile:

I looked on your github page but I can’t find this project’s github page. Can you please dm me the source code or better yet put it back up?

I’m not sure what’s happened to the sources. I’ve since switched machines so don’t have it locally. I’ll try to find them on my old machine when I can. Most of the work is done by the flashee library, which provides the FAT filesystem on top of the external flash, and the webserver library.

I looked on your github page but I couldn’t find it.