flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

Add wait/pause timing for subghz protocol playback

Open smolbun opened this issue 1 year ago • 8 comments

Description of the feature you're suggesting.

I came across a RF remote that uses princeton protocol, I can only replay it using the save .sub file from "Read RAW". Inspecting the signal out by replaying using the protocol directly shows ~7ms of pause/wait time before the next signal is played. In actuality the pause/wait time is ~9ms.

Would it be possible to measure the estimate of the pause/wait time and store it in the .sub similarly to how "TE" is measured?

URH image played directly using the protocol: image

[edit] One way I can get 9ms to to change the default 30 to 38

instance->encoder.upload[index++] = level_duration_make(false, (uint32_t)instance->te * 38);

If te is 244 then the pause/wait timing would be 244 * 38 = 9272us

Anything else?

No response

smolbun avatar May 15 '24 18:05 smolbun

@Skorpionm what do you think?

skotopes avatar May 22 '24 11:05 skotopes

I think this is some kind of custom Princeton. Normally the pause is 30*te. If this is changed, many systems based on the original protocol will stop working.

But is the receiver from this system definitely not receiving a signal with a pause of 7.5 ms?

Skorpionm avatar May 25 '24 15:05 Skorpionm

Yeah its not receiving at all, no matter how long I press it. I was thinking if it could be dynamically calculated instead, like by taking the maximum or the average pause timing then dividing by te. Would that be a safer approach instead?

smolbun avatar May 25 '24 17:05 smolbun

no, this will break the work of already saved Princeton files. since they do not store the duration of the pause between sendings. as an option, record the signal in Read raw mode with the threshold function enabled, only the useful signal will be recorded, almost without unnecessary noise

Skorpionm avatar May 26 '24 05:05 Skorpionm

Ah yeah make sense, currently I'm recording at as raw then decoding it if I need to analyze the transmission. Would it then be possible to introduce an optional parameter so that it can fall back to the default 30 if not specified?

smolbun avatar May 26 '24 14:05 smolbun

why are you decoding it? if it’s a simple keychain, then the parcels don’t change; if you’re trying to force the system for issuing orders in food court, I’m against it. Yes, and it’s wrong to drive in another crutch

Skorpionm avatar May 26 '24 17:05 Skorpionm

I'm confused with your response, the captured transmission is from my fan remote. I'm looking for a more efficient way to store the decoded transmission with a custom pause timing without having to use the raw transmission.

smolbun avatar May 26 '24 17:05 smolbun

check https://github.com/flipperdevices/flipperzero-firmware/pull/3671

Skorpionm avatar May 28 '24 16:05 Skorpionm

It works, I got Guard_time: 37. Thanks for the implementation, you may close this now.

smolbun avatar May 29 '24 03:05 smolbun