Gateway - Fire Tablet connects but closes connection
-
My Setup:
- Gateway 0.4 on Windows 10 64bit
- Fire Tablet HD 10 (7. Generation)
- Camera in Doorbell Manufacturer Alphatech Model IP BOLD
- Stream H264, no Audio, Resolution is 640x480
- No Authentication for the stream
- DNS Rebind configured
- Stream is Working in VLC
I tried several combinations in tagging:
@tunnel, @proxy, @proxy-tcp combined with @fakefmtp, @fixaudio, @ntpnow, @noaudioBut in all cases Fire Tablet connects to stream but closes connection.
Following log is captured with @tunnel tag:
------------------------------------------------- MONOCLE RUNTIME ENVIRONMENT ------------------------------------------------- VERSION = 0.0.4 OS/ARCH = win32\x64 PROCESS = monocle-gateway (PID=13860) TIMESTAMP = 2019-11-15T01:05:52.004Z ------------------------------------------------- MONOCLE GATEWAY SERVICE (Version: 0.0.4) ------------------------------------------------- [Monocle Starting] [Monocle Connecting] [Monocle Started] [RTSP Server Starting] [RTSP Server Listening] 0.0.0.0:8555 (RTSP) [RTSP Server Listening] 0.0.0.0:443 (RTSP-TLS) [RTSP Proxy Started] (PID=8292) [RTSP Server Listening] 0.0.0.0:8554 (PROXY) [RTSP Server Started] [Monocle Connected] [RTSP Server Registered] ------------------------------------------------- MONOCLE RTSP SERVICE - INITIALIZED ------------------------------------------------- FQDN = c115d191-af5f-4ea9-9409-2253ab93f409.mproxy.io HOST = 192.168.0.26 PORT = 443 ------------------------------------------------- ------------------------------------------------- INITIALIZE RTSP STREAM: Haustür ------------------------------------------------- - NAME : Haustür - LABEL : PRIMARY - URL : rtsp://192.168.0.210:554/video.264 - UUID : STREAM:bb696c1b-9ace-4726-b53e-bf4580252acd - SESS : 491a7f28-0f4b-484c-abce-1951c7f48dcd - MODIF : Fri Nov 15 2019 02:05:47 GMT+0100 (Mitteleuropäische Zeit) - TAGS : @tunnel ------------------------------------------------- 2019-11-15T01:05:59.301Z [INFO] [192.168.0.69:38047 <SkkZ5Osjr>] RTSP CLIENT SOCKET CONNECTED 2019-11-15T01:05:59.426Z [INFO] [192.168.0.69:38047 <SkkZ5Osjr>] RTSP CLIENT ATTACHED TO STREAM: Haustür (STREAM:bb696c1b-9ace-4726-b53e-bf4580252acd) 2019-11-15T01:05:59.535Z [INFO] [192.168.0.69:38047 <SkkZ5Osjr>] RTSP ENDPOINT SOCKET CONNECTED {192.168.0.210:554} 2019-11-15T01:05:59.535Z [DEBUG] [192.168.0.69:38047 <SkkZ5Osjr>] [CLIENT REQUEST] --> [DESCRIBE] rtsp://c115d191-af5f-4ea9-9409-2253ab93f409.mproxy.io:443/STREAM:bb696c1b-9ace-4726-b53e-bf4580252acd?session=491a7f28-0f4b-484c-abce-1951c7f48dcd 2019-11-15T01:05:59.535Z [TRACE] [192.168.0.69:38047 <SkkZ5Osjr>] [CLIENT REQUEST] --> [HEADERS] { "accept": "application/sdp", "user-agent": "Fire OS/5.3.6.8 stagefright/1.2 (Linux;Android 5.1.1)", "cseq": "1" } 2019-11-15T01:05:59.535Z [DEBUG] [192.168.0.69:38047 <SkkZ5Osjr>] [ENDPOINT REQUEST] --> [DESCRIBE] rtsp://192.168.0.210:554/video.264 2019-11-15T01:05:59.535Z [TRACE] [192.168.0.69:38047 <SkkZ5Osjr>] [ENDPOINT REQUEST] --> [HEADERS] { "accept": "application/sdp", "user-agent": "Fire OS/5.3.6.8 stagefright/1.2 (Linux;Android 5.1.1)", "cseq": "1" } 2019-11-15T01:05:59.551Z [DEBUG] [192.168.0.69:38047 <SkkZ5Osjr>] [ENDPOINT RESPONSE] <-- [200 (OK)] <cseq=1> (session=undefined) 2019-11-15T01:05:59.551Z [TRACE] [192.168.0.69:38047 <SkkZ5Osjr>] [ENDPOINT RESPONSE] <-- [HEADERS] { "cseq": "1", "user-agent": "VoIP Guard", "content-type": "application/sdp", "content-length": "206" } 2019-11-15T01:05:59.551Z [TRACE] [192.168.0.69:38047 <SkkZ5Osjr>] [ENDPOINT RESPONSE] <-- [BODY] v=0 o=- 123456 654321 IN IP4 192.168.0.210 s=SDP data c=IN IP4 192.168.0.210 t=0 0 a=range:npt=0- m=video 0 RTP/AVP 102 a=rtpmap:102 H264/90000 a=control:rtsp://192.168.0.210/video.264 a=sendonly 2019-11-15T01:05:59.551Z [INFO] [192.168.0.69:38047 <SkkZ5Osjr>] RTSP ENDPOINT AUTHENTICATION SUCCESSFUL: NONE 2019-11-15T01:05:59.551Z [DEBUG] [192.168.0.69:38047 <SkkZ5Osjr>] [CLIENT RESPONSE] <-- [200 (OK)] <cseq=1> (session=undefined) 2019-11-15T01:05:59.551Z [TRACE] [192.168.0.69:38047 <SkkZ5Osjr>] [CLIENT RESPONSE] <-- [HEADERS] { "cseq": "1", "user-agent": "VoIP Guard", "content-type": "application/sdp", "content-length": "206" } 2019-11-15T01:05:59.551Z [TRACE] [192.168.0.69:38047 <SkkZ5Osjr>] [CLIENT RESPONSE] <-- [BODY] v=0 o=- 123456 654321 IN IP4 192.168.0.210 s=SDP data c=IN IP4 192.168.0.210 t=0 0 a=range:npt=0- m=video 0 RTP/AVP 102 a=rtpmap:102 H264/90000 a=control:rtsp://192.168.0.210/video.264 a=sendonly 2019-11-15T01:05:59.598Z [INFO] [192.168.0.69:38047 <SkkZ5Osjr>] RTSP CLIENT SOCKET CLOSED 2019-11-15T01:05:59.598Z [INFO] [192.168.0.69:38047 <SkkZ5Osjr>] RTSP CLIENT DETACHED FROM STREAM: Haustür (STREAM:bb696c1b-9ace-4726-b53e-bf4580252acd) 2019-11-15T01:05:59.598Z [INFO] [192.168.0.69:38047 <SkkZ5Osjr>] RTSP ENDPOINT SOCKET CLOSED [192.168.0.69:38047 <SkkZ5Osjr>]
I checked the supported OPTIONS from the server with curl and it meets the requirements:
curl -v -i -X OPTIONS rtsp://192.168.0.210:554/video.264 * Trying 192.168.0.210... * TCP_NODELAY set * Connected to 192.168.0.210 (192.168.0.210) port 554 (#0) > OPTIONS * RTSP/1.0 > CSeq: 1 > User-Agent: curl/7.52.1 > < RTSP/1.0 200 OK RTSP/1.0 200 OK < CSeq: 1 CSeq: 1 < Public: DESCRIBE,SETUP,OPTIONS,PLAY,TEARDOWN Public: DESCRIBE,SETUP,OPTIONS,PLAY,TEARDOWN < User-Agent: VoIP Guard User-Agent: VoIP Guard < * Curl_http_done: called premature == 0 * Connection #0 to host 192.168.0.210 left intact
Here https://developer.amazon.com/de/docs/device-apis/alexa-camerastreamcontroller.html#prerequisites-requirements is mentioned:
Feed authentication methods: HTTP Digest authentication within the returned camera stream.
RTSP Command support required: DESCRIBE, SETUP, PLAY, and TEARDOWN commands are required although a full RFC compliant implementation is recommended.
Does the stream have to be authenticated? Mine is not.
Is there a possibility to check if the stream is RFC compliant? -
Thank you so much.I’ll try your step.
-
No the stream does not have to be authenticated.
And since you are using Monocle Gateway, your stream (via the gateway) meets the encryption (TLS/SSL) and SSL certificate requirements.
Based on what I am seeing in the log info you provided, the Alexa device is successfully communicating with the gateway and the gateway is successfully negotiating the RTSP protocol to obtain the SDP (stream descriptor). However, after the the Alexa device receives the SDP (copied below) she immediately terminates the connection to the gateway and the gateway in turn disconnects from the IP camera. What should happen is that Alexa receives the SDP and then starts to negotiate a SETUP and PLAY request on the stream. So this suggests that the Alexa device does not like something in the SDP returned from the IP camera.
v=0 o=- 123456 654321 IN IP4 192.168.0.210 s=SDP data c=IN IP4 192.168.0.210 t=0 0 a=range:npt=0- m=video 0 RTP/AVP 102 a=rtpmap:102 H264/90000 a=control:rtsp://192.168.0.210/video.264 a=sendonly
I’ll attempt to recreate this SDP response from one of my cameras and see if I get the same failure you are experiencing. This would confirm some incompatibility in the SDP with Alexa.
Have you tried this stream on any other Alexa device or only on the Fire Tablet?
Thanks, Robert
-
Hi Robert,
thanks for the quick reply.I own one fire hd 10 only so I don’t have a chance to test on other devices.
Best, Ralf
-
Hi Robert,
I’ve ordered an echo show 8. Same results :white_frowning_face:
Any idea?Best regards, Ralf
****************************************************************** * __ __ ___ _ _ ___ ___ _ ___ * * | \/ |/ _ \| \| |/ _ \ / __| | | __| * * | |\/| | (_) | .` | (_) | (__| |__| _| * * |_| |_|\___/|_|\_|\___/ \___|____|___| * * * ****************************************************************** ------------------------------------------------- MONOCLE RUNTIME ENVIRONMENT ------------------------------------------------- VERSION = 0.0.4 OS/ARCH = win32\x64 PROCESS = monocle-gateway (PID=9800) TIMESTAMP = 2019-12-06T21:11:33.200Z ------------------------------------------------- MONOCLE GATEWAY SERVICE (Version: 0.0.4) ------------------------------------------------- [Monocle Starting] [Monocle Connecting] [Monocle Started] [RTSP Server Starting] [RTSP Server Listening] 0.0.0.0:8555 (RTSP) [RTSP Server Listening] 0.0.0.0:443 (RTSP-TLS) [RTSP Proxy Started] (PID=8092) [RTSP Server Listening] 0.0.0.0:8554 (PROXY) [RTSP Server Started] [Monocle Connected] [RTSP Server Registered] ------------------------------------------------- MONOCLE RTSP SERVICE - INITIALIZED ------------------------------------------------- FQDN = c115d191-af5f-4ea9-9409-2253ab93f409.mproxy.io HOST = 192.168.0.26 PORT = 443 ------------------------------------------------- ------------------------------------------------- INITIALIZE RTSP STREAM: Haustür ------------------------------------------------- - NAME : Haustür - LABEL : PRIMARY - URL : rtsp://192.168.0.210:554/video.264 - UUID : STREAM:bb696c1b-9ace-4726-b53e-bf4580252acd - SESS : 6602c2a1-656f-4fa0-a344-9a0fa20286c0 - MODIF : Fri Nov 15 2019 02:05:47 GMT+0100 (Mitteleuropäische Zeit) - TAGS : @tunnel ------------------------------------------------- 2019-12-06T21:11:46.618Z [INFO] [192.168.0.21:49302 <HJsGNB_aS>] RTSP CLIENT SOCKET CONNECTED 2019-12-06T21:11:46.759Z [INFO] [192.168.0.21:49302 <HJsGNB_aS>] RTSP CLIENT ATTACHED TO STREAM: Haustür (STREAM:bb696c1b-9ace-4726-b53e-bf4580252acd) 2019-12-06T21:11:46.775Z [INFO] [192.168.0.21:49302 <HJsGNB_aS>] RTSP ENDPOINT SOCKET CONNECTED {192.168.0.210:554} 2019-12-06T21:11:46.775Z [DEBUG] [192.168.0.21:49302 <HJsGNB_aS>] [CLIENT REQUEST] --> [DESCRIBE] rtsp://c115d191-af5f-4ea9-9409-2253ab93f409.mproxy.io:443/STREAM:bb696c1b-9ace-4726-b53e-bf4580252acd?session=6602c2a1-656f-4fa0-a344-9a0fa20286c0 2019-12-06T21:11:46.775Z [TRACE] [192.168.0.21:49302 <HJsGNB_aS>] [CLIENT REQUEST] --> [HEADERS] { "accept": "application/sdp", "user-agent": "Fire OS/6.0 stagefright/1.2 (Linux;Android 7.1.2)", "cseq": "1" } 2019-12-06T21:11:46.775Z [DEBUG] [192.168.0.21:49302 <HJsGNB_aS>] [ENDPOINT REQUEST] --> [DESCRIBE] rtsp://192.168.0.210:554/video.264 2019-12-06T21:11:46.775Z [TRACE] [192.168.0.21:49302 <HJsGNB_aS>] [ENDPOINT REQUEST] --> [HEADERS] { "accept": "application/sdp", "user-agent": "Fire OS/6.0 stagefright/1.2 (Linux;Android 7.1.2)", "cseq": "1" } 2019-12-06T21:11:46.775Z [DEBUG] [192.168.0.21:49302 <HJsGNB_aS>] [ENDPOINT RESPONSE] <-- [200 (OK)] <cseq=1> (session=undefined) 2019-12-06T21:11:46.775Z [TRACE] [192.168.0.21:49302 <HJsGNB_aS>] [ENDPOINT RESPONSE] <-- [HEADERS] { "cseq": "1", "user-agent": "VoIP Guard", "content-type": "application/sdp", "content-length": "206" } 2019-12-06T21:11:46.775Z [TRACE] [192.168.0.21:49302 <HJsGNB_aS>] [ENDPOINT RESPONSE] <-- [BODY] v=0 o=- 123456 654321 IN IP4 192.168.0.210 s=SDP data c=IN IP4 192.168.0.210 t=0 0 a=range:npt=0- m=video 0 RTP/AVP 102 a=rtpmap:102 H264/90000 a=control:rtsp://192.168.0.210/video.264 a=sendonly 2019-12-06T21:11:46.775Z [INFO] [192.168.0.21:49302 <HJsGNB_aS>] RTSP ENDPOINT AUTHENTICATION SUCCESSFUL: NONE 2019-12-06T21:11:46.790Z [DEBUG] [192.168.0.21:49302 <HJsGNB_aS>] [CLIENT RESPONSE] <-- [200 (OK)] <cseq=1> (session=undefined) 2019-12-06T21:11:46.790Z [TRACE] [192.168.0.21:49302 <HJsGNB_aS>] [CLIENT RESPONSE] <-- [HEADERS] { "cseq": "1", "user-agent": "VoIP Guard", "content-type": "application/sdp", "content-length": "206" } 2019-12-06T21:11:46.790Z [TRACE] [192.168.0.21:49302 <HJsGNB_aS>] [CLIENT RESPONSE] <-- [BODY] v=0 o=- 123456 654321 IN IP4 192.168.0.210 s=SDP data c=IN IP4 192.168.0.210 t=0 0 a=range:npt=0- m=video 0 RTP/AVP 102 a=rtpmap:102 H264/90000 a=control:rtsp://192.168.0.210/video.264 a=sendonly 2019-12-06T21:11:46.806Z [INFO] [192.168.0.21:49302 <HJsGNB_aS>] RTSP CLIENT SOCKET CLOSED 2019-12-06T21:11:46.806Z [INFO] [192.168.0.21:49302 <HJsGNB_aS>] RTSP CLIENT DETACHED FROM STREAM: Haustür (STREAM:bb696c1b-9ace-4726-b53e-bf4580252acd) 2019-12-06T21:11:46.806Z [INFO] [192.168.0.21:49302 <HJsGNB_aS>] RTSP ENDPOINT SOCKET CLOSED [192.168.0.21:49302 <HJsGNB_aS>]