Kodi Community Forum

Full Version: Kodi 15 seems to have problem with UPnP connection to router
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

i have compiled Kodi 15 for my RaspBerry Pi 2 B with a Debian 8.0 Jessie image from http://sjoerd.luon.net/posts/2015/02/deb...e-on-rpi2/ . After some struggling i got it working with some restrictions. Playback of local media is now working nicely, thus i know that the codecs are set up properly, WLAN speed in internal network seems to be also ok (as compared to before i had installed the non-free firmware of my RTL8188CUS WLAN adapter realtek-firmware in "jessie non-free contrib" apt sources). SAMBA and CUPs are working nicely (apart from the fact that the Windows Explorer in Win 7/8 does not display the network devices always). But as soon as Add-ons access any internet resources things tend to slow down or mess up completely to be non-working. There seems to be an issue with buffering but i suspect more an issue with my ADSL routers way of forwarding UPnP requests. I observed my routers port forwarding table and it shows the two entries i have placed manually for ssh and CUPS web configuration for my RaspBerry Pi 2 B. There are some other entries as well that came automatically apparently from the UPnP serving capabilities of the router. My windows machines all have some UPnP forwarding negotiated with the router be it Skype or Tor.., but there is not a single automatic UPnP port forward for any Linux machine that is in the WLAN. Maybe one has to adjust some authority settings or configuration settings of UPnP server on the RaspBerry pi 2 in order to share its server properties with the server that is running on the ADSL router?

However this needs to be investigated as it is a problem that could be responsible for many performance issues concerning Kodi. Also i saw some other unresolved threads that were discussing about the same problem. (almost completely unusable internet streaming).
(2015-06-18, 21:52)Thomas Korimort Wrote: [ -> ]Hi,

i have compiled Kodi 15 for my RaspBerry Pi 2 B with a Debian 8.0 Jessie image from http://sjoerd.luon.net/posts/2015/02/deb...e-on-rpi2/ . After some struggling i got it working with some restrictions. Playback of local media is now working nicely, thus i know that the codecs are set up properly, WLAN speed in internal network seems to be also ok (as compared to before i had installed the non-free firmware of my RTL8188CUS WLAN adapter realtek-firmware in "jessie non-free contrib" apt sources). SAMBA and CUPs are working nicely (apart from the fact that the Windows Explorer in Win 7/8 does not display the network devices always). But as soon as Add-ons access any internet resources things tend to slow down or mess up completely to be non-working. There seems to be an issue with buffering but i suspect more an issue with my ADSL routers way of forwarding UPnP requests. I observed my routers port forwarding table and it shows the two entries i have placed manually for ssh and CUPS web configuration for my RaspBerry Pi 2 B. There are some other entries as well that came automatically apparently from the UPnP serving capabilities of the router. My windows machines all have some UPnP forwarding negotiated with the router be it Skype or Tor.., but there is not a single automatic UPnP port forward for any Linux machine that is in the WLAN. Maybe one has to adjust some authority settings or configuration settings of UPnP server on the RaspBerry pi 2 in order to share its server properties with the server that is running on the ADSL router?

However this needs to be investigated as it is a problem that could be responsible for many performance issues concerning Kodi. Also i saw some other unresolved threads that were discussing about the same problem. (almost completely unusable internet streaming).
Why don't you try a wired network connection to see if wifi is really the problem.

EDIT you also need to provide a debug log (wiki).

What upnp material are you actually accessing on the internet?
internal WLAN is working perfectly since i installed the proper firmware-driver. One of my kodi.log you can find at https://www.dropbox.com/s/adffyrt9b8laydr/kodi.log?dl=0. I think the problem is that my ADSL router runs itself an UPnP gateway service that is not properly recognised by the Linux installtion on my RaspBerry Pi 2. Maybe the Linux installation is thinking that it is the only inserver instance that is controlling UPnP services in the local network or something like this. Because i saw that Windows machines seem to request UPnP port forwarding rules from the router by themselves, whereas none of my Linux machines does that although the are also running UPnP protocol based services.

The Add-ons i tried to use in Kodi was Sundance TV (which seemed to buffer a movie), Netzkino.de (which also seemed to buffer a movie, but never made it up to display any picture), dokumonster.de (actually after some minutes of buffering suddenly one documentary that i chose started to play smoothley). Radio services and Music Add-Ons seem to work (maybe because of smaller streaming bandwidth used or other streaming protocol than video files).

Thus i suspect either issues with buffering or issues with the UPnP protocol configuration on my RaspBerry Pi 2. My Windows desktop can use Kodi perfectly without any buffering issues.

Other Android devices i tried to use with Kodi, but the Kodi App did not provide any Add-ons thus it was impossible to check for straming capabilities.
Sorry no one is really interested in dropbox logs. Please use pastebin, xbmclogs or a similar service.
ok. Here is the link of my kodi.log file on pastebin from one run of kodi that involved trying to load a video.

http://pastebin.com/6WgkaA9h
I am not sure what your upnp router service has to do with anything. upnp has a lot of parts, one of them is to allow automatic opening of incoming ports on a router,but that has nothing to do with your issue.

I can't see what the issue is in that log, how about running something like the youtube addon and see how that goes.
Another suggestion - actually try osmc or openelec and see if the addon works on those, this will eliminate (or confirm) errors in your compile. A spare sd card will get you up and running.
Dear nickr!

I have taken some time yesterday to test basic functionality of my self-compiled Kodi. Basically i found that it is working. Configuration is working. Remote Controling via my Android Tablet is working. Playback of local videos, mp3s and pictures is also working. Thus i suspect that the compilation process succeeded not only but produced some working software.

As it came to testing the Add-Ons i was also wiping through the YouTube Add-On. however i noticed that difficulty seems not only to be located in playback but also in configuration of some of the add-ons. If those Add-Ons have to connect to the internet, connection seems to be stalling. This makes me suspect that there is some disturbance in the protocols used for communication to the internet by Kodi. Buffering issues could also be involved.

As for your suggestion to try an alternative SD card image on an extra SD card, i consider this to be a good idea. Investing another 10 EURO for a 8 GB card is affordable for my hobby of exploring Linux and RaspBerrry Pi 2 B and Kodi issues. And installing such image will maybe be not so much time consuming. I don't need to configure CUPS or any other thing apart from Kodi and maybe WLAN adapter and USB hd in order to get hooked up to my WLAN again. Or what do you think about the additional configuration efforts?

As for the log file. As far as i have seen, the log-file is approximately the size of 120 KB, which is already quite a lot of stuff to scan for keywords (if one would know what keywords to look for).
Dear nickr!

i have tried what you suggested. I bought a small 8 GB SD card for 10 EURO and copied OSMC onto it. I am now arrived at the screen for configuring wireless. The WLAN stick seems to be recognised. It also finds the network, configuration of WPA was however only possible after multiple tries with the very uncomfortable to use configuration dialogue. Kodi itself could display files from the local USB hd, but internet access is restricted. I clicked actualise button for add-ons and some download seems to have happened. Kodi cannot download any video add-ons. It seems to be not able to download anything, however internet connection was displayed to be working, although i suspected that DHCP was not even inquired correctly. When i chose DHCP configuration at first, the dialogue reported that it was not able to connect although i gave correct WPA-PSK key, but then after some playing with the dialog it displayed that there is connection. In how far this can be believed i don't know. If i trust the message of OSMC, then i must conclude, that the Kodi streaming problem is really a network configuration issue. I suspect that not even the DHCP recognition worked properly. Until i did not give any subnetmask and gateway specification, the connection attempt did not succeed at all. Providing such an image restricted to such small configuration options is not nice. I have set on my router to forward static address to the MAC addres of the WLAN adapter of my RPi2, maybe that was misleading the configuration of WLAN somehow. Furthermore, as i wanted to go back out of Kodi to readjust the WLAN settings and to check for the connection it did not work. Before exiting it stuck and no option remained than cold restart.


My conclusion about this experience is that OSMC is not usable. It is not flexible enough to cope with very standard use cases in configuration of the only hardware that should be working fine - the WLAN adapter to connect to the internet. Therefore, it cannot be said that it fulfills its purpose as a specialized distribution for Kodi. As it looks to me now it has no purpose of existence, that would not immediatley be crushed by the experiences i made with it. However, my loss of time and resources is within bounds. The additional SD card i bought in order to respect your suggestion may be of use some day.

It is a pity that i did not get more information out of this. But experiencing this quality standards, i expect also that my Debian Jessie configuration might be reconsidered and i uspect that it is really an issue with network and UPnP configuration. I looked little bit in internet and it seems that my router plays the role of an residential gateway, which has to be requested for UPnP connection forwards. As i did not see any UPnP forwards to my Linux machines i suspect that the routers UPnP functions is not properly recognised by the
RaspBerry Pi 2
You should be able to confirm your connection between the Pi and the router from the other end.

Logging into the router via a web browser should show you somewhere in its dashboard a list of connected devices - check if the Pi is on there or not when it is up and running and (maybe) connected. And if it is, then try to log into it via a web browser and see if you can pull up the web interface (check that it's enabled first at the Pi end).

Those two will conclusively prove if the router and Pi are talking to one another or not.
@DarrenHill: As you might have read in the thread, i have an 128 GB SD card Debain 8.0 Jessie image with working SAMBA, CUPs and Kodi, that has problems streaming video from the internet (actually i managed to stream MP3s as far as i remember). According to the suggestion of nickr i bought a small SD card and installed OSMC just to check whether OSMC has same stremaing problems. For my Debian 8.0 Jessie image i have used the Webinterface f my router many times for different configuration issues, but for OMSC it is completely ridiculous to invest any energy and effort. It does not provide any functionality it seems. And at the very least it seems that it cannot even supply internet at all. I will follow your advice and check once more my OSMC internet connection...
ok. i checked and osmc is listed correctly in the routers network connection table. It is declared as online. However, the download of Add-ons is not working. It starts to download and does not succeed, much less streaming any video (not possible without any add-ons). Thus there seems to be an issue with the connection to my router from Linux systems. Maybe they don't properly register UPnP port forwardings.

It seems as if there is no webserver installed on osmc.
actually osmc says there is no wired connection, but WLAN is working, since the computer is registered in the router as connected to the network.
Can you connect to the Pi under OSMC from one of your other machines on your network, via a web browser?

Being in the router table just means it's been assigned an IP address, it may not mean that it is connected (if the credentials supplied are incorrect for example). It just means that the Pi has attempted to log into the router and its network, it doesn't necessarily mean that it has been accepted into the network and logged into the router. The external connection from another machine on the network will confirm that. If another machine on the network cannot connect, then the Pi-Router connection is not correctly enabled and your debug log may well contain more information about why.
I conclude: There is problem in communication of Linux on RPi2 with a UPnP residential gateway implemented by my router. All my Windows machines know how to talk to the router concerning UPnP, but my Linux machines don't. I think that is simply a problem of configuration of the UPnP sevices under Linux. Maybe one needs to telll about the residential gateway.
Pages: 1 2