portapack-mayhem / mayhem-firmware

Custom firmware for the HackRF+PortaPack H1/H2/H4
https://hackrf.app
GNU General Public License v3.0
3.55k stars 570 forks source link

Portapack H2 19kHz stereo pilot at Headset #2226

Closed IvanRadolo closed 3 months ago

IvanRadolo commented 3 months ago

Description of the feature you're suggesting.

Now high frequenies for some reasons are blocked so there is not possible to see the 19khz and other freq that can portapack give out to the headset output. Maybe also would be possible to output all freq and also 57kHz RDS modulation.

Anything else?

Is possible to add a stereo decoder so stereo can be applied to the headset output?

zxkmm commented 3 months ago

Now high frequenies for some reasons are blocked

Could you please explain this more clearly? Define "blocked out", and which specific frequencies?

Maybe also would be possible to output all freq and also 57kHz RDS modulation.

This freq is too low and out of hackrf freq range. both 57kHz and 19khz.

IvanRadolo commented 3 months ago

When I record HackRF headset output with PC audio editing software I don't see stereo pilot signal at 19kHz on the recording, when recording standard radio it pass all the frequencies.

No, its not low freq because it do not need to receieve it, its on the listening frequiency rang on the headset output, it's deviation frequency and single channel audio is from 0 to 16kHz then starts pilot at 19 khz and then codes the difference between left and right channel after the 19 kHz pilot code. It's the MPX coding method.

zxkmm commented 3 months ago

I got you.
Sorry about my misread, I don’t quite familiar with this field and also I don’t quite know what’s MPX coding. I hope @Brumi-2021 have more information about your request.

Brumi-2021 commented 3 months ago

Hi @IvanRadolo , (and @zxkmm ) Not sure if that open - issue , is a bug claim or suggested feature request ?

I do not think we have any bug on it . Let me try to clarify it , adding several comments about it : 1-) when we are tuning any commercial FM with Audio RX App , we can see on top of the waterfall a part of the the FFT MPX spectrum . In that part FFT is runing with fs sample rate of 96khz , that is why we can see a max. FFT of 48khz (fs / 2 ) . Therefore we can see the 19khz stereo carrier tone peak - when tuning a stereo FM Broadcasting - , and also the DSB (L-R) on 38khz (that should work in current FW) ,
image

but nowadays we can not see the RDS 57Khz BPSK spectrum part. I also would be interested to see that RDS 57Khz tone . (Technically it should be possible if we make work that FFT Spectrum piece of code (with some changes) at example double SR. 96khz x 2 . Someday I may try it , but the current CPU is in The limit with those 48khz FFT Spectrum + waterfall + audio FM demodulation ...)

2-) But in any case, when you are using Audio Rx App, the recorded audio baseband are limited to 15khz -in current fw - , as any FM receiver. (in Auidio Rx Appp, Mayhem is not recording the MPX spectrum , just the audio baseband , that is why you will not see the 19Khz tone there ) . (but when you use the other Capture App, (for Replay usage ) , those recorded samples are not audio baseband, they are I,Q raw signal , and those ones, are including MPX -if you are REC at high enough SR or BW example 500khz or 250kz )

Regarding the FM stereo decoder implementation, I know how to do it using Hackrf + GNU Radio , but regarding direct C++ encoding in Mayhem , ..., I guess that, technically , it should be possible to do it , but I do not see it easy ... and moreover , now Mono FM decoding + Spectrum is already in the limit of CPU capability . Maybe removing the FFT spectrum we may have enough MIPS power to do it ... -just my guess - . In any case, I could help on it , but I can not implement it alone . We would need more skilled DSP - C++ sw engineer to implement it .

I hope , that you followed me . If anyone, wants to join to the party , I can support on it ! Cheers,

IvanRadolo commented 3 months ago

Hi @Brumi-2021,

I believe this is an unusual issue, not a typical bug.

As I mentioned, there is no stereo pilot signal on the analog headset output of the PortaPack. I recorded the output with my laptop, and it’s just pure mono with noise around 16 kHz—no 19 kHz pilot signal visible on the oscilloscope. However, when I record the output from my small mono battery radio, I can clearly see the 19 kHz pilot. How is it possible that the 19 kHz pilot is missing on the HackRF PortaPack headset output?

