Skip to content
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

When specifying the SSDP Search port as 1900, some devices do not respond #40

Open
RuralTree opened this issue Jan 17, 2024 · 0 comments

Comments

@RuralTree
Copy link

/**
 * Open MulticastSocket and bind to Ssdp port.
 *
 * @param options
 */
private void openAndBindSocket(SsdpClientOptions options) {
    try {

//There is no need to set a UDP send port here, as some devices do not respond to the SSDP query protocol after 1900. If other ports are set, also check if the ports are available. Here, the system can randomly specify a port
this.clientSocket = new MulticastSocket(options.getBindingPort());

this.clientSocket.setReuseAddress(true);
interfaces = Utils.getMulticastInterfaces();
joinGroupOnAllInterfaces(SsdpParams.getSsdpMulticastAddress(), options.getIgnoreInterfaceDiscoveryErrors());
} catch (IOException e) {
callback.onFailed(e);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant