I am basically trying to make a custom web interface remote for my Roku using an ESP8266. I am able to send commands like button presses to the TV (at 192.168.0.15:8060) with the ESP8266, but for ease of use, I would like to have SSDP discover the TV rather than having to type the IP address of the TV manually. I was doing some testing yesterday and got the TV to respond to an M-SEARCH request, only when sent by my desktop using packet sender. I verified this using Wireshark, and it was certainly going through and getting a 200 response from the TV. Making that exact same request (verified that its body was the same byte for byte with Wireshark) with the ESP8266 did not get a response from the TV. This was the original problem I wanted to address in this post.
In making this post, I was trying to recreate what was happening yesterday. Now for some reason today, with the exact same request from packet sender on the exact same network and exact same TV Wireshark isn't even picking the request up on the network. It still does pick up the ESP8266's requests, but those still get no response whatsoever from the TV. Trying to send the request with ncat doesn't work either and is not picked up by Wireshark. I have followed this page exactly as described with no luck. I have even tried using this python module (which worked last night just fine) to no avail today. Everything is certainly on the same network, I triple-checked. I have no idea what the issue could be. Does SSDP stop after so many requests to it?
For reference, 192.168.0.1 is my router, 192.168.0.3 is my desktop, 192.168.0.14 is the ESP8266, and 192.168.0.15 is the TV.
After looking at router configuration I could not find anything of value. If I try to send a request from the ESP8266 to my desktop, it shows up on Wireshark. If I try sending a request from the ESP8266 to my phone, it doesn't show up on Wireshark. This, and the fact that the ESP8266 says the requests goes through fine each time led me to believe I am using Wireshark incorrectly. I thought it was scanning all traffic on my network, but it was only scanning traffic on my wifi adapter connected to my computer. Doing some further ESP8266 coding I revealed that the TV was sending a packet back to the ESP8266 with the expected information.
Is the TV off when you're trying this? I can't remember exactly how it works, but unless you have "Fast start" enabled it may shut down completely after some time and not respond. Try unplugging the power or restarting from Settings->System->Power->System restart to see if it starts responding.
Can you ping the TV?
Have you tried something like curl http://192.168.0.15:8060 to see if you get a response?
I know the telnet debugging port will stop accepting connections if it doesn't get a clean close, but I haven't done much with port 8060.
The TV was never off while testing this, but I do have fast-start turned off. I also just performed a system restart.
Pinging the TV and using curl to query data or send commands works just fine, but it's the SSDP that I am having issues with. After leaving it alone since I made my initial post it is now working again with my desktop, but not with the ESP8266. Wireshark won't even show the ESP8266's requests. Somewhere along the line between ESP, router, and desktop, the packet is getting lost or something. It is mostly confusing how the system changes behaviors seemingly arbitrarily, working one day and not the next for the same code. Any additional help would be appreciated and I'll be glad to provide additional info to assist.
Thanks.
I don't really have any ideas. My experience with the ESP8266 is limited to say the least. You clearly have something screwy going on with your network. Can you get any kind of consistency? Like if you reboot router, desktop, and ESP it works for a while and then stops until you reboot everything again?
Yeah, it is a strange stack for sure so I don't blame you. I will try messing with some settings on the router and see if that could be the culprit. I haven't touched the router since the start of this, I shut off my computer nightly, and the ESP8266 restarts every time I plug it in or flash new code to it. I think my best course would be to do some router testing. I will reply if I figure anything out.
After looking at router configuration I could not find anything of value. If I try to send a request from the ESP8266 to my desktop, it shows up on Wireshark. If I try sending a request from the ESP8266 to my phone, it doesn't show up on Wireshark. This, and the fact that the ESP8266 says the requests goes through fine each time led me to believe I am using Wireshark incorrectly. I thought it was scanning all traffic on my network, but it was only scanning traffic on my wifi adapter connected to my computer. Doing some further ESP8266 coding I revealed that the TV was sending a packet back to the ESP8266 with the expected information.
here is a ESP32 based implementation of the same idea:
https://github.com/elshnkhll/RokuRC/tree/main/ESP_RokuRC_Proxy