By the way, it would be great to have an option to disable the spectrum and add stereo decoding.

I have an off-topic question: since the HackRF currently doesn’t support stereo output, is there any other SDR device that can decode MPX to a stereo signal standalone? I have an audio-encoded MPX signal at 2 GHz.

Thank you, Ivan

Brumi-2021 commented 3 months ago

Hi @IvanRadolo , as I told you in my previous comment. Our fw is correct. It is design concept .(and I fully agree with it).

We are delivering to the headphone jack only the signal part that is audible , therefore we intentionally are filtering and cut the stereo pilot tone 19khz and DSB (L-R) of 38khz . (And same concept is applied to the recorded WFM mono REC WAV files)

BTW , Why do you need that MPX signal in the headset output ? Do you need it also in the recorded WFM REC WAV signal ? For which purpose ? We can already decode FM stereo signal with any dongle SDR or HackRF and external SDR program and PC . To me the only benefit would be to have standalone Portapack stereo decoding / or not .

Depending on your answer , let’s consider potential enhancement feature , but personally I do not see so much benefit. (to me, there is not big deal , just send the MPX signal to the headset output jack, because you would still need an external PC to decode that stereo signal ).

Regarding your recorded stereo audio signal from 2Ghz , in which format do you have it ? If it is in IQ raw signal , for sure that any SDR PC program can decode it .

cheers

IvanRadolo commented 3 months ago

Hi @Brumi-2021 ,

I need to tunnel the MPX signal and feed it to another transmitter. When decoding stereo on a PC, there’s a latency of approximately ±100ms. The 2GHz frequency uses the same modulation as standard FM frequencies, and I’ve successfully decoded it with WFM, including stereo decoding on the PC.

If it's not possible to achieve this through software, is there perhaps a schematic for a PortaPack that would allow me to obtain the modulation directly after the demodulator?

Thank you, Ivan

Brumi-2021 commented 3 months ago

Hi @IvanRadolo , Ok , are you available in discord ? I can easily check to bypass the current LPF 15khz or modify it to handle the 19khz , but that would not enough... you need the full MPX !

I need to check the SR that we are using in WFM for the headset . But as far as I remeber , I think that we are running the audio codec (WM8731 or AK4951K) at 48khz in WFM , (24khz in NFM and 12khz in AM) , in that case, now the max audio headset output bandwith in WFM would be 24khz. If so , just bypassing the 15Khz LPF , we could send the 19khz tone , but not the full MPX DSB @38khz .

I think we will need to increase the audio codec SR to 96khz to handle it , and that needs to be carefully check .

Cheers

IvanRadolo commented 3 months ago

Hello @Brumi-2021 ,

Add me as a friend on Discord! Invite expires in 1 week: https://discord.gg/9vVe49kD

Strange that is cut at 15kHz as usually more than 17kHz is not audible and also most radio stations goes up to 15,3 kHz - 15,7 kHz, with new audio processors it's possible to receive 17 kHz with stereo.

MPX signal also contains RDS data at 57kHz for that SR must be 192 kHz, I don't know how much portpack card analog output can support.

Thank You, Ivan

Brumi-2021 commented 3 months ago

Hi @IvanRadolo I think we can close that request .

We could implement your strict title request : of adding through headset out the FM 19khz stereo pilot tone. But after understanding your final goal application, we realized that you need the full MPX signal, not just the pilot tone .

As we have discussed by direct chat, to handle composite Multiplex signal (MPX out, through headset jack -that it has around 60khz bandwith excluding other SCA's services-, we will need to run SR audio codec to 192khz , but currently WM8731 (SR 96KHZ max) , AK4951K (SR 48KHZ max) , therefore , due to hw audio codec device limitations, we can not handle that enhancement issue request .

MPX = Audio Mono (L+R) baseband + 19khz tone + AM DSB 38Khz suppressed carrier (23k to 53khz L-R) + 57Khz RDS BPSK signal .

Sorry about that !