Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add demodulation support for mono channel WAVE #852

Open
heeplr opened this issue Mar 21, 2021 · 8 comments
Open

Add demodulation support for mono channel WAVE #852

heeplr opened this issue Mar 21, 2021 · 8 comments
Labels

Comments

@heeplr
Copy link

heeplr commented Mar 21, 2021

I got this signal (WAV) which doesn't seem to have any common modulation (PWM?).

I'm not sure if importing it as demodulated signal would really help or even if those kind of signals are within the scope of urh, but it would be nice if they could be analyzed with urh.

The signal seems to be FSK with one pulse per bit. Short pulses = 0, Long pulses = 1.
First there's a preamble with some 1's, then it seems every 8 bit are followed by 2 stop bits.

@andynoack
Copy link
Collaborator

Actually your signal looks like FSK before demodulation...

@heeplr
Copy link
Author

heeplr commented Mar 27, 2021

Is it possible to demodulate this with URH? I don't seem to get reliable results (i.e. the preamble is mixed 0 and 1).
One Symbol seems to be ~20 samples since it's only one period. I tried with various settings from 2 to 130 samples per symbol. Can URH handle FSK modulation with 1 symbol per period?

@jopohl
Copy link
Owner

jopohl commented Mar 27, 2021

How did you capture this signal? URH uses instantaneous frequencies to demodulate FSK which relies on IQ signal format. Every common SDR should give you IQ data, but certainly demodulation will not work for a mono channel WAV.

@heeplr
Copy link
Author

heeplr commented Mar 27, 2021

@jopohl I recorded the signal with the soundcard input. It is a mono channel "audio" signal for inband signalling like a modem & a phone line.

@jopohl
Copy link
Owner

jopohl commented Mar 27, 2021

Ah that's interesting! URH is not really made to demodulate such a signal. It rather relies on the input from a SDR, capturing with the soundcard is an interesting use-case. What happens when you load a mono-channel WAV is, it will interpret it as "already demodulated" (i.e. should be a rectangular signal). Never thought of your use-case to be honest.

@heeplr
Copy link
Author

heeplr commented Mar 27, 2021

Thank you for clarifying.
Well, a lot of interesting stuff is happening in the audible spectrum :)
Honestly I thought it would be straightforward. URH is wonderful to analyze protocols so it was my first choice.
Mono WAVs being interpreted as "already demodulated" is exactly why I initially opened the issue (and thought would help). The WAVs I import offer "Signal View:" "Analog", "Demodulated" and "Spectrum" but the demodulated view differs from the analog one (and it's wrongly demodulated).
When I open the signal in an audio editor (audacity) it looks like the analog view in URH.

@jopohl
Copy link
Owner

jopohl commented Mar 27, 2021

It is not as straightforward as it appears at first sight. :)

URH is completely built upon IQ demodulation, therefore, it treats mono channel wavs as "already demodulated" because it has no way to demodulate it properly.
Having said that, it is certainly possible to demodulate the signal you provided. The challenge is to get it into URH without changing the whole demodulation framework.
If we do some math we might be able to transform the single channel wave into a complex format (read: double channel wave) and use URH's existing demodulation methods. Let me reopen this issue and change the title a bit.

@jopohl jopohl reopened this Mar 27, 2021
@jopohl jopohl changed the title Import WAV as demodulated signal Add demodulation support for mono channel WAVE Mar 27, 2021
@jopohl jopohl added the feature label Mar 27, 2021
@mir123
Copy link

mir123 commented Apr 28, 2023

This would also be fantastic for all of the acoustic (i.e. underwater) data protocols out there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants