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

Partial transmission of RAW Subghz sub file #1141

Closed
samuel opened this issue Apr 21, 2022 · 3 comments
Closed

Partial transmission of RAW Subghz sub file #1141

samuel opened this issue Apr 21, 2022 · 3 comments

Comments

@samuel
Copy link
Contributor

samuel commented Apr 21, 2022

Describe the bug
A RAW file I created seems to be only partially transmitted based on the signal I capture using an RTL-SDR. According to the log the entire file was read (based on the on/off total durations in the log). I tried many times with slight changes to the raw sub file to make sure it's not a syntax error but always get some amount of truncation of the transmitted signal.

test.sub:

Filetype: Flipper SubGhz RAW File
Version: 1
Frequency: 433800000
Preset: FuriHalSubGhzPresetOok650Async
Protocol: RAW
RAW_Data: 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -1920 1860 -620 1860 -620 620 -1860 620 -1860 620 -1860 620 -1860 1860 -620 1860 -620 1860 -620 620 -1860 620 -1860 1860 -620 1860 -620 1860 -620 1860 -620 620 -9920 1860 -620 1860 -620 620 -1860 620 -1860 620 -1860 620 -1860 1860 -620 1860 -620 1860 -620 620 -1860 620 -1860 1860 -620 1860 -620 1860 -620 1860 -620 620 -9920

Received signal:
Screen Shot 2022-04-20 at 7 10 52 PM

Checking the durations and they match the logs:

>>> x = [int(k) for k in "620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -620 620 -1920 1860 -620 1860 -620 620 -1860 620 -1860 620 -1860 620 -1860 1860 -620 1860 -620 1860 -620 620 -1860 620 -1860 1860 -620 1860 -620 1860 -620 1860 -620 620 -9920 1860 -620 1860 -620 620 -1860 620 -1860 620 -1860 620 -1860 1860 -620 1860 -620 1860 -620 620 -1860 620 -1860 1860 -620 1860 -620 1860 -620 1860 -620 620 -9920".split(" ")]
>>> sum(k for k in x if k > 0)
57040
>>> sum(-k for k in x if k < 0)
69500

Compared to 26207457 [D][FuriHalSubGhz]: Async TX Radio stats: on 57040us, off 69500us, DutyCycle: 45%

To Reproduce
Steps to reproduce the behavior:

  1. Copy the test.sub file to the FlipperZero
  2. Transmit the raw file
  3. Record the transmitted signal using an SDR device
  4. Compare against the expected on/off durations

Expected behavior
The full signal to have been sent rather than partial.

Logs

26207310 [I][SubGhzFileEncoderWorker]: Worker start
26207337 [I][SubGhzFileEncoderWorker]: Start transmission
26207354 [I][SubGhzFileEncoderWorker]: End read file
26207414 [I][SubGhzFileEncoderWorker]: Stop transmission
26207417 [D][DolphinState]: icounter 60, butthurt 0
26207457 [D][FuriHalSubGhz]: Async TX Radio stats: on 57040us, off 69500us, DutyCycle: 45%
26207507 [I][SubGhzFileEncoderWorker]: Worker stop

Target
Specify the target

Additional context
Using the latest firmware (0.55.1). Capture signal using an RTL-SDR and a HackRF to verify that it's not the receiving side showing the issue.

@Skorpionm
Copy link
Member

I will check tomorrow

@Skorpionm
Copy link
Member

Fix #1146
image

if the last duration is very important, then either end with a high level or make an additional period, or simply repeat the send as a whole. anyway, 1 time is not enough for the receiver

image

@skotopes
Copy link
Member

Fixed in dev, will be included in 0.56.1

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

No branches or pull requests

3 participants