Is it possible to design a circuit that have an LCD, a USB port and a LAN port and be able to get torrent files from a flash drive and download them to the flash drive?
I saw a direct URL file downloader circuit using PIC before but I can find it.
Do you know something like that for torrents?


  • 4
    \$\begingroup\$ Yes, its possible, you even mentioned you've seen something like it before. This is quite a generic question. \$\endgroup\$ – Kris Bahnsen Apr 10 '12 at 23:36
  • \$\begingroup\$ @KrisBahnsen: The thing I saw was a direct link downloader. but the torrent protocol is more complex. after that do you know a designed one? \$\endgroup\$ – RYN Apr 10 '12 at 23:43
  • \$\begingroup\$ do you plan to make a stealth torrent downloader? like a usb-key with an ethernet plug on the other end -- put the .torrent files on there, and stick it into a network connected to the internet somewhere well hidden -- then wait for it to download and grab it later? nice idea :P \$\endgroup\$ – Stefan Paul Noack Apr 11 '12 at 13:07
  • \$\begingroup\$ This is a bit of a necrobump, but I liked the idea of this project so much that I'm in the process of attempting it. Once it's complete, I'll drop a link :) \$\endgroup\$ – Polynomial May 12 '12 at 13:49

You could accomplish most/all of this using an Arduino with an ethernet shield, or the special Arduino Ethernet board. The newer ethernet shields even come with a micro-SD card slot. The BitTorrent protocol should be simple enough to run on a small device, though I'd probably invest in one of the more powerful boards (e.g. Mega2560) to be safe. You can read from and write to FAT16 and FAT32 filesystems on standard SD and SDHC cards using the SD library. They've even been nice enough to provide libraries for Hitachi HD44780 compatible screens and another for KS0108 compatible screens to take care of the display part. There's also a great SHA1 library for Arduino, which will be necessary for computing info-hashes and verifying data parts.

Your part of the project would involve implementing the bencode routines for tracker communication and communications protocols for client-to-client transfers, then tying it all together.

| improve this answer | |
  • 1
    \$\begingroup\$ I very much doubt you'll be able to get this running on an AVR. The protocol may be simple, but the number of connections and state you need to track makes torrenting both CPU and memory demanding application. \$\endgroup\$ – avakar Apr 11 '12 at 9:11
  • \$\begingroup\$ I'd imagine that a single torrent could be downloaded slowly at least. You'd have to use a very small number of peers, probably 5 at most, but I think it could work. The BitTorrent protocol isn't actually reqiured to be intensive, as long as you're willing to put up with poor download performance. \$\endgroup\$ – Polynomial Apr 11 '12 at 11:06
  • \$\begingroup\$ If memory ends up being an issue, there's nothing to stop you hooking up an external RAM device to store some of the program state. It complicates things, and you may even have to hack together something with a shift register to reduce pin usage, but it would help solve the issue. \$\endgroup\$ – Polynomial Apr 11 '12 at 11:13
  • \$\begingroup\$ Oh, and it turns out there are I2C SRAM chips out there, which make external RAM a whole lot easier: arduino_related.livejournal.com/1414.html \$\endgroup\$ – Polynomial Apr 11 '12 at 13:28
  • \$\begingroup\$ Just as an update: I took this as a challenge and built one on an Arduino Mega. The Ethernet shield handles most of the network state for you, and I used external SRAM ICs for storing the torrent state. I used a Netduino as a crypto coprocessor so that I could compute the SHA1 block hashes asynchronously. The major limitation was seed count because you simply run out of processing power and memory to keep track of all the partial blocks. \$\endgroup\$ – Polynomial Nov 27 '16 at 13:21

Almost anything that can run Linux can do this. The Raspberry Pi board is one of the new trendy ones.

There are lots more, but this question/answer would quickly degenerate into a shopping project. Google is your friend here.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.