Shmuma / flipper-zero-pocsag

9 stars 1 forks source link

Does the example work? #1

Open antirez opened 1 year ago

antirez commented 1 year ago

Hi! I wanted to use your example as a fundation for low-level data capturing using 2FSK modulation (or other modulations, so that we don't need to do decoding directly on the Flipper CPU). I'm not getting any data: the read callback is called, but when we enter pocsag_tx_rx_worker_rx() the pipe is always empty. I wonder if the example is working for you, and is just that I'm not receiving any valid signal.

I even tried to disable not just the preamble detection for CC1101 (as you did), but also the detection of minimum singal RSI, and still I'm not getting any data. Shouldn't the chip return garbage, at least, even if we have no valid signal? I don't understand why the pipe is always empty. Thanks.

antirez commented 1 year ago

P.S. I just discovered that the code that performs the initialization of the subghz system, that is:

        pocsag_hal_reset();
        furi_hal_gpio_init(&gpio_cc1101_g0, GpioModeInput, GpioPullNo, GpioSpeedLow);
        furi_hal_subghz_set_frequency_and_path(instance->frequency);
        furi_hal_subghz_flush_rx();

If you stop and start the thread again (pressing stop receive, and then receive in the UI), once the initialization is performed the second time, the subghz system stops working and the CC1101 will start reporting just bogus data.