Friday, September 10, 2010

use Transmission in Android

Recently, I am checking how to use BitTorrent function in Android. There are lots of BitTorrent tools in Internet. Based on my common user experiences, I was using BitComet in Windows machine, Transmission in Ubuntu laptop, Vuze in Mac mini, and rTorrent in Debian server. I also found there are some BitTorrent remote management applications in Android market, but it's for controlling remote torrents, not directly download files via BT.

After making a survey of these BitTorrent tools, I choose Transmission, since I think porting it in Android is with less effort and more simple. I didn't build related GTK or QT code for Transmission. I'd like to use it without its own GUI. It has 'transmission-daemon' and 'transmission-remote' command line tools. I can use both of them to use Transmission without a GUI. Furthermore, it comes with a WEB UI. It means I can control BitTorrent from a browser. Therefore, I don't need to write Java UI application for it.

# export TRANSMISSION_WEB_HOME=/etc/web/transmission
# transmission-daemon -f -g /sdcard/transmission -w /sdcard/transmission --incomplete-dir /sdcard/transmission
[11:48:07.715] Transmission 2.04 (11151) started (external/transmission/libtransmission/session.c:622)
[11:48:07.727] RPC Server Adding address to whitelist: (external/transmission/libtransmission/rpc-server.c:767)
[11:48:07.727] RPC Server Serving RPC and Web requests on port 9091 (external/transmission/libtransmission/rpc-server.c:940)
[11:48:07.727] RPC Server Whitelist enabled (external/transmission/libtransmission/rpc-server.c:944)
[11:48:07.728] DHT Generating new id (external/transmission/libtransmission/tr-dht.c:378)
[11:48:07.728] Using settings from "/sdcard/transmission" (external/transmission/daemon/daemon.c:443)
[11:48:07.728] disable save setting here! (external/transmission/daemon/daemon.c:444)
[11:48:07.728] Loaded 2 torrents (external/transmission/libtransmission/session.c:1743)
[11:48:07.728] Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (external/transmission/libtransmission/natpmp.c:67)
[11:48:07.729] Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (external/transmission/libtransmission/natpmp.c:67)

I verified it in Android emulator (froyo), coz it can use local machine network. I run Transmission-daemon from the terminal. Then, I open Android Web browser and type this URL http://localhost:9091. It would go to Transmission Web UI. I can control torrent from it. Like add a BT torrent, delete torrent, pause it, check current status. The Web UI looks nice and easy to use.

How about make it more straight? I would like to search BitTorrent from application UI, not from Web browser. Then I can save some time on typing. I find a very comprehensive BitTorrent tool Transdroid in Android market . It can control remote BitTorrent and it supports Transmission too. I use it to connect my local one. It has a search function and you can also set the BitTorrent searching engine from the menu. It makes thing easier, search something, pick up a torrent, download it, and see it. There is a help guide in their web site.

These screenshots are copied from my office machine. The network environment here is bad. I cannot see good downloading speed. But I verified few torrents at my home machine, the downloading speed was over 500 KB. Also, the download speed depends on the content you are downloading too. If you search some very hot or popular things, the download speed would be very high!

I created a project android-transmission in gitoriou. If you have interests, you could use my works there.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.