Open JasonMahdjoub opened 6 years ago
Dlna use SSDP to discovery service. And Cling need to listen on 1900.
https://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol SSDP is a text-based protocol based on HTTPU. It uses UDP as the underlying transport protocol. Services are announced by the hosting system with multicast addressing to a specifically designated IP multicast address at UDP port number 1900.
So I have overrited functions of class DefaultUpnpServiceConfiguration, in order to open another port than 1900. Than my tests for discovering local routers work.
@JazZ51,
The port you overrided in DefaultUpnpServiceConfiguration is used for http server, not for ssdp.
public StreamServer createStreamServer(NetworkAddressFactory networkAddressFactory) {
return new StreamServerImpl(
new StreamServerConfigurationImpl(
networkAddressFactory.getStreamListenPort()
)
);
}
Thank you. I am not expert with Cling, but the port I overrided enabled me to make UPNP IGD working into macOS. Ohterwise, macOS refuse binding port 1900 that one service of cling try to open. And then, Cling seems not being able to continue to open UPNP IGD service.
Hi,
I use Cling in order to detect the local router of the lan, and to tell it to open a port with the current computer. I have made some tests, and they work under Linux and under Windows. However, I can't do these tests under MacOS. Here the log of Cling :
It appears that the port 1900 is officially used by "Back to my mac" on mac OS. But if I make a netstat ou a lsof, no port is opened.
I have also tried to open the upnp service as next, with another port, but a got the same log telling me that the port 1900 is already in use :
upnpService = new UpnpServiceImpl(new DefaultUpnpServiceConfiguration(1902));
Is there some who can help in this situation ?
Thanks in advance, Jason.