Archived

This topic is now archived and is closed to further replies.

mr sharpoblunto

UTorrent mobile client

Recommended Posts

mr sharpoblunto

Sorry, I have been busy too.

Here's the modified utf8 handling code:

public static String UTF8Decode(String in) {        StringBuffer buff = new StringBuffer();        char c;        for (int i = 0; i < in.length(); i++) {            if (in.charAt(i) < 192) {                buff.append(in.charAt(i));            } else {                c = 0;                if ((byte)in.charAt(i) < 224) {                    c |= (((byte)in.charAt(i) & 0x1f) << 6);                    i++;                    c |= (((byte)in.charAt(i) & 0x3f) << 0);                } else if (in.charAt(i) < 240) {                    c |= (((byte)in.charAt(i) & 0x0f) << 12);                    i++;                    c |= (((byte)in.charAt(i) & 0x3f) << 6);                    i++;                    c |= (((byte)in.charAt(i) & 0x3f) << 0);                } else if (in.charAt(i) < 248) {                    c |= (((byte)in.charAt(i) & 0x07) << 18);                    i++;                    c |= (((byte)in.charAt(i) & 0x3f) << 12);                    i++;                    c |= (((byte)in.charAt(i) & 0x3f) << 6);                    i++;                    c |= (((byte)in.charAt(i) & 0x3f) << 0);//                } else if (in.charAt(i) < 252) {       // just won't mess with that                 } else  {                    c = '?';                }                buff.append((char)c);            }        }        return buff.toString();    }

Note that it doesn't need int offset, int length parameters.

This one works for me, russian letters displayed fine.

BTW Thanks for the update. I tried to implement the features I requested, with partial success, but here they are from the official source! :)

edit: P.S. Yeah, I did set up Eclipse.

Share this post


Link to post
Share on other sites

when i try to install it by nokia pc sutie(7.0 ver), after translate the programme to the mobile, the mobile display can not install, then it closed the installation. there no other information

Share this post


Link to post
Share on other sites

need some help

i use UT 1.8.2 , WebUI v0.361 , nokia 6120C

i give the client the ip i get from ipconfig

iputmq2.jpg

i tried both of them and still i get "response code 502"

Share this post


Link to post
Share on other sites

if you're behind a router you'll need to use your routers public ip address (not it's LAN ip address) then set up a port forwarding rule on your router to forward requests on the webui port to your utorrent machine. There's lots of guides on these forums on how to set up port forwarding for the webui.

Share this post


Link to post
Share on other sites

I'm getting a 'Server not found' error and some Error Code 502.

I use DynDNS for a static hostname.. (is that a problem? The initial settings did say 'Server IP)

I'm pretty sure I can access the hostname (a webserver is hosted at port 80 and I can open that using Phone's browser / Opera Mini)

I can also open the webUI directly using http://<my-hostname>:<port>/gui/ .. But I obviously can't use it correctly because of the weak javascript support and obviously the VERY low resolution of my phone.

My phone is a Sony Ericsson W660i if that matters.. (I'm currently using a custom php script which I made using the uTorrent PHP API.. but a J2ME app will be better)

Share this post


Link to post
Share on other sites

Hi

Great work with the app.

I'm having trouble launching it.

I'm using uTorrent v1.8.1 (b12639) with webUI v0.361 and can connect to it from anywhere via http://ip:port/gui (even from my opera mini on the mobile), so it works fine. But while trying to connect from uTorrent mobile i'm getting this error msg:

'Make sure the IP and port settings are corrent...' (yes there's a typo in this msg)

Details: java.lang.IllegalArgumentException: HTTP Propoerty contains an unacceptable character

to specify... server ip is just the ip in format x.x.x.x (where the x's are in numeric format). my server port is xxxxx (also in numeric format), and i've tripple checked the user/pass... oh and one more thing... i'm using nokia 6300 (with the latest FW update).

anyone has any ideas what's wrong, and how can I make it work ?

___

Szafran

Share this post


Link to post
Share on other sites
Could you try entering the following url into the browser on your phone http://<ipAddress>:<port>/gui/?list=1 and send me the output from that. The particular error you're seeing is one I haven't seen before, but if the output from this url is weird it may shed some light on things.

@sharpoblunto:

Sorry for the late reply. It seems to list all my torrents' information in a comma separated continuous list. I'm still getting the error in utorrent mobile though.

Share this post


Link to post
Share on other sites

Hi

I'd tried on my mobile. Seems the UTF-8 had encode twice.

Here's my solution.

    public Vector checkTorrents() throws ServerNotFoundException, UnauthorizedException {        try        {            if (_cacheId.equals("")) {                String response =  getServerResponse("?list=1");                response = new String(response.getBytes("UTF-8"),"ISO8859_1");                parseFullResponse(response);            }            else {                String response =  getServerResponse("?list=1&cid="+_cacheId);                response = new String(response.getBytes("UTF-8"),"ISO8859_1");                parseDiffResponse(response);            }        }        catch(UnsupportedEncodingException ue)        {            ue.printStackTrace();        }        return getTorrents();    }

:-D

Share this post


Link to post
Share on other sites

This app is a real bless, thanks a lot for that!

One small request.. Could you add a possibility to change the tracker's url? Thanks in advance!

Share this post


Link to post
Share on other sites

hey, i have a SonyEricsson W850 (JP-7, midp 2.0, cldc 1.1). it connects successfully and then when im supposed to see the torrent list, i see nothing but the list is there (i see a scrollbar and can 'select' an element and see the details screen of it) i just dont see the main list elements. any ideas ?

Share this post


Link to post
Share on other sites

hey,

I'm having problem in putting the server ip and port in the setting of the utorrent mobile. I use Nokia 6300 and I use a connection from the grameenphone co. of Bangladesh. Their gprs ip is 10.128.1.2 and port 8080; but that doesn't work for me.

How can i resolve this?

Share this post


Link to post
Share on other sites

hey sharpoblunto... it's been a while but I'm persistent. I'm having two problems now.

1) I still cannot connect to my utorrent via the mobile client (annoying)

2) I cannot download the latest version of the mobile client. It detects the jar, detects all the title, author and version number and it seems to start installing the app on my BB Pearl. It gets to the end of the progress bar (looks like 100%) then it thinks for a bit and pops up this error:

907 Invalid Jar

illegal host string: starts with '/'

Now regarding my frist problem -- not being able to connect...

@atomicrabbit

Could you try entering the following url into the browser on your phone http://<ipAddress>:<port>/gui/?list=1 and send me the output from that. The particular error you're seeing is one I haven't seen before, but if the output from this url is weird it may shed some light on things.

I responded to your message but you never followed up. Enter that URL gives me a list of the items I have in uTorrent... like this:

{"build":11813,"label": [

]

,"torrents": [

["A53B9E9A273461DFF8A7E8C4FECF4A13F47FB694",136,"torrent name 1",xxxxxxxx,xxxx,xxxxxxxx,xxxxxx,xx,0,0,0,"",0,0,0,0,65536,-1,0],

["62CD4A787224F94F5AC53D957DF4CCDA077888B8",201,"torrent name 2",xxxxxxxxxx,xxx,xxxxxxxxxx,xxxxxxxxx,xxx,0,12,-1,"",1,4,0,0,64946,1,888586240],

["5A7E77CF2A5F88533D2DC02A5A8BCFB02DA58E9B",136,"torrent name 3",xxxxxxxxx,xxxx,xxxxxxxxx,xxxxxxxx,xx,0,0,0,"",0,0,0,0,65536,-1,0]]

,"torrentc": "1783487479"}

I x'ed out those number bc I have no idea if they are important or not.

Btw, I'm using uTorrent v1.8 Build 11813 with the latest webui and I'm using mobile client v1.4 because I cannot download the latest version (1.51) because of the error I explained above.

please help!

Also, for the record, the error I receive in mobile client is:

Server not found

Make sure the IP and port settings are corrent

Details:

java.io.EOFException null

Note: Yes, it says corrent with a 'n'.

I can access webui no problem from anywhere.

Share this post


Link to post
Share on other sites

@atomicRabbit

I finally got around to upgrading utorrent to 1.8.2 and webUI 0.361 on my server (I had been running 1.6.something with the 0.310 webUI for a couple of years now). and I can confirm that utorrentMobile 1.51 works fine for me.

So I've fixed the spelling mistake you reported and put up a new version 1.52, try downloading that and see if it works. I confirmed that it downloaded and installed okay for me, but I don't have a Blackberry so I can't be sure if it will work out for you (though I may be getting one in the not too distant future...)

The error message your getting on install seems pretty weird, there doesn't seem to be much google wisdom out there for it, perhaps someone with a bit more blackberry knowledge can shed some light on this?

As for the other message with utorrent mobile 1.4 java.io.EOFException null. I really can't tell you why thats happening, it seems that your webUI is responding with data that should work. Perhaps theres some sort of network infrastructure issues at play somewhere... firewalls, proxies interfering etc...

I guess you could ty running a packet sniffer like wireshark on your webUI machine and try using the mobile client and see if the http request actually arrives on the server or not. If you're technical enough to do that then that could be a useful next step.

Share this post


Link to post
Share on other sites

two things:

1) I just tried installing v1.52 and i got the same error as above. (907 invalid jar)

2) I have logging for webui enabled and when I try to connect using mobile client, nothing gets logged. So I don't know. I've never used wireshark before, but i'll give it a try.

any other ideas in the meantime?

Share this post


Link to post
Share on other sites

You could try downloading the utorrent mobile zip file instead of downloading it directly from the site. (The download link on the utorrent mobile page), in the zip you'll find utorrent.jad and utorrent.jar (You'll need both files). I'm not sure of the process for installing from local files on your device, but on my phone I need to copy those files onto my phone, then go to applications then select utorrent.jad to install.

Share this post


Link to post
Share on other sites

As far as I know I cannot install jar files locally on a blackberry. The alternative is making .cod/.alx files, which are file formats of applications that are use specifically for blackberry's in the Blackberry Desktop Manager. I don't know if there's an easy way to convert jar/jad to cod/alx, but maybe you can look into it (i'll do the same).

Share this post


Link to post
Share on other sites

Excellent application, just what I needed for my BlackBerry 8900, but unluckily it doesn't work in my setup. I use it inside my home network (192.168.x.y so not port forwarding needed), WebGui is accessible from other PC in the same network, but the mobile client error says:

Server not found. Make sure the correct IP and port settings are correct.

Details: Java.io.IOExecption: Tunnel failed

Other web apps run ok on the same setup (ie TVersity), so I don't think this is network related. Any clue to help debug what's happening?

Thx, Wolf.

PD: @atomicrabbit: you can run jad/jar on your BB, just copy the files to the internal memory or media card (ie w Roxio Media Mgr) and then "execute" them using the Explore function of the media icon. It behaves like your installing the application OTA.

Share this post


Link to post
Share on other sites

@Wolfgan: I just tried installing the jad/jar locally and got the same error ??? wtf

@mr. sharpoblunto: do you have a copy of the jad file from v1.4 ? I was reading up about the 907 error and it said there could be missing information or incorrect parameters in the JAD file. When I was replacing the old jad file with the new one i downloaded and noticed it was larger than the new one. Before I realized I had already replaced the jad file.

Share this post


Link to post
Share on other sites

First of all thanks for such an application...

I use uTorrent extensively and this app is very helpful for me!!!

There are a couple of suggestions I would like to make.

1. Showing up the torrent download and upload speeds in the torrent list itself.

2. Be able to categorize torrents by active, inactive or downloading. This makes browsing them easier!!

I am not comparing this to any software, but theres one app which downloads stuff to your phone using torrents. It uses a very well created UI. I dont want to offend you bro but just a consideration.

The application is called SymTorrent. It is for symbian phones only. Jus have a look at it and u ll know what I mean..

Ayush

Share this post


Link to post
Share on other sites