Digital Devices Octopus NET CT/2 Erfahrungen? (1 Viewer)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    mal eine andere frage zum SatIp Tuner detector
    reagiert der auch auf Notify Messages ?
    If I've understood correctly then the answer is yes.

    https://github.com/MediaPortal/Medi...Library/Implementations/TunerDetector.cs#L631

    That function is called [by event from the MP2 UPnP library] on SSDP byebye. It is intended to tell the TV service controller that the tuner is no longer available, then unload the tuner. Unloading the tuner will free all sub-channels, which will close all RTSP/RTP and RTCP connections.
     

    KayDiefenthal

    MP Donator
  • Premium Supporter
  • July 18, 2006
    1,176
    92
    46
    Germany - Bonn
    Home Country
    Germany Germany
    ok you had think on it

    had in the last time only apps seen where Notify and M-Search Responses are ignored
    so is the Problem that the Client inst informed that the Server Connection was lost some of Sat>Ip Receivers had this Problem too
    the Inverto idl 6650n webedition as Exsample
     

    KayDiefenthal

    MP Donator
  • Premium Supporter
  • July 18, 2006
    1,176
    92
    46
    Germany - Bonn
    Home Country
    Germany Germany
    i have buy a new SatIpServer Triax Tss 400 and test it with the current rtsp code
    and there are Problems with Responses

    RtspResponse.cs had this line

    the regex Match is false

    response._body = sections[1];
    and throw an out of index Exception
    so had i look what is the responseString and it is "" aka string.empty

    at moment had i no idea from where the Problem Comes
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello Kay

    If this regex does not match:
    Code:
    Match m = REGEX_STATUS_LINE.Match(responseString);

    ...then it will be a problem.
    Can you provide a Wireshark trace?

    Regards and thanks,
    mm
    :)
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Thanks Kay! :) (y)

    My guess is that the SAT>IP server doesn't like the RTSP SETUP request (packet number 62). The response (packet number 64) is a request to close the TCP connection.

    If I'm right, the question is what is wrong with the SETUP request.

    The request:
    SETUP rtsp://192.168.2.104/?src=1&freq=11837&pol=h&msys=dvbs&plts=off&fec=34&ro=0.35&sr=27500&mtype=qpsk&pids=0,100,101,102,104 RTSP/1.0
    Transport: RTP/AVP;unicast;client_port=40000-40001
    CSeq: 1

    DVBViewer's request:
    SETUP rtsp://192.168.2.104:554/?src=1&freq=11837&msys=dvbs&plts=off&fec=34&pol=h&ro=0.35&sr=27500&mtype=qpsk&pids=0 RTSP/1.0
    CSeq: 2
    Transport: RTP/AVP;unicast;client_port=52042-52043

    Differences:
    • order of SETUP parameters
    • PIDs parameter value
    • space between "...pids=... RTSP/1.0" (DVBViewer only has one space)
    • order of headers (CSeq, Transport)
    • client port
    I think the problem could be number 3.

    I don't see any reason that my code would insert two spaces there. In fact, my code uses a different order for the parameters (src, freq, pol, sr, fec, msys, mtype, plts, ro, pids):
    https://github.com/MediaPortal/Medi...ementations/SatIp/TunerSatIpSatellite.cs#L144
    https://github.com/MediaPortal/Medi...ementations/SatIp/TunerSatIpSatellite.cs#L199

    Are you using different code? ;)
    In any case, please try to remove the extra space.
     

    KayDiefenthal

    MP Donator
  • Premium Supporter
  • July 18, 2006
    1,176
    92
    46
    Germany - Bonn
    Home Country
    Germany Germany
    think i had it

    Code:
    publicRtspStatusCode SendRequest(RtspRequest request, out RtspResponse response)
    {
    response = null;
    lock (_lockObject)
    {
    NetworkStream stream = null;
    int retryCount = 0;
    while (true)
    {
    try
    {
    if (_client == null)
    {
    _client = newTcpClient(_serverHost, _serverPort);
    }
    }
    catch (Exception ex)
    {
    //this.LogError(ex, "RTSP: failed to connect to server");
    returnRtspStatusCode.RequestTimeOut;
    }
    try
    {
    //this is new 
    if ((_client!= null)&&(!_client.Connected))
    {
    _client.Connect(IPAddress.Parse(_serverHost), _serverPort);
    }
    stream = _client.GetStream();
    if (stream == null)
    {
    thrownewException();
    }
    break;
    }
    catch (Exception ex)
    {
    _client.Close();
    _client = null;
    if (retryCount == 1)
    {
    // this.LogError(ex, "RTSP: failed to open stream to server");
    returnRtspStatusCode.RequestTimeOut;
    }
    retryCount++;
    }
    }
    try
    {
    // Send the request and get the response.
    request.Headers.Add("CSeq", _cseq.ToString());
    _cseq++;
    byte[] requestBytes = request.Serialise();
    stream.Write(requestBytes, 0, requestBytes.Length);
    byte[] responseBytes = newbyte[_client.ReceiveBufferSize];
    int byteCount = stream.Read(responseBytes, 0, responseBytes.Length);
    response = RtspResponse.Deserialise(responseBytes, byteCount);
    // Did we get the whole response?
    string contentLengthString;
    int contentLength = 0;
    if (response.Headers.TryGetValue("Content-Length", out contentLengthString))
    {
    contentLength = int.Parse(contentLengthString);
    if ((string.IsNullOrEmpty(response.Body) && contentLength > 0) || response.Body.Length < contentLength)
    {
    if (response.Body == null)
    {
    response.Body = string.Empty;
    }
    while (byteCount > 0 && response.Body.Length < contentLength)
    {
    byteCount = stream.Read(responseBytes, 0, responseBytes.Length);
    response.Body += System.Text.Encoding.UTF8.GetString(responseBytes, 0, byteCount);
    }
    }
    }
    return response.StatusCode;
    }
    finally
    {
    stream.Close();
    }
    }
    }
    i had add this
    if ((_client!= null)&&(!_client.Connected))
    {
    _client.Connect(IPAddress.Parse(_serverHost), _serverPort);
    }


    so recieves it a Response
     

    KayDiefenthal

    MP Donator
  • Premium Supporter
  • July 18, 2006
    1,176
    92
    46
    Germany - Bonn
    Home Country
    Germany Germany
    hi mm to the whitespaces if i dont use rtspclient.cs and use a socket

    with this code

    Code:
    privatevoid Connect()
    
    {
    
    _rtspSocket = newSocket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
    
    var ip = IPAddress.Parse(RtspDevice.Address);
    
    var rtspEndpoint = newIPEndPoint(ip, 554);
    
    _rtspSocket.Connect(rtspEndpoint);
    
    }
    
    privatevoid Disconnect()
    
    {
    
    if (_rtspSocket != null && _rtspSocket.Connected)
    
    {
    
    _rtspSocket.Shutdown(SocketShutdown.Both);
    
    _rtspSocket.Close();
    
    }
    
    }
    
    privatevoid SendRequest(RtspRequest request)
    
    {
    
    if (_rtspSocket == null)
    
    {
    
    }
    
    try
    
    {
    
    request.Headers.Add("CSeq", _rtspSequenceNum.ToString());
    
    _rtspSequenceNum++;
    
    byte[] requestBytes = request.Serialise();
    
    var requestBytesCount = _rtspSocket.Send(requestBytes, requestBytes.Length, SocketFlags.None);
    
    if (requestBytesCount < 1)
    
    {
    
    }
    
    }
    
    catch (Exception e)
    
    {
    
    }
    
    }
    
    privatevoid ReceiveResponse(outRtspResponse response)
    
    {
    
    response = null;
    
    var responseBytesCount = 0;
    
    byte[] responseBytes = newbyte[1024];
    
    try
    
    {
    
    responseBytesCount = _rtspSocket.Receive(responseBytes, responseBytes.Length, SocketFlags.None);
    
    response = RtspResponse.Deserialise(responseBytes, responseBytesCount);
    
    string contentLengthString;
    
    int contentLength = 0;
    
    if (response.Headers.TryGetValue("Content-Length", out contentLengthString))
    
    {
    
    contentLength = int.Parse(contentLengthString);
    
    if ((string.IsNullOrEmpty(response.Body) && contentLength > 0) || response.Body.Length < contentLength)
    
    {
    
    if (response.Body == null)
    
    {
    
    response.Body = string.Empty;
    
    }
    
    while (responseBytesCount > 0 && response.Body.Length < contentLength)
    
    {
    
    responseBytesCount = _rtspSocket.Receive(responseBytes, responseBytes.Length, SocketFlags.None);
    
    response.Body += System.Text.Encoding.UTF8.GetString(responseBytes, 0, responseBytesCount);
    
    }
    
    }
    
    }
    
    }
    
    catch (SocketException)
    
    {
    
    }
    
    }

    have i only one whitespace and working too
    but sometimes is the sessionid not found and the Triax stopp the Streaming but on this look i at time
     

    KayDiefenthal

    MP Donator
  • Premium Supporter
  • July 18, 2006
    1,176
    92
    46
    Germany - Bonn
    Home Country
    Germany Germany
    an Little hint for @mm1352000

    in rtspresponse.cs use you that to become the headers and their values
    Code:
    response._headers = new Dictionary<string, string>();
    foreach (var headerInfo in headers.Select(header => header.Split(  ':' )))
    {
    response._headers.Add(headerInfo[0], headerInfo[1].Trim());
    }

    but that produce an Problem with the Rtp-Info Header from Play Response
    RTP-Info:url=rtsp://192.168.2.102/stream=6;seq=55977
    the result with your code is than RTP-Info "url=rtsp" and not "url=rtsp://192.168.2.102/stream=6;seq=55977"

    the littele fix for that can be
    Code:
    response._headers = new Dictionary<string, string>();
    foreach (var headerInfo in headers.Select(header => header.Split(new char[] { ':' }, 2)))
    {
    response._headers.Add(headerInfo[0], headerInfo[1].Trim());
    }

    so is the Header RTP-Info with the value url=rtsp://192.168.2.102/stream=6;seq=55977
    and an regex for stream and seq values can be

    @"stream=(\d+);seq=(\d+)"
     

    visionsurfer

    Portal Pro
    September 18, 2006
    206
    4
    Home Country
    Germany Germany
    Guten Morgen,

    ich brauche neue TV Karten und ich bin am überlegen ob ich mir gleich die Digital Device SAT - IP Octopus Box kaufe.
    Funktioniert das ohne Probleme mit MP ? Wie ist da der Stand der Dinge ?

    Wenn es funktioniert, stellt sich noch die Frage, ob es so zuverlässig funktioniert, als wenn ich im TV Server direkt die TV Karten installiert hätte ? Also auch Reaktionen und Umschaltzeiten usw. ?

    Würde mich freuen zu erfahren wie der aktuelle Stand ist ? Das letzte Posting ist ja schon ein bisschen her.

    Grüße,
    Visionsurfer
     

    Users who are viewing this thread

    Top Bottom