zigg/journal

Saturday, August 8, 2009

mustafa downloads to PC at 70 KiB/s

Okay, so 70 KiB/s that's not as good as your broadband. Heck, it's not even as good as my broadband, and I'm a cheapskate.

But I'm pretty thrilled with it. My early TFTP proof-of-concept code was only able to manage a bit over 40 KiB/s—though you'll fall back to near that (maybe slightly faster? I have tuned a number of key things) if your client makes a request without requesting a larger block size. Use one that can ask for a larger blksize, though, and mustafa will shave it down to its largest supported size and the transfer will use that, improving substantially on the speed.

Apart from speed, my current build of mustafa accepts a filename which it passes to libfat and will transmit that file—or, using the newly-supported tsize and toffset options, any part of that file—to any TFTP client. I also built a little fuzzing tool that will send packets full of garbage to test its resiliency; on a 16 MiB payload, it slowed the whole transfer down by only about 30 seconds (the entire transfer took a hair over 4 minutes otherwise). Write support is only literally another screenful of code away, since I worked out most of the groundwork over this weekend in-between viewings of the featurettes on The Lord of the Rings extended edition DVDs.

I think it's still a way off from being able to share it, though. Right now, I think the core TFTP support is stable and probably even good, but the mustafa and "device" layers atop it (the fat device handles libfat; card will eventually handle save chip requests and the like) feel a bit early and messy. I imagine I will be going in and reworking some of those. The good news is that they're a lot smaller than the TFTP core.

But yeah, I feel like I'm in the home stretch now. Very happy to be where I am with this project.

Labels: , , ,

posted by zigg 10:37 PM

0 Comments:

Further comments are disabled indefinitely. Here's why.