maximkulkin / esp32-homekit-camera

Firmware for esp32-camera module to act as Apple Homekit IP camera
MIT License
399 stars 78 forks source link

setup endpoint response should refer to self, not controller #6

Closed HomeACcessoryKid closed 5 years ago

HomeACcessoryKid commented 5 years ago

in my opinion on reading the apple specs, the response of setup endpoints need to refer to the camera, not the controller. This means that e.g. this line in app_main near line 268 is wrong and all that stems from it

    tlv_add_tlv_value(response, 3, controller_address);
maximkulkin commented 5 years ago

Somewhat it does, although controller should already know IP address of camera - it's IP address of accessory. Since video streaming is a PUSH, not PULL (camera need to send RTP packets to controller, not the controller establishing connection to camera), I guess, controller doesn't really check/care where packets come from, given they use proper encryption key.Specs sometimes are vague or even wrong. I based this mainly on observing how other implementations do that.