I am testing an interoperability between modems. one of my modem did support JANUS and I believe UnetStack base Subnero Modem Phy[3]
also support JANUS. How can i send and record JANUS signal which i can use for preliminary testing for other modem ? Can someone please provide basic snippet ?
How do i record JANUS signal as wav file?
320 views Asked by Jay Patel At
2
There are 2 answers
1
On
- I have an issue while recording the signal. Modem refuse to send the
JANUS
frame. It looks like something is not correctly set on my end, speciallyfmin = 12000.0
,fstep = 160.0
andhops = 13
. The Actual modem won't let me set thefmin
to9520.0
and automatically configured on lowestfmin = 12000
. How can i calculate corresponding parameters forfmin=12000
. - Although your suggestion do work on the
unet audio
.
Here is my modem logs:
> phy[3]
« PHY »
[org.arl.unet.DatagramParam]
MTU ⤇ 0
RTU ⤇ 0
[org.arl.unet.phy.PhysicalChannelParam]
dataRate ⤇ 64.0
errorDetection ⤇ true
fec = 7
fecList ⤇ [LDPC1, LDPC2, LDPC3, LDPC4, LDPC5, LDPC6, ICONV2]
frameDuration ⤇ 1.0
frameLength = 8
janus = true
llr = false
maxFrameLength ⤇ 56
powerLevel = -10.0
[org.arl.yoda.FhbfskParam]
chiplen = 1
fmin = 12000.0
fstep = 160.0
hops = 13
scrambler = 0
sync = true
tukey = true
[org.arl.yoda.ModemChannelParam]
basebandExtra = 0
basebandRx = true
modulation = fhbfsk
preamble = (2400 samples)
test = false
threshold = 0.3
valid ⤇ false
> phy << new TxJanusFrameReq()
REFUSE: Frame type not setup correctly
phy >> FAILURE: Timed out
UnetStack indeed has an implementation of JANUS that is, by default, configured on
phy[3]
.You can check this on your modem (the sample outputs here are from
unet audio
SDOAM, and so your modem parameters might vary somewhat):(I have dropped a few parameters that are not relevant to the discussion here to keep the output concise)
The key parameters to take note of:
modulation = fhbfsk
andjanus = true
setup the modulation for JANUSfmin = 9520.0
,fstep = 160.0
andhops = 13
are the modulation parameters to setupfhbfsk
as required by JANUSfec = 7
choosesICONV2
from thefecList
, as required by JANUSthreshold = 0.0
indicates that reception of JANUS frames is disabledNOTE: If your modem is a Subnero M25 series, the standard JANUS band is out of the modem's ~20-30 kHz operating band. In that case, the JANUS scheme is auto-configured to a higher frequency (which you will see as
fmin
in your modem). Do note that this frequency is important to match for interop with any other modem that might support JANUS at a higher frequency band.To enable JANUS reception, you need to:
To avoid any other detections from CONTROL and DATA packets, we might want to disable those:
At this point, you could make a transmission by typing
phy << new TxJanusFrameReq()
and put a hydrophone next to the modem to record the transmitted signal as a wav file.However, I'm assuming you would prefer to record on the modem itself, rather than with an external hydrophone. To do that, you can enable the loopback mode on the modem, and set up the modem to record the received signal:
Now if you do a transmission, you should see a
RxBasebandSignalNtf
with the captured signal:That notification has your signal in baseband complex format. You can save it to a file:
To convert to a wav file, you'll need to load this signal and convert to passband. Here's some example Python code to do this:
NOTE: You will need to replace the
fd
andfc
of12000
respectively, by whatever is thefs
andfc
fields in your modem'sRxBasebandSignalNtf
. For Unet audio, it is 12000 for both, but for Subnero M25 series modems it is probably 24000.Now you have your wav file at 96 kSa/s!
You could also plot a spectrogram to check if you wanted to: