Jump to content

SatIp Discovery Bug


Guest Diefenthal

Recommended Posts

Guest Diefenthal

 

Some Sat>Ip Servers found in the log but not listed in the UI

 

 

the Octopus Net ( IP 192.168.2.103) is discovered in the log and in the UI added

the Triax Tss 400 (IP 192.168.2.102) is discovered in the log but not shown in the UI

Link to comment
Share on other sites

Thanks. Should be fixed now. I was initially excluding servers from discovery that don't support m3u, so that's removed now.

 

Next up is channel scan.

Link to comment
Share on other sites

Guest Diefenthal

Thanks. Should be fixed now. I was initially excluding servers from discovery that don't support m3u, so that's removed now.

 

Next up is channel scan.

i dont know how ffmpeg rtsp works

 

but you must something like this

@@Luke

 

here are some hint for the next steps

 

send a rtsp Setup request

 

SETUP rtsp://192.168.2.102:554/?src=1&freq=11953&pol=h&msys=dvbs&sr=27500&fec=34&mtype=qpsk&pids=0 RTSP/1.0
Transport: RTP/AVP;unicast;client_port=40000-40001
CSeq: 1
in Setup send pids=0 that let you get the Program Association Table (Pat)

and this contains something like this

 

ServiceId = 28006 - PMTPid = 100

ServiceId = 28007 - PMTPid = 200

ServiceId = 28008 - PMTPid = 300

ServiceId = 28011 - PMTPid = 600

ServiceId = 28012 - PMTPid = 700

ServiceId = 28013 - PMTPid = 800

ServiceId = 28014 - PMTPid = 650

ServiceId = 28015 - PMTPid = 500

ServiceId = 28016 - PMTPid = 1100

ServiceId = 28017 - PMTPid = 411

 

the Pid is the ProgramMapTable ID

 

so send a rtsp Play Request

 

PLAY rtsp://192.168.2.102:554/stream=921 ?src=1&freq=11953&pol=h&msys=dvbs&sr=27500&fec=34&mtype=qpsk&addpids=100,200,300,600,700,800,650,500,1100,411 RTSP/1.0
so becomes you the all Program Map Tables for each ServiceID

 

ServiceId = 28006 - PCRPid = 110

ServiceId = 28007 - PCRPid = 210

ServiceId = 28008 - PCRPid = 310

ServiceId = 28011 - PCRPid = 610

ServiceId = 28012 - PCRPid = 710

ServiceId = 28013 - PCRPid = 810

ServiceId = 28014 - PCRPid = 660

ServiceId = 28015 - PCRPid = 510

ServiceId = 28016 - PCRPid = 1110

ServiceId = 28017 - PCRPid = 410

 

PLAY rtsp://192.168.2.102:554/stream=921 ?src=1&freq=11953&pol=h&msys=dvbs&sr=27500&fec=34&mtype=qpsk&delpids=100,200,300,600,700,800,650,500,1100,411 RTSP/1.0
PLAY rtsp://192.168.2.102:554/stream=921 ?src=1&freq=11953&pol=h&msys=dvbs&sr=27500&fec=34&mtype=qpsk&addpids=17 RTSP/1.0
Link to comment
Share on other sites

Guest Diefenthal

a DVBService had some more Fields insteat the Name

 

ServiceID

PMTID

PCRID

elementary streams

Video ID

Audio ID (can more than one)

TeleText ID

Subtitle ID

 

on the scan Need you pat pmt sdt the combination of this three is the data for channels /Services on the Multiplex

Link to comment
Share on other sites

Guest Diefenthal

am i sure what is fixed?

Thanks. Should be fixed now. I was initially excluding servers from discovery that don't support m3u, so that's removed now.

Edited by Diefenthal
Link to comment
Share on other sites

Well remember I don't have hardware for this so I'm a bit blind here. Can you investigate a little?

Link to comment
Share on other sites

Guest Diefenthal

Well remember I don't have hardware for this so I'm a bit blind here. Can you investigate a little?

im not sure if that the Problem

 

but you use

public static SsdpMessageEventArgs ParseSsdpResponse(byte[] data)
        {
            using (var ms = new MemoryStream(data))
            {
                using (var reader = new StreamReader(ms, Encoding.ASCII))
                {
                    var proto = (reader.ReadLine() ?? string.Empty).Trim();
                    var method = proto.Split(new[] { ' ' }, 2)[0];
                    var headers = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
                    for (var line = reader.ReadLine(); line != null; line = reader.ReadLine())
                    {
                        line = line.Trim();
                        if (string.IsNullOrEmpty(line))
                        {
                            break;
                        }
                        var parts = line.Split(new[] { ':' }, 2);

                        if (parts.Length >= 2)
                        {
                            headers[parts[0]] = parts[1].Trim();
                        }
                    }

                    return new SsdpMessageEventArgs
                    {
                        Method = method,
                        Headers = headers,
                        Message = data
                    };
                }
            }
        }

and i use that

public static Dictionary<string, string> Parse(string searchResponse)
        {
            var reader = new StringReader(searchResponse);
            var line = reader.ReadLine();
            var values = new Dictionary<string, string>();
            while ((line = reader.ReadLine()) != null)
            {
                if (line == "")
                {
                    continue;
                }
                var colon = line.IndexOf(':');
                if (colon < 1)
                {
                    return null;
                }
                var name = line.Substring(0, colon).Trim();
                var value = line.Substring(colon + 1).Trim();
                if (string.IsNullOrEmpty(name))
                {
                    return null;
                }
                values[name.ToLowerInvariant()] = value;
            }
            return values;
        }

Link to comment
Share on other sites

 

im not sure if that the Problem

 

but you use

public static SsdpMessageEventArgs ParseSsdpResponse(byte[] data)
        {
            using (var ms = new MemoryStream(data))
            {
                using (var reader = new StreamReader(ms, Encoding.ASCII))
                {
                    var proto = (reader.ReadLine() ?? string.Empty).Trim();
                    var method = proto.Split(new[] { ' ' }, 2)[0];
                    var headers = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
                    for (var line = reader.ReadLine(); line != null; line = reader.ReadLine())
                    {
                        line = line.Trim();
                        if (string.IsNullOrEmpty(line))
                        {
                            break;
                        }
                        var parts = line.Split(new[] { ':' }, 2);

                        if (parts.Length >= 2)
                        {
                            headers[parts[0]] = parts[1].Trim();
                        }
                    }

                    return new SsdpMessageEventArgs
                    {
                        Method = method,
                        Headers = headers,
                        Message = data
                    };
                }
            }
        }

and i use that

public static Dictionary<string, string> Parse(string searchResponse)
        {
            var reader = new StringReader(searchResponse);
            var line = reader.ReadLine();
            var values = new Dictionary<string, string>();
            while ((line = reader.ReadLine()) != null)
            {
                if (line == "")
                {
                    continue;
                }
                var colon = line.IndexOf(':');
                if (colon < 1)
                {
                    return null;
                }
                var name = line.Substring(0, colon).Trim();
                var value = line.Substring(colon + 1).Trim();
                if (string.IsNullOrEmpty(name))
                {
                    return null;
                }
                values[name.ToLowerInvariant()] = value;
            }
            return values;
        }

 

Are there any messages in the log about these devices? How do i get setup for SAT? I'd rather just buy whatever devices i need so that i can test on my own. But I don't really know much about it I'm afraid.

Link to comment
Share on other sites

Guest Diefenthal

Are there any messages in the log about these devices?

2016-03-19 23:06:41.4123 Debug App: SAT IP found at http://192.168.2.102:80/rootDescr]http://192.168.2.102:80/rootDescr
2016-03-19 23:06:41.4123 Debug App: Will attempt to add SAT device http://192.168.2.102:80
2016-03-19 23:06:41.4123 Info HttpClient: HttpClientManager GET:http://192.168.2.102:80/rootDescr

 

in the logs is the sat>ip server found  

 

 

How do i get setup for SAT? I'd rather just buy whatever devices i need so that i can test on my own. But I don't really know much about it I'm afraid.

 

i dont know where you live and  if you can receive any Free To Air  Signal there

 

 

 

Link to comment
Share on other sites

2016-03-19 23:06:41.4123 Debug App: SAT IP found at http://192.168.2.102:80/rootDescr]http://192.168.2.102:80/rootDescr
2016-03-19 23:06:41.4123 Debug App: Will attempt to add SAT device http://192.168.2.102:80
2016-03-19 23:06:41.4123 Info HttpClient: HttpClientManager GET:http://192.168.2.102:80/rootDescr

 

in the logs is the sat>ip server found  

 

 

 

i dont know where you live and  if you can receive any Free To Air  Signal there

 

 

 

 

It looks like there are some in the US:

 

http://www.lyngsat.com/freetv/United-States.html

 

What equipment do i need?

Link to comment
Share on other sites

Guest Diefenthal

an satellite Dish  how big can i not tell you  (here in Germany near Bonn is a dish with 75cm enough  but i had an 1,2 meters Dish installed Minimum 1 LNB 

 

Singel LNB receives one Satellite for one Receiver

Twin LNB receives one Satellite for two Receivers

Quatro LNB receives one Satellite  in splitted Bands( High Vertical, High Horizental, Low Vertical  ,Low Horizental) normaly used in combination with an external Multiswitch

Quad LNB receives one Satellite for 4 Receivers had inbuild Multiswitch

 

and a device for SatIp

 

why so big  is easy to describe i use an Multifeed System (more than one Lnb ) for 4 Satellites

this 4 LNB s are connected to an 17 /24 Multiswitch (17 are the Inputs  4*4 for the LNBS + 1 for Terrestrial and 24 Outputs for the Receiver 10 of them are for my Sat>Ip Servers))

this allows any Satellite Receiver  to Receive the signals from the 4 Satellites  (DiseqC A/B/C/D) Setting

 

but now is it not cheaper for you to download TeamViewer and look here  

 

PS if you really want  and run to buy an dish lnb and Receiver

are this guys  the best place for questions for american  dish Systems i think

http://www.satelliteguys.us

Edited by Diefenthal
Link to comment
Share on other sites

Nikolaech
you to download TeamViewer and look here

  @Luke highly recommend to listen Diefenthal

 

you get a lot of experience

 

Настоятельно рекомендую послушать Diefenthal. Sat TV когда нет опыта, сложно. С оборудованием не надо спешить. Очень много тонкостей. Для каждой страны свои особенности.

Edited by Nikolaech
Link to comment
Share on other sites

  @Luke highly recommend to listen Diefenthal

 

you get a lot of experience

 

Настоятельно рекомендую послушать Diefenthal. Sat TV когда нет опыта, сложно. С оборудованием не надо спешить. Очень много тонкостей. Для каждой страны свои особенности.

 

I agree, he has been fantastic :) The main issue is how can I support users if I can't personally test the issues they report. That's why I don't mind buying whatever hardware I might need. I don't really want a large dish though, so hopefully there's something small.

Link to comment
Share on other sites

Guest Diefenthal

@@Luke first question is it possible to add Reference System.XML.Linq ?

 if the anwser yes it should there no Problems

 

then had i  a Solution for discovery

public async Task<SatIpTunerHostInfo> GetInfo(string url, CancellationToken cancellationToken)
        {
            Uri locationUri = new Uri(url);
            string devicetype="";
            string friendlyname="";
            string uniquedevicename="";
            string manufacturer = "";
            string manufacturerurl = "";
            string modelname = "";
            string modeldescription = "";
            string modelnumber = "";
            string modelurl = "";
            string serialnumber = "";
            string presentationurl = "";
            string capabilities="";
            string m3u = "";
            var document = XDocument.Load(locationUri.AbsoluteUri);
            var xnm = new XmlNamespaceManager(new NameTable());
            XNamespace n1 = "urn:ses-com:satip";
            XNamespace n0 = "urn:schemas-upnp-org:device-1-0";
            xnm.AddNamespace("root", n0.NamespaceName);
            xnm.AddNamespace("satip:", n1.NamespaceName);
            if (document.Root != null)
            {
                var deviceElement = document.Root.Element(n0 + "device");                
                if (deviceElement != null)
                {
                    var devicetypeElement = deviceElement.Element(n0 + "deviceType");
                    if (devicetypeElement != null)
                        devicetype = devicetypeElement.Value;
                    var friendlynameElement = deviceElement.Element(n0 + "friendlyName");
                    if (friendlynameElement != null)
                        friendlyname = friendlynameElement.Value;
                    var manufactureElement = deviceElement.Element(n0 + "manufacturer");
                    if (manufactureElement != null)
                        manufacturer = manufactureElement.Value;
                    var manufactureurlElement = deviceElement.Element(n0 + "manufacturerURL");
                    if (manufactureurlElement != null)
                        manufacturerurl = manufactureurlElement.Value;
                    var modeldescriptionElement = deviceElement.Element(n0 + "modelDescription");
                    if (modeldescriptionElement != null)
                        modeldescription = modeldescriptionElement.Value;
                    var modelnameElement = deviceElement.Element(n0 + "modelName");
                    if (modelnameElement != null)
                        modelname = modelnameElement.Value;
                    var modelnumberElement = deviceElement.Element(n0 + "modelNumber");
                    if (modelnumberElement != null)
                        modelnumber = modelnumberElement.Value;
                    var modelurlElement = deviceElement.Element(n0 + "modelURL");
                    if (modelurlElement != null)
                        modelurl = modelurlElement.Value;
                    var serialnumberElement = deviceElement.Element(n0 + "serialNumber");
                    if (serialnumberElement != null)
                        serialnumber = serialnumberElement.Value;
                    var uniquedevicenameElement = deviceElement.Element(n0 + "UDN");
                    if (uniquedevicenameElement != null) uniquedevicename = uniquedevicenameElement.Value;
                    var presentationUrlElement = deviceElement.Element(n0 + "presentationURL");
                    if (presentationUrlElement != null) presentationurl = presentationUrlElement.Value;
                    var capabilitiesElement = deviceElement.Element(n1 + "X_SATIPCAP");
                    if (capabilitiesElement != null) capabilities = capabilitiesElement.Value;
                    var m3uElement = deviceElement.Element(n1 + "X_SATIPM3U");
                    if (m3uElement != null) m3u = m3uElement.Value;
                }
            }

                
            var result = new SatIpTunerHostInfo
            {
                Url = url,
                Id = uniquedevicename,
                IsEnabled = true,
                Type = SatIpHost.DeviceType,
                Tuners = 1,
                TunersAvailable = 1
            };
            result.FriendlyName = friendlyname;
            if (string.IsNullOrWhiteSpace(result.Id))
            {
                throw new NotImplementedException();
            }

            // Device hasn't implemented an m3u list
            //if (string.IsNullOrWhiteSpace(result.M3UUrl))
            //{
            //    result.IsEnabled = true;//Change one
            //}

            //else if (!result.M3UUrl.StartsWith("http", StringComparison.OrdinalIgnoreCase))
            //{
            //    var fullM3uUrl = url.Substring(0, url.LastIndexOf('/'));
            //    result.M3UUrl = fullM3uUrl + "/" + result.M3UUrl.TrimStart('/');
            //}

            _logger.Debug("SATIP device result: {0}", _json.SerializeToString(result));
            
            return result;
        }

based on last offical Release 3.0.5882.0

 

 

Edited by Diefenthal
Link to comment
Share on other sites

@@Luke first question is it possible to add Reference System.XML.Linq ?

 if the anwser yes it should there no Problems

 

then had i  a Solution for discovery

public async Task<SatIpTunerHostInfo> GetInfo(string url, CancellationToken cancellationToken)
        {
            Uri locationUri = new Uri(url);
            string devicetype="";
            string friendlyname="";
            string uniquedevicename="";
            string manufacturer = "";
            string manufacturerurl = "";
            string modelname = "";
            string modeldescription = "";
            string modelnumber = "";
            string modelurl = "";
            string serialnumber = "";
            string presentationurl = "";
            string capabilities="";
            string m3u = "";
            var document = XDocument.Load(locationUri.AbsoluteUri);
            var xnm = new XmlNamespaceManager(new NameTable());
            XNamespace n1 = "urn:ses-com:satip";
            XNamespace n0 = "urn:schemas-upnp-org:device-1-0";
            xnm.AddNamespace("root", n0.NamespaceName);
            xnm.AddNamespace("satip:", n1.NamespaceName);
            if (document.Root != null)
            {
                var deviceElement = document.Root.Element(n0 + "device");                
                if (deviceElement != null)
                {
                    var devicetypeElement = deviceElement.Element(n0 + "deviceType");
                    if (devicetypeElement != null)
                        devicetype = devicetypeElement.Value;
                    var friendlynameElement = deviceElement.Element(n0 + "friendlyName");
                    if (friendlynameElement != null)
                        friendlyname = friendlynameElement.Value;
                    var manufactureElement = deviceElement.Element(n0 + "manufacturer");
                    if (manufactureElement != null)
                        manufacturer = manufactureElement.Value;
                    var manufactureurlElement = deviceElement.Element(n0 + "manufacturerURL");
                    if (manufactureurlElement != null)
                        manufacturerurl = manufactureurlElement.Value;
                    var modeldescriptionElement = deviceElement.Element(n0 + "modelDescription");
                    if (modeldescriptionElement != null)
                        modeldescription = modeldescriptionElement.Value;
                    var modelnameElement = deviceElement.Element(n0 + "modelName");
                    if (modelnameElement != null)
                        modelname = modelnameElement.Value;
                    var modelnumberElement = deviceElement.Element(n0 + "modelNumber");
                    if (modelnumberElement != null)
                        modelnumber = modelnumberElement.Value;
                    var modelurlElement = deviceElement.Element(n0 + "modelURL");
                    if (modelurlElement != null)
                        modelurl = modelurlElement.Value;
                    var serialnumberElement = deviceElement.Element(n0 + "serialNumber");
                    if (serialnumberElement != null)
                        serialnumber = serialnumberElement.Value;
                    var uniquedevicenameElement = deviceElement.Element(n0 + "UDN");
                    if (uniquedevicenameElement != null) uniquedevicename = uniquedevicenameElement.Value;
                    var presentationUrlElement = deviceElement.Element(n0 + "presentationURL");
                    if (presentationUrlElement != null) presentationurl = presentationUrlElement.Value;
                    var capabilitiesElement = deviceElement.Element(n1 + "X_SATIPCAP");
                    if (capabilitiesElement != null) capabilities = capabilitiesElement.Value;
                    var m3uElement = deviceElement.Element(n1 + "X_SATIPM3U");
                    if (m3uElement != null) m3u = m3uElement.Value;
                }
            }

                
            var result = new SatIpTunerHostInfo
            {
                Url = url,
                Id = uniquedevicename,
                IsEnabled = true,
                Type = SatIpHost.DeviceType,
                Tuners = 1,
                TunersAvailable = 1
            };
            result.FriendlyName = friendlyname;
            if (string.IsNullOrWhiteSpace(result.Id))
            {
                throw new NotImplementedException();
            }

            // Device hasn't implemented an m3u list
            //if (string.IsNullOrWhiteSpace(result.M3UUrl))
            //{
            //    result.IsEnabled = true;//Change one
            //}

            //else if (!result.M3UUrl.StartsWith("http", StringComparison.OrdinalIgnoreCase))
            //{
            //    var fullM3uUrl = url.Substring(0, url.LastIndexOf('/'));
            //    result.M3UUrl = fullM3uUrl + "/" + result.M3UUrl.TrimStart('/');
            //}

            _logger.Debug("SATIP device result: {0}", _json.SerializeToString(result));
            
            return result;
        }

based on last offical Release 3.0.5882.0

 

attachicon.gifUnbenannt.PNG

 

does it work on the dev branch?

Link to comment
Share on other sites

Guest Diefenthal

 

Can you investigate a little?

 

i had it investigate  and fixed in the master

and  lose the interesting to help here out

 

if i get an new question as answer to my question

 

good luck

i am out

 

if you can delete this acount

Edited by Diefenthal
Link to comment
Share on other sites

i had it investigate  and fixed in the master

and  lose the interesting to help here out

 

if i get an new question as answer to my question

 

good luck

i am out

 

if you can delete this acount

 

I'm sorry, I did not mean to offend. Thank you for all the help you've provided so far.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...