The blindscan will not retry signals for a few times.
This commit is contained in:
parent
c603b10096
commit
90051928eb
@ -33,6 +33,8 @@ internal class GseReader : IMisHandler
|
|||||||
GsePacket child = new GsePacket(startIndicator, endIndicator, labelTypeIndicator);
|
GsePacket child = new GsePacket(startIndicator, endIndicator, labelTypeIndicator);
|
||||||
if (!startIndicator || !endIndicator)
|
if (!startIndicator || !endIndicator)
|
||||||
{
|
{
|
||||||
|
if (ms.Position == ms.Length)
|
||||||
|
return;
|
||||||
child.FragmentId = ms.ReadUInt8();
|
child.FragmentId = ms.ReadUInt8();
|
||||||
gseLength--;
|
gseLength--;
|
||||||
}
|
}
|
||||||
@ -45,6 +47,8 @@ internal class GseReader : IMisHandler
|
|||||||
|
|
||||||
if (startIndicator)
|
if (startIndicator)
|
||||||
{
|
{
|
||||||
|
if (ms.GetAvailableBytes() < 2)
|
||||||
|
return;
|
||||||
child.ProtocolType = ms.ReadUInt16BE();
|
child.ProtocolType = ms.ReadUInt16BE();
|
||||||
gseLength -= 2;
|
gseLength -= 2;
|
||||||
if (!endIndicator)
|
if (!endIndicator)
|
||||||
@ -81,6 +85,8 @@ internal class GseReader : IMisHandler
|
|||||||
|
|
||||||
if (gseLength > ms.GetAvailableBytes())
|
if (gseLength > ms.GetAvailableBytes())
|
||||||
return;
|
return;
|
||||||
|
if (gseLength <= -1)
|
||||||
|
return;
|
||||||
child.GseDataBytes = ms.ReadBytes(gseLength);
|
child.GseDataBytes = ms.ReadBytes(gseLength);
|
||||||
|
|
||||||
if (!startIndicator && endIndicator)
|
if (!startIndicator && endIndicator)
|
||||||
@ -120,6 +126,21 @@ internal class GseReader : IMisHandler
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!child.StartIndicator && !child.EndIndicator)
|
||||||
|
{
|
||||||
|
if (fragmentations == null)
|
||||||
|
{
|
||||||
|
//We haven't seen any starting frames yet, so we can't use an inbetween frame. We can throw this away.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (fragmentations[child.FragmentId.Value] == null)
|
||||||
|
{
|
||||||
|
//fragment beginning missing, we can throw this away.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new NotImplementedException(child.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
if (child.StartIndicator && child.EndIndicator)
|
if (child.StartIndicator && child.EndIndicator)
|
||||||
{
|
{
|
||||||
switch (child.ProtocolType)
|
switch (child.ProtocolType)
|
||||||
@ -132,7 +153,7 @@ internal class GseReader : IMisHandler
|
|||||||
warnedEthertypes = new bool[0xffff];
|
warnedEthertypes = new bool[0xffff];
|
||||||
if (!warnedEthertypes[child.ProtocolType.Value])
|
if (!warnedEthertypes[child.ProtocolType.Value])
|
||||||
{
|
{
|
||||||
logger.WarnFormat("This GSE contains other traffic types (type {0:X4}) besides IP (type 0x0800). If it's not too much trouble, please consider submitting a sample.",child.ProtocolType.Value);
|
logger.WarnFormat("This GSE contains other traffic types (type 0x{0:X4}) besides IP (type 0x0800). If it's not too much trouble, please consider submitting a sample.",child.ProtocolType.Value);
|
||||||
warnedEthertypes[child.ProtocolType.Value] = true;
|
warnedEthertypes[child.ProtocolType.Value] = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -34,6 +34,7 @@ using skyscraper8.SatIp;
|
|||||||
using skyscraper8.SatIp.RtspResponses;
|
using skyscraper8.SatIp.RtspResponses;
|
||||||
using skyscraper8.SimpleServiceDiscoveryProtocol;
|
using skyscraper8.SimpleServiceDiscoveryProtocol;
|
||||||
using skyscraper8.Skyscraper.Math;
|
using skyscraper8.Skyscraper.Math;
|
||||||
|
using skyscraper8.Skyscraper;
|
||||||
|
|
||||||
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")]
|
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config")]
|
||||||
namespace skyscraper5
|
namespace skyscraper5
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"profiles": {
|
"profiles": {
|
||||||
"skyscraper8": {
|
"skyscraper8": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"commandLineArgs": "\"D:\\sorglos-iww-rww-aca-oca.ts\"",
|
"commandLineArgs": "udpin udp://127.0.0.1:6970",
|
||||||
"remoteDebugEnabled": false
|
"remoteDebugEnabled": false
|
||||||
},
|
},
|
||||||
"Container (Dockerfile)": {
|
"Container (Dockerfile)": {
|
||||||
|
|||||||
@ -588,7 +588,7 @@ namespace skyscraper8.Skyscraper.FrequencyListGenerator
|
|||||||
if (!satelliteSr.Lock)
|
if (!satelliteSr.Lock)
|
||||||
{
|
{
|
||||||
logger.Log(PluginLogLevel.Info, string.Format("Trying to SetChannel..."), 8);
|
logger.Log(PluginLogLevel.Info, string.Format("Trying to SetChannel..."), 8);
|
||||||
bool channel = config.StreamReader.SetChannel(result.SearchResult.Freq, result.SearchResult.SR, result.SearchResult.Freq, result.SearchResult.FEC, config.LnbType.Lof1 * 1000, config.LnbType.Lof2 * 1000, config.LnbType.LofSw * 1000);
|
bool channel = config.StreamReader.SetChannel(result.SearchResult.Freq, result.SearchResult.SR, result.SearchResult.Pol, result.SearchResult.FEC, config.LnbType.Lof1 * 1000, config.LnbType.Lof2 * 1000, config.LnbType.LofSw * 1000);
|
||||||
if (!channel)
|
if (!channel)
|
||||||
{
|
{
|
||||||
result.State = BlindscanResultState.TuningFailed;
|
result.State = BlindscanResultState.TuningFailed;
|
||||||
@ -598,23 +598,35 @@ namespace skyscraper8.Skyscraper.FrequencyListGenerator
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logger.Log(PluginLogLevel.Info, string.Format("Trying to get SignalInfo..."), 8);
|
int attempts = result.SearchResult.Freq / 1000;
|
||||||
bool signalInfo = config.StreamReader.SignalInfo(ref satelliteSr);
|
attempts = attempts.GetHighestDigit();
|
||||||
if (!signalInfo)
|
bool sucess = false;
|
||||||
|
for (int i = 0; i < attempts; i++)
|
||||||
{
|
{
|
||||||
result.State = BlindscanResultState.TuningFailed;
|
logger.Log(PluginLogLevel.Info, string.Format("Trying to get SignalInfo..."), 8);
|
||||||
config.DataStorage.UpdateTransponderState(jobInDb, result.IsSatellite(), result.SearchResult, result.State, result.SearchResult2);
|
bool signalInfo = config.StreamReader.SignalInfo(ref satelliteSr);
|
||||||
config.Ui.OnBlindscanLockFail(satelliteSr, result.State);
|
if (!signalInfo)
|
||||||
return;
|
{
|
||||||
}
|
result.State = BlindscanResultState.TuningFailed;
|
||||||
|
config.DataStorage.UpdateTransponderState(jobInDb, result.IsSatellite(), result.SearchResult, result.State, result.SearchResult2);
|
||||||
|
config.Ui.OnBlindscanLockFail(satelliteSr, result.State);
|
||||||
|
}
|
||||||
|
|
||||||
if (!satelliteSr.Lock)
|
if (!satelliteSr.Lock)
|
||||||
{
|
{
|
||||||
result.State = BlindscanResultState.NoLock;
|
result.State = BlindscanResultState.NoLock;
|
||||||
config.DataStorage.UpdateTransponderState(jobInDb, result.IsSatellite(), result.SearchResult, result.State, result.SearchResult2);
|
config.DataStorage.UpdateTransponderState(jobInDb, result.IsSatellite(), result.SearchResult, result.State, result.SearchResult2);
|
||||||
config.Ui.OnBlindscanLockFail(satelliteSr, result.State);
|
config.Ui.OnBlindscanLockFail(satelliteSr, result.State);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sucess = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Thread.Sleep(1000);
|
||||||
|
}
|
||||||
|
if (!sucess)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,11 @@ namespace skyscraper8.Skyscraper.FrequencyListGenerator
|
|||||||
{
|
{
|
||||||
if (!_proxiedStreamReader.SendDiSEqC(lastDiseqcType, lastDiseqcOpcode))
|
if (!_proxiedStreamReader.SendDiSEqC(lastDiseqcType, lastDiseqcOpcode))
|
||||||
return false;
|
return false;
|
||||||
}
|
if (!_proxiedStreamReader.SendDiSEqC(lastDiseqcType, lastDiseqcOpcode))
|
||||||
|
return false;
|
||||||
|
if (!_proxiedStreamReader.SendDiSEqC(lastDiseqcType, lastDiseqcOpcode))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
currentlySelectedTuner = targetTuner;
|
currentlySelectedTuner = targetTuner;
|
||||||
return true;
|
return true;
|
||||||
@ -260,9 +264,13 @@ namespace skyscraper8.Skyscraper.FrequencyListGenerator
|
|||||||
if (!SwitchTuner(_setFilterTuner))
|
if (!SwitchTuner(_setFilterTuner))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
bool diseqc = SendDiSEqC(lastDiseqcType, lastDiseqcOpcode);
|
||||||
|
|
||||||
if (!_proxiedStreamReader.BLScanEx(freq, freq_range, pol, lof1, lof2, lofsw, minsr, std, ref pSearchResult))
|
if (!_proxiedStreamReader.BLScanEx(freq, freq_range, pol, lof1, lof2, lofsw, minsr, std, ref pSearchResult))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
logger.InfoFormat("Frequency: {0}, Polarity: {1}, Lock: {2}", freq, pol, pSearchResult.Lock);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
24
skyscraper8/Skyscraper/IntegerExtensions.cs
Normal file
24
skyscraper8/Skyscraper/IntegerExtensions.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace skyscraper8.Skyscraper
|
||||||
|
{
|
||||||
|
internal static class IntegerExtensions
|
||||||
|
{
|
||||||
|
public static int GetHighestDigit(this int source)
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
while (source > 0)
|
||||||
|
{
|
||||||
|
int currentDigit = source % 10;
|
||||||
|
if (currentDigit > result)
|
||||||
|
result = currentDigit;
|
||||||
|
source /= 10;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -30,9 +30,10 @@ namespace skyscraper5.src.Skyscraper
|
|||||||
string versionString = version.ToString();
|
string versionString = version.ToString();
|
||||||
switch(versionString)
|
switch(versionString)
|
||||||
{
|
{
|
||||||
|
case "1.2.5.208": return QualificationToolResultEnum.Good;
|
||||||
case "1.2.5.194": return QualificationToolResultEnum.Bad; //Won't find most transponders with a 6903x
|
case "1.2.5.194": return QualificationToolResultEnum.Bad; //Won't find most transponders with a 6903x
|
||||||
case "1.2.5.176": return QualificationToolResultEnum.Bad; //Won't find most transponders with a 6903x
|
case "1.2.5.176": return QualificationToolResultEnum.Bad; //Won't find most transponders with a 6903x
|
||||||
case "1.2.4.101": return QualificationToolResultEnum.Good; //Works great, but is reather slow with a 6903x
|
case "1.2.4.101": return QualificationToolResultEnum.Bad; //Breaks GS encapsulation on 6903x.
|
||||||
default: return QualificationToolResultEnum.Unknown;
|
default: return QualificationToolResultEnum.Unknown;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user