oatpp / example-iot-hue-ssdp

Oat++ Example to emulate a Hue bridge using SSDP and HTTP
https://oatpp.io/
Apache License 2.0
17 stars 2 forks source link

SSDP connection can't get triggered. #3

Open tisrico opened 2 years ago

tisrico commented 2 years ago

The select function in provider::ResourceHandle SimpleUdpStreamProvider::get() always get fd ready, but when it's being processed, peek call always return 0 meaning nothing is there for reading.

Through netstat -na command I can confirm that it's listening to the 1900 ports, but when I use Wireshark to confirm the incoming SSDP discovery, it actually never get fired in the program.

Can you please help?

bamkrs commented 2 years ago

Hey There!

We need a couple more info for this problem. Which Version are you using? Which OS?

Best regards Benedikt

tisrico commented 2 years ago

Hi @bamkrs,

Sorry, I should have included the information.

I used master/latest source code including the three dependencies. I tried both on Windows 10/VS2015, and Ubuntu 21/gcc9. On windows, I have disabled all the firewall rules to allow incoming traffic. On Unbutu, tcpdum clearly showed the incoming SSDP UDP messages - I reckon there is no firewall rule would stop the packets. In a debug today on Windows, I found that select call returned correctly but never get triggered.

I am planning to build a small project and would like it eventually run on a raspberry pi that pretends to be a light, so it takes commands from Google Nest hub, but in fact, controlling a garage door opener.

ddRenrek commented 2 years ago

Hi together,

are there any news to this topic? I have got the same issue as @tisrico on Windows 10/VS2019 with oatpp 1.3.0. I use oatpp ssdp modul in an own application. When updating from 1.2.0 to 1.3.0 this error occurs.

I have already implemented the changes mentioned in issue https://github.com/oatpp/oatpp-ssdp/pull/4.

Kind regards!