Comments (4)
Yes. 1900 is the standard port for uPnP UDP messages.
http://www.upnp-hacks.org/upnp.html
Do you have something else listening on that port? What library are you using?
The UDP socket that listens during discovery should close after listening for the configured number of seconds.
Let me know if that helps.
from simple_upnp.
I'm using this library: https://github.com/ballantyne/wemo
But, even if I just use simple_upnp I have the same issue.
I've used lsof -i | grep 1900
and the Network Utility for mac and nothing seems bound to port 1900. Let me know if you need me to dump any output.
from simple_upnp.
I know this issue is fairly old but I stumbled upon it while looking for some information for my own UPnP library.
I just wanted to let you know that in my experience, it is not necessary to bind to port 1900 if all you are doing is sending an M-SEARCH request and receiving responses. The only time you need to bind to port 1900 is when you are listening for M-SEARCH requests or NOTIFY messages because, for example, when you bind to something like 0.0.0.0:1900 and subscribe to multicast 239.255.255.250, you will get all messages that were addressed to 239.255.255.250:1900. Essentially the router uses the local port as the port to route messages to when using multicast.
This is not necessary when making a search request because you are only looking for search responses and all devices are required to respond to M-SEARCH requests via unicast which means it responds to the sender's socket address meaning you can use any port. In my own library I just bind to port 0 which tells the OS to give me it's next available port.
As for the issue that @bhardin was having, making the library bind to port 0 should fix your problem, but if you ever wanted to listen for M-SEARCH requests or NOTIFY messages, I know at least on Windows there are socket options like SO_EXCLUSIVEADDRUSE which prevent binding to a certain port, even if SO_REUSEADDR is used which it looks like this library is using. In that case all you can do is track down the application that is doing that and terminating it.
from simple_upnp.
Thanks for the info @GGist.
@bhardin I just pushed out 1.0.0 which should fix the issue.
from simple_upnp.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple_upnp.