scapysniffergnuradioz-wavegnuradio-companion

Manage multiple signal speed in a Gnu-Radio flow graph


I am currently working on Z-Wave protocol. With my HackRF One and scapy-radio I try to sniff the communications between two devices.

However devices can transmit at different speeds :

As I can only decode communications at 40 kbps, I imagine my graph is unable to manage other speeds.

Some informations about Z-Wave communications :

And my GRC graph :

GRC flow graph

So my question is : How to modify the graph to decode and sniff 9,6 and 100 kbps signal too ?


Solution

  • As an easy workaround, I would suggest to take the input stream from the HackRF and connect it into 3 different decoders, each one with the desired parameters. Then each Packet sink block will publish messages at the same Socket PDU block.

    I am not familiar with the Z-Wave, but if the 3 different data rates share the same spectrum bandwidth, then there is no more job for you and you are done. But if they do, which I believe that is true for your case, you need some extra steps.

    First of all you have to sample the time domain signal with the maximum sampling rate required by the Z-Wave. For example, if for the 3 different data rates the spectrum bandwidth is 4, 2 and 1 MHz you have to sample with 4e6 samples/s. Then you perform SRC (Source Rate Conversion), also known as re-sampling, for each of the different streams. So for the second rate you may want to re-sample your input stream of 4e6 samples/s to 2e6 samples/s. Then you connect re-sampled streams at the corresponding decoding procedures

                                                  +---------------+
                                                  |Rest blocks 0  |
                  +--------------------------------->             |
                  |                               |               |
                  |                               +---------------+
                  |                                                
     +------------+        +--------------+           +---------------+
     |            |        |              |           |Rest blocks 1  |
     | Source     +----------> Resampler 1+------------->             |
     |            |        |              |           |               |
     +------------+        +--------------+           +---------------+
                  |                                                
                  |    +--------------+           +---------------+
                  |    |              |           |Rest blocks 2  |
                  +-----> Resampler 2+-------------->             |
                       |              |           |               |
                       +--------------+           +---------------+
    

    GNU Radio already ships with some resamplers, you can start using the Rational Resampler block.