Open EMUNES opened 1 year ago
Hi @EMUNES !
I have an idea why that could be happening.
I believe it might be due to an upstream limitation in rupnp
that does not allow us to specify a TTL in the broadcast message. The TTL in this case specifies the number of "device hops" to search for. So in a multi-router/hub network, some devices will not be show.
I have filled a PR to sddp-client
to implement this feature, which was recently accepted, but we are still waiting for a similar PR to be accepted in rupnp
.
I think it is possible to implement a temporary fix in crab-dlna if I use sddp-client directly and reimplement the discover function. I will try to work on that in the following days.
Meanwhile @EMUNES , could you confirm if your devices are really in a multi-hop-router environment?
Thanks for your detailed reply about what's happening. Sorry that I'm not certain about multi-hop-router as I'm not using mesh network under that environment.
Hi @EMUNES.
I've implemented the workaround that I mentioned and released a new version (v0.2.1) to include the fix.
If the problem in your environment was this, it will probably work.
But I'm afraid the problem might be another thing: broadcast in multiple network interfaces.
Anyhow, would you mind testing it for us?
I have tested again with v0.2.1 but it's unable to find dlna device on my mobile, while I can use Kodi on my PC to find the upnp device (my mobile). Maybe there is other issues.
@EMUNES could you test something for us?
Are you using Linux? If you are, try installing gupnp-tools
, and then run this command to see if it is showing the devices:
gssdp-discover -t AVTransport
Execuse me that I'm not using linux for now. But if it helps, I'm sure that I can find those upnp devices in the local network using the upnp_client
crate.
I have a laptop with Kodi, and a mobile phone with BubbleUPnP, both support DLNA and can find each other inside the local network. And then I run crab_dlna example code as below in the laptop which hosts Kodi:
However, the results show none of them. Any idea for this problem? Thanks.