Resolves #685. Resolves several issues with P25 Phase 2 channel state and call handling. (#687)

Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
Denny Sheirer
2020-03-21 18:42:04 +00:00
committed by GitHub
parent fd72f459f9
commit cf61798466
4 changed files with 19 additions and 6 deletions

2
.idea/misc.xml generated
View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Bellsoft JDK 11.0.2" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" default="true" project-jdk-name="13" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -315,7 +315,6 @@ public class P25P2AudioModule extends AmbeAudioModule implements IdentifierUpdat
public List<String> process(String value)
{
mLog.debug("Processing AMBE Tone Metadata Value: " + value);
if(value != null)
{
if(mLastInput != null && mLastInput.equalsIgnoreCase(value))

View File

@@ -242,7 +242,12 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie
}
break;
case TDMA_0_NULL_INFORMATION_MESSAGE:
closeCurrentCallEvent(message.getTimestamp(), true);
MacPduType type = message.getMacPduType();
if(type == MacPduType.MAC_3_IDLE || type == MacPduType.MAC_6_HANGTIME)
{
closeCurrentCallEvent(message.getTimestamp(), true);
}
continueState(State.ACTIVE);
break;
case TDMA_1_GROUP_VOICE_CHANNEL_USER_ABBREVIATED:

View File

@@ -22,6 +22,7 @@ import io.github.dsheirer.alias.Alias;
import io.github.dsheirer.alias.AliasList;
import io.github.dsheirer.alias.AliasModel;
import io.github.dsheirer.alias.id.record.Record;
import io.github.dsheirer.alias.id.talkgroup.Talkgroup;
import io.github.dsheirer.alias.id.talkgroup.TalkgroupRange;
import io.github.dsheirer.audio.playback.AudioPlaybackManager;
import io.github.dsheirer.bits.CorrectedBinaryMessage;
@@ -29,6 +30,7 @@ import io.github.dsheirer.controller.channel.Channel;
import io.github.dsheirer.dsp.psk.pll.IPhaseLockedLoop;
import io.github.dsheirer.dsp.symbol.Dibit;
import io.github.dsheirer.dsp.symbol.ISyncDetectListener;
import io.github.dsheirer.log.ApplicationLog;
import io.github.dsheirer.message.IMessage;
import io.github.dsheirer.message.MessageProviderModule;
import io.github.dsheirer.message.StuffBitsMessage;
@@ -221,6 +223,11 @@ public class P25P2MessageFramer implements Listener<Dibit>
public static void main(String[] args)
{
UserPreferences userPreferences = new UserPreferences();
userPreferences.getJmbeLibraryPreference().setPathJmbeLibrary(Path.of("/home/denny/JMBE/jmbe-1.0.2.jar"));
ApplicationLog applicationLog = new ApplicationLog(userPreferences);
applicationLog.start();
Path directory = Paths.get("/home/denny/temp/Harris P25-2 Logs/bits");
// Path directory = Paths.get("/media/denny/500G1EXT4/PBITRecordings");
@@ -228,13 +235,13 @@ public class P25P2MessageFramer implements Listener<Dibit>
// ScrambleParameters scrambleParameters = new ScrambleParameters(1, 972, 972));
// ScrambleParameters scrambleParameters = new ScrambleParameters(781824, 686, 677)); //CNYICC - Rome
UserPreferences userPreferences = new UserPreferences();
Channel channel = new Channel("Phase 2 Test");
channel.setDecodeConfiguration(new DecodeConfigP25Phase2());
AliasList aliasList = new AliasList("Test Alias List");
Alias alias = new Alias("TG Range 1-65535");
alias.addAliasID(new Record());
alias.addAliasID(new TalkgroupRange(Protocol.APCO25, 1, 65535));
// alias.addAliasID(new TalkgroupRange(Protocol.APCO25, 1, 65535));
alias.addAliasID(new Talkgroup(Protocol.APCO25, 11185));
aliasList.addAlias(alias);
AudioRecordingManager recordingManager = new AudioRecordingManager(userPreferences);
recordingManager.start();
@@ -247,6 +254,7 @@ public class P25P2MessageFramer implements Listener<Dibit>
processingChain.addModule(new P25P2AudioModule(userPreferences, 1, aliasList));
MessageProviderModule messageProviderModule = new MessageProviderModule();
processingChain.addModule(messageProviderModule);
processingChain.start();
try(OutputStream logOutput = Files.newOutputStream(directory.resolve("log.txt")))
{
@@ -288,7 +296,8 @@ public class P25P2MessageFramer implements Listener<Dibit>
{
mLog.error("Error", ioe);
}
// mLog.debug(message.toString());
mLog.debug(message.toString());
}
});