diff --git a/.idea/misc.xml b/.idea/misc.xml index b67e7217..9df1b837 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/src/main/java/io/github/dsheirer/module/decode/p25/audio/P25P2AudioModule.java b/src/main/java/io/github/dsheirer/module/decode/p25/audio/P25P2AudioModule.java index f0b67d77..cb23c63c 100644 --- a/src/main/java/io/github/dsheirer/module/decode/p25/audio/P25P2AudioModule.java +++ b/src/main/java/io/github/dsheirer/module/decode/p25/audio/P25P2AudioModule.java @@ -315,7 +315,6 @@ public class P25P2AudioModule extends AmbeAudioModule implements IdentifierUpdat public List process(String value) { - mLog.debug("Processing AMBE Tone Metadata Value: " + value); if(value != null) { if(mLastInput != null && mLastInput.equalsIgnoreCase(value)) diff --git a/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2DecoderState.java b/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2DecoderState.java index db9fa4d6..6bc7c597 100644 --- a/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2DecoderState.java +++ b/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2DecoderState.java @@ -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: diff --git a/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2MessageFramer.java b/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2MessageFramer.java index e5c0cd90..5b1bb2d0 100644 --- a/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2MessageFramer.java +++ b/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2MessageFramer.java @@ -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 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 // 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 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 { mLog.error("Error", ioe); } -// mLog.debug(message.toString()); + + mLog.debug(message.toString()); } });