urh icon indicating copy to clipboard operation
urh copied to clipboard

Saving as Flipper Zero format (.sub) seems to be wrong

Open ahuri opened this issue 1 year ago • 4 comments

Expected Behavior

I recorded a signal that took less than a second to send and saved it as Flipper Zero format (.sub). Expected to use the Flipper device for sending this signal.

Actual Behavior

A very long file was created, hundreds of lines. It took more than a minute to Flipper to send its content, until I stopped it before ending.

Steps To Reproduce
  1. Go to "Record Signal" window.
  2. Record a signal.
  3. Save it with ".sub" extension.
  4. Copy the file to Flipper Zero device and try to broadcast it.
Screenshots

The original signal: Screenshot from 2023-10-19 12-28-45

The signal Flipper sends after saving the original signal as ".sub" format (stopped before ending): Screenshot from 2023-10-19 12-31-07

Platform Specifications
  • OS: Ubuntu 22.04.3
  • URH version: 2.9.4
  • Python version: 3.10.12
  • Installed via pip3

ahuri avatar Oct 19 '23 09:10 ahuri

Hey @ahuri, saving as .sub does only work under certain conditions. Please use the new Export button in the generator, this should produce better results. However, note that using the .sub format or the Flipper in general means a dramatic signal quality loss (precision is only 1 bit!) because the Flipper is NOT exactly a SDR. Recently I also discovered some problems with a Flipper replay (maybe my setup or use case...), so please keep me updated.

andynoack avatar Oct 19 '23 21:10 andynoack

Until now I have not managed to emulate a replay attack successfully using the Flipper. I used an SDR to track the signal emulation of the Flipper in comparison to the original signal; they look very different. The idea was to capture a signal using URH, save it in the Flipper, and try to send it. But as I mentioned, it does not work.

ahuri avatar Oct 20 '23 08:10 ahuri

I recorded a signal at 906.40MHz, but the exported .sub file contained these lines:

Filetype: Flipper SubGhz RAW File
Version: 1
Frequency: 433920000
Preset: FuriHalSubGhzPresetOok650Async
Protocol: RAW

which has the wrong frequency. Also, the original recording was 5.5MB big, the .sub file only 4.7KB.

Please use the new Export button in the generator, this should produce better results.

I installed urh via pip and don't see an export button there.

godmar avatar Jul 26 '24 14:07 godmar

I think I know the answer to my question: https://github.com/jopohl/urh/issues/989#issuecomment-1218792851 - the exported .sub file hardwires the frequency regardless of the actual value.

godmar avatar Jul 26 '24 14:07 godmar