discover not working
Closed this issue · 4 comments
Thank you for your great project. I had most of it workning on my wemos.cc when I enter my sonos IP manually, but discoverSonos() didn't work. It kept saying "Sending M-SEARCH multicast" over and over again. I tried a php program from https://github.com/DjMomo/sonos/blob/master/sonos.class.php doing basically the same and it worked fine. Any ideas what can be wrong?
Hello Bo,
This is definitely worth investigating.
I see two reasons this might happen:
- I made the incorrect assumption that UDP has to bind on port 1901 (
esp8266-sonos-rfid/esp8266-sonos-rfid.ino
Line 51 in 24a1590
- These packets do not travel across subnets, so could it be that the esp8266 is on a different subnet within your network by explicitly splitting e.g. wired vs. wireless?
Can you provide a Wireshark UPnP discovery response when using the PHP script? This could at least rule out 1.
Kind regards,
Cedric
Thank you for your quick reply!
Both devices are wireless on the same subnet, I don't think that is the issue. I see that the PHP script uses
HOST: {$ip}:reservedSSDPport
rather than
HOST: 239.255.255.250:1900
I will do some experiments and let you know.
/Bo
29 mars 2016 kl. 10:00 skrev Cedric Van Goethem notifications@github.com:
Hello Bo,
This is definitely worth investigating.
I see two reasons this might happen:• I made the incorrect assumption that UDP has to bind on port 1901 (
) but Sonos does not reply to the src udp as well in all cases.esp8266-sonos-rfid/esp8266-sonos-rfid.ino
Line 51 in 24a1590
• These packets do not travel across subnets, so could it be that the esp8266 is on a different subnet within your network by explicitly splitting e.g. wired vs. wireless?
Can you provide a Wireshark UPnP discovery response when using the PHP script? This could at least rule out 1.Kind regards,
Cedric—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
Update: I have it working now, and it was my mistake. I wasn't using the rfid stuff and deleted those lines but accidentaly also deleted the Udp.begin(1901) line. put it back and started experimenting, and found out that the portnumber for Udp.begin() seems to be irrelevant. I tried port 1900 and even Udp.begin(1) and they all worked. I guess Udp.begin(1900); would be the least confusing to use. Sorry for bothering you with this and again thank you very much for the discovery code.
/Bo
29 mars 2016 kl. 10:00 skrev Cedric Van Goethem notifications@github.com:
Hello Bo,
This is definitely worth investigating.
I see two reasons this might happen:I made the incorrect assumption that UDP has to bind on port 1901 (
esp8266-sonos-rfid/esp8266-sonos-rfid.ino
Line 51 in 24a1590
) but Sonos does not reply to the src udp as well in all cases.esp8266-sonos-rfid/esp8266-sonos-rfid.ino
Line 51 in 24a1590
These packets do not travel across subnets, so could it be that the esp8266 is on a different subnet within your network by explicitly splitting e.g. wired vs. wireless?
Can you provide a Wireshark UPnP discovery response when using the PHP script? This could at least rule out 1.Kind regards,
Cedric—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #1 (comment)
Hello Bo,
Glad you figured it out!
If there are any other issues, feel free to open a new ticket.
Kind regards
Cedric