android-xbmcremote icon indicating copy to clipboard operation
android-xbmcremote copied to clipboard

Cannot connect to device with no internet connection

Open rossxwest opened this issue 14 years ago • 8 comments

If you have your XBMC box and Android device connected to a WIFI that is not connected to the internet, your android device will not connect to the XBMC box correctly. You can only use the remote, you cannot browse your media collection nor does it show the links for them.

rossxwest avatar Oct 25 '11 17:10 rossxwest

So, as soon as you reconnect your wifi, the library starts working again?

Sent via Hubroid

freezy avatar Oct 26 '11 05:10 freezy

Yes, I am thinking there is a call to a remote server that is required to load the menu? Possibly to grab the images or some additional information. I have not looked at the code, but I may have time to do so later.

rossxwest avatar Oct 26 '11 13:10 rossxwest

could you post android log (adb logcat) from when you have the issue? pastebin, preferably

Mikkle avatar Oct 26 '11 15:10 Mikkle

I can do this after I get home from work today.

rossxwest avatar Oct 26 '11 15:10 rossxwest

SO I don't have much time right now to figure out how to export logcat app I installed or to install the SDK on this PC but the line I see failing is:

I/org.xbmc.android.remote.business.InfoManager(1217): *** getSystemInfo: 158332ms

So whatever that is trying to get outside of the LAN is failing. I don't think this should be a prereq to show the library since it can still connect to the XBMC server running on the PC over LAN.

rossxwest avatar Oct 26 '11 23:10 rossxwest

ok, thanks, will investigate.

Mikkle avatar Oct 27 '11 05:10 Mikkle

Right. Reproduced.

The app does NOT try to access any resources outside your LAN. Android does, though. The problem actually lies within Android's (JAVA's actually) implementation of URL.openConnection(). This method will try to resolve the host part of the given URL through a DNS server, and it is that operation that times out on you. Not visible in the android log, unfortunately. I tested this by disabling my internet connection. No problem - all stil ok. Then I also disabled my internal DNS server, and sure enough, the problem appeared then.

A bit more on this rather annoying situation here: http://goo.gl/vNIx6 in the section "A More Serious Issue"

We will, of course, have to find a workaround for this, but I don't think we can do that short-term, since we may well have to implement a custom http client as suggested in the article mentioned above.

Oh, and yes, the remote will still work as a remote, as it is based on the xbmc event client, which runs on UDP.

Mikkle avatar Oct 27 '11 07:10 Mikkle

Hmmm, that's a rather annoying issue. Does the HttpClient implementation have the same issue?

rossxwest avatar Oct 27 '11 13:10 rossxwest