Jump to content

UTorrent mobile client


mr sharpoblunto

Recommended Posts

Late reply (been busy this week)

I occasionally get the error as well, but I've always put it down to mobile connectivity problems, however I never get it consistently.

So you can connect to the webui on your mobile and not with the client (ones not using wifi while the other is using mobile internet to connect?)

Each connection by the client is a completely independent operation, so there's no way it can get into a 'bad state' and stop working. What I might do is put together a build which has a 'View detail' option on the error screen which could show a stacktrace or something, just to try and help diagnose whats going wrong.

Link to comment
Share on other sites

  • Replies 262
  • Created
  • Last Reply

Top Posters In This Topic

After looking through the web-based GUI's that might work with Opera Mobile, I stumbled upon this little gem...

This works perfectly on my Nokia 6265i. Couldn't ask for more. Thank you!! =)

EDIT:

Okay *slight* bug. Nothing major. But when I delete a torrent, it stays in the list. Refreshing doesn't help. I have to exit the app, and reload. Not too big of a deal, and it's probably just my stupid phone. Also if it sits there awhile, it gets disconnected but doesn't seem to know it, so no action actually takes place. My phone does that with many applications though, and only a few manage to keep the connection alive.

But again, this is awesome, and I'm quite happy with it, regardless of the little bug I found. =)

Link to comment
Share on other sites

  • 2 weeks later...

This works very nice!! Here's a screenshot from my Nokia N73:

scruu9.jpg

If you're still taking requests: is it possible to make the selected text line scroll from right to left if there's more characters to display?

Anyway, thanks for your brilliant and hard work!!

Link to comment
Share on other sites

@sndr

Unfortunately the truncation of torrents that you're seeing on your phone seems to vary from device to device. My phone wraps the torrent names over multiple lines, and I suspect that other devices handle long text in a number of different ways. There's nothing I know of in j2me that defines or allows me to control this sort of behavior in the standard list control, so there's not too much I can do I'm afraid :)

Link to comment
Share on other sites

  • 2 weeks later...

Well I've been looking into the issue of periodic connection failures that I experience along with AtomicRabbit and some others. It appears that the problem is caused by authentication failure as http 401's are being returned.

This is weird because the authentication process works some times and not others. (first a bit of background, utorrent webUI uses http basic authentication which works by attaching an Authorization header to the http request which contains your username/password base64 encoded) I ran a packet sniffer on my utorrent server and found the following, when running the app using the software phone emulator the Authorization header came through and the app authenticated ok. However when I loaded the app on my phone there was no Authorization header present on the request, even though I attached one as the request went out.

I've concluded that somewhere along the way the authorization headers are being stripped from the utorrent request. This doesn't happen all the time for me (though it is at the moment) and by some of the responses I've seen in this thread, some people are unaffected, so it seems like it might be part of the cellular network infrastructure which is causing this stripping of the auth header. It may have something to do with the fact that unsigned j2me apps (such as utorrent mobile) have a user agent header of "Untrusted/1.0", I'm wondering if somewhere along the way untrusted apps have the auth headers stripped off (though the weird thing is is that its intermittent).

I'm gong to have another look at it tonight and release a new version that details the errors of any failed connections, but I'm not sure if this issue is something that I can fix.

UPDATE

Okay, released a new version (see first post for download link), its functionally the same as 1.3.1, but includes some more details when errors occur. Try it out and if you have any problems let me know :)

Link to comment
Share on other sites

recent user of utorrent mobile, first of all thnx 4 the innovator....but guess what, error displayed?? "Make sure that the IP and port settings are correct" Details: javax.microedition.io.ConnectionNotFoundException:

mr. moderator, kindly guide me thru this, i have Sony Ericsson K550i and dynamic IP address, there is no username and password required for the internet connection....the only thing displayed in settings in mobile is port no. and client IP address (when connected), rest everything is blank. Connection is Mobile Office

Link to comment
Share on other sites

Okay, Is your dynamic IP accessible via the internet, i.e have you set up port forwarding on your router (assuming you have one) to map incoming connections for the routers IP to the machine which has UTorrent webUI running.

Second thing, are you sure you set up webUI not to use a password, its probably not a good idea to have it accessible to the internet without a username/password.

A good test to see if webUI is working properly is to try to access it from a computer outside your local network, i.e a PC at work/university/school etc. and see if you can access it there. If you can't access the webUI from an external PC, the uTorrent mobile client wont be able to access it either

let me know how you get on :-)

Link to comment
Share on other sites

  • 3 weeks later...

Hello, everyone!

First of all, thank you, mr sharpoblunto, for your work on this nice tool, it's really unreplaceable for me.

There was a report a while ago about cyrillic letters not displaying correctly. I was totally new to J2ME development, but I did some research on that problem. The thing is J2ME does not support UTF-8, so we have to convert uTorrent's output to UTF-16.

Here's what I've found: http://www.j2meforums.com/wiki/index.php/UTF-8_Encoder/Decoder

I managed to compile your sources (separate thanks for sharing) with a little change in getString function in JSONArray.java, tested this and it worked.

Hope you'll add this fix in the next version.

Link to comment
Share on other sites

Thanks rocketsvm, that sounds great! It would be quickest for me to implement these changes if you could post up your changes to getString(), to save me having to write and test the same thing.

--Edit--

Okay, new version out. added support for cyrillic text in torrents, also added a partial workaround for people who frequently experience 401's when trying to access uTorrent via the mobile client when using the correct username/password. The other part of the workaround involves installing a helper windows service on the webUI host machine (I'm almost finished with this, theres just a few kinks to iron out before releasing it)

For those who are interested in the technical details of the workaround, read on, otherwise go to the first post to get the new version!

As I've mentioned previously, for some people (me included) the http Authorization headers seem to be being stripped from uTorrentMobile requests before they get to the webUI, resulting in 401's all the time. To work around this the 1.4 version of uTorrentMobile also includes a new http header X-j2me-auth, which contains the same information as the Authorization header. Now this is a custom header which gets ignored be the normal webUI, so if uTorrentMobile works for you now, 1.4 will continue to work fine. However if you have the 401 issue, I've been working on a proxy application which sits in front of the uTorrent WebUI and if it sees a X-j2me-auth header on a request and no Authorization header, it turns the X-j2me-auth header into an Authorization header, then passes it off to the webUI. This works perfectly as the custom header never gets stripped, so once the request arrives, we can see if the Auth header got stripped, and if it did, just add it straight back so that the webUI is none the wiser!

This proxy application has been written in .NET and runs as a windows service so you wont even notice its running. I'm not going to release it yet, as theres a few rough edges to tidy up, however it mostly works (in fact I'm using it right now as I get the 401 issue all the time now), but if you really want it now, let me know. I'll post instructions on how to set it up etc. when I release it.

Link to comment
Share on other sites

Thanks for the update, mr sharpoblunto, I'll test is ASAP.

Also I have an idea about wrapping long lines of text in the list. By default JVM in my Motorola A1200 acts the same way as in your device - wraps long lines in List. And the same way it is in emulator I use.

But I tried to do

_torrentList.setFitPolicy(2);

right after creating _torrentList. This command makes at least emulator cut long lines just like in the screenshot sndr posted. Now I'm going to try it in a real device and see what happens.

Info from the Java SDK for the reference:

TEXT_WRAP_DEFAULT 0

TEXT_WRAP_OFF 2

TEXT_WRAP_ON 1

Edit:

Ok, I tried setFitPolicy on my A1200, and it kind of works: no more wrapped lines, but a horizontal scrollbar, so I can see the whole line when I scroll. I guess that it should work in both ways, i.e. if you setFitPolicy(1), it will force wrapping on devices without it by default.

May be you could do this as an option, because I personally find fixed-height items more comfortable.

Also, there was a report about empty password not working. May be this is the reason:

if (UserData.getInstance().getUserName().equals("")            || UserData.getInstance().getPassword().equals("")            || UserData.getInstance().getServerAddress().equals("")) {            initialScreen = ViewFactory.createSettingsView(this);        }

Well, setting no password for webui is not a good idea anyway...

And back to the wish list:

1) An option for not doing the update of the list, when we go back from the torrent details view? It produces lags on my connection, and selection is always reset to the first item.

2) Display ETA in torrent list. May be only for torrents with "Downloading" status.

Link to comment
Share on other sites

@rocketsvm Send me a PM if you want access to the subversion source repository for uTorrentMobile, if you've got a working dev environment set up then the changes you've requested should be pretty easy to implement. I don't have a lot of time at the moment to work on uTorrentMobile, but I try to fit it in around everything else :)

"Also, there was a report about empty password not working. May be this is the reason:"

Yeah that's definitely the reason, I never thought that people would run the webUI without a password :) that check could probably just be changed to look if the server field is empty, but allow a blank username/password.

Link to comment
Share on other sites

mr sharpoblunto, check your e-mail. I sent it through a form on this site.

edit:

@mr sharpoblunto

I received no response from you yet, so I'll just post here.

1) Cyrillic letters are still not displayed in 1.4. I forgot that I changed UTF8Decode function before I successfully tested it. I'll post my version later.

2) I used Java ME Platform SDK 3 to perform experiments on your code, but I'll try to set up Eclipse dev environment today so we could work in the same software for better synchronization.

Link to comment
Share on other sites

  • 2 weeks later...

Hey sharpoblunto

Thanks for adding the detailed errors in the new version.

I installed it and I still cannot connect. Here is the error:

Server not found

Make sure the IP and port settings are correct

Details:

Java.io.EOFException null

Btw. I'm using a dynamic DNS address and yes, it is the right IP and utorrent is running

Link to comment
Share on other sites

Okay, released version 1.5, this version includes settings for turning torrent list refreshing off and for toggling text wrapping, it also now shows the ETA of torrents being downloaded.

@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.

Link to comment
Share on other sites

Thanks for the new version mr sharpoblunto!

The text wrapping looks like this on my N73. It's very nice to see a bit more of the filename :) and I can always read the complete title in the details screen. There is one thing I noticed: if I set "Update torrent list" to Off the Refresh option in the Options menu doesn't work. If I set "Update torrent list" back to Auto, the Refresh option works.

Link to comment
Share on other sites

Hi!

First of all, thanks for this! it's a nice app. But i have a little problem.

It's work just fine on my nokia E65, but when my ip changes i have to enter the new ip adress again. the bigest problem is that, when i'm on the way i have no idea what my home ip adress is? Any help? Any video on Youtube would be great. :)

Link to comment
Share on other sites

Archived

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


×
×
  • Create New...