antirez / protoview

Flipper Zero app to display known and unknown signals
BSD 2-Clause "Simplified" License
510 stars 18 forks source link

Flipper can not replay saved file .... #14

Open DavidIgor opened 1 year ago

DavidIgor commented 1 year ago

Hi , it looks like modulation issue ?

DavidIgor commented 1 year ago

it just display : "cannot parse file "

ErSeraph commented 1 year ago

I found a potential fix, but cannot try it right now, but you can open the raw file now:

If you edit your file on notepad you will see that "Protocol: RAW" is not escaped, and some other code is escaped and it's not needed.

Example, before the edit: Filetype: Flipper SubGhz RAW File Version: 1 Frequency: 433920000 Preset: FuriHalSubGhzPresetCustom Custom_preset_module: CC1101 Custom_preset_data: 02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 93 10 6A 15 41 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 Protocol: RAW RAW_Data: ........

After the edit: Filetype: Flipper SubGhz RAW File Version: 1 Frequency: 433920000 Preset: FuriHalSubGhzPresetCustom Custom_preset_module: CC1101 Custom_preset_data: 02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 93 10 6A 15 41 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 Protocol: RAW RAW_Data: .........

Focus on "Custom_preset_data" and "Protocol: RAW", I managed to read the file with the Flipper, you can open it but i didn't tried it yet

DavidIgor commented 1 year ago

yes , it worked ! I added also custom modulations in setup file (according to custom preset data) , however when I create tpms signal in app it wont do anything .... any suggestions? I use sensor ID from my read with protoview app.

DavidIgor commented 1 year ago

I have recorder low pressure warning from my wheel (recorded on HackRF) when I reply it with HackRF it brings warning light on dashboard of my car. tested to capture and save with protoview app ....it captures it correctly as renault tpms with low pressure , but replaying it with app wont do anything .... nothing happen even if I replay saved file.

ErSeraph commented 1 year ago

Me too, file fixed but cannot replay correctly

DavidIgor commented 1 year ago

I want it to work! hhh noticed strange thing with sensor IDs as hackrf reads different than protoview ... not sure which is correct ... I will have to investigate

thedroidgeek commented 1 year ago

There's 2 bugs in the capture file generation code for custom modulations, which cause the resulting custom preset data line to lack PATABLE bytes and a line feed.

You can try manually adding 00 00 C0 00 00 00 00 00 00 00 at the end of the preset data line to make it work.

I might make a pull request if I get around to fixing the code in a clean way.

DavidIgor commented 1 year ago

@thedroidgeek like this? and also creating new custom modulation in settings file?

Filetype: Flipper SubGhz RAW File Version: 1 Frequency: 433920000 Preset: FuriHalSubGhzPresetCustom Custom_preset_module: CC1101 Custom_preset_data: 02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 93 10 6A 15 41 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00 Protocol: RAW RAW_Data: .........

thedroidgeek commented 1 year ago

Yes, but there's no need to modify the settings file.

DavidIgor commented 1 year ago

@thedroidgeek ok copy that! but It may allow me to use modulation outside of protoview ...right?

thedroidgeek commented 1 year ago

Could you stop asking pointless questions and try to use some common sense? Why the hell would we have to include preset data in the capture file if it's not to avoid having to add it in the settings file also?

antirez commented 1 year ago

I had the lack of PTABLE somewhere noted in a private TODO file. Then got trapped in the LoRa things and forgot to fix it.

DavidIgor commented 1 year ago

@ErSeraph there is also end part of the modulation that is missing in sub file as per @thedroidgeek comment. Note: still nothing happens when replying saved or created file . I did added said modulation to my settings file and recorded raw signal but even this way it won't work.

DavidIgor commented 1 year ago

@thedroidgeek sorry for misunderstanding I was just trying to make it work outside of the app.

thedroidgeek commented 1 year ago

@DavidIgor No I'm the one that should apologize, sorry for my tone. You seem to own a HackRF though, so you should be able to debug and figure out how to fix stuff yourself. Universal Radio Hacker is a useful tool for decoding data to make sure you're transmitting the right stuff. Good luck.

@antirez Well done on the app, I appreciate people like you that thoroughly document their work. I've already submitted a PR for this fix ICYMI.

DavidIgor commented 1 year ago

@thedroidgeek all good, I do own hackrf with portapack but only for month or so ... lot to learn ! URH is great thanks for tip. Im currently using TPMS app with portapack and protoview in flipper.