-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TTL of SSDP search does not conform to the UPnP specification, causing some devices not being listed as renderers #70
Comments
+1 |
hi @gabrielmagno any chance you could submit a pull request or just drop some details into a reply here? I'd like to get this fixed as well and if I can do it without re-inventing the wheel that would be nice! |
gabrielmagno
pushed a commit
to gabrielmagno/Connect-SDK-Android-Core
that referenced
this issue
Jul 12, 2016
Hi @ghenry22 . I've just submitted a pull request that seems to fix this issue. I've tested it back them when I reported the issue, and it solve the problem for me. |
ghenry22
added a commit
to ghenry22/Connect-SDK-Android-Core
that referenced
this issue
Jul 14, 2016
phablulo
pushed a commit
to phablulo/Connect-SDK-Android-Core
that referenced
this issue
Aug 23, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DLNA renderers in a multi-router environment are not found
Steps to Reproduce
I have an LG TV (with builtin DLNA) and a Raspberry Pi running Raspbmc (with UPnP controller/renderer enabled). Both are connected in a wireless bridge router, which is connected into my main router. My android device, from where I run Connect-SDK, is connected into the main router. With this setup, Connect-SDK does not list them as renderers. If I connect them directly into the main router, Connect-SDK will show them.
I looked into the code, and it seems that the library does not set the proper value of TTL when searching for devices. According to the UPnP Specification:
Possible Fix
By inspecting the packet of SSDP M-SEARCH with Wireshark, it is indeed set as TTL=1, while it should be set as TTL=4.
In Java, it's possible to do that by calling setTimeToLive in the socket object. This method is available only to Multicast sockets.
I looked into Connect-SDK's code, and noticed that a Datagram socket is used to send the SSDP search. It should actually be of the Multicast type, so that we could call
socket.setTimeToLive(4)
before binding it.I tried to fix it myself, and now both my TV and Kodi are listed as renderers. I could issue a pull request with my simple fix, but was not sure if the way I did was the best way, so I decided to report my findings with all the details, so that you could handle it properly.
The text was updated successfully, but these errors were encountered: