Skip to content

"subghz decode_raw /ext/subghz/file.sub" hangs/cause assert #2957

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

Closed
jamisonderek opened this issue Aug 8, 2023 · 0 comments
Closed

"subghz decode_raw /ext/subghz/file.sub" hangs/cause assert #2957

jamisonderek opened this issue Aug 8, 2023 · 0 comments
Assignees
Labels
Bug Sub-GHz Sub-GHz-related

Comments

@jamisonderek
Copy link
Contributor

Describe the bug.

Trying to use the decode_raw feature of the subghz CLI always appears to hang before decoding any signals. If you attach a debugger, you will see that it is actually an assertion caused by furi_check(subghz_device_registry_is_valid());

Reproduction

  1. copy a RAW file onto SD Card/subghz folder. (For example, copy /assets/unit_tests/subghz/doorhan_raw.sub into your subghz folder.)
  2. connect to the CLI (using serial port or https://lab.flipper.net/cli)
  3. confirm you have the proper path for the file. (For example, "storage list /ext/subghz" and confirm you see doorhan_raw.sub listed)
  4. use subghz decode_raw on the file (For example, "subghz decode_raw /ext/subghz/doorhan_raw.sub")

Target

subghz

Logs

Debug Output:
SubGhz decode_raw: Load_keystore keeloq_mfcodes OK
SubGhz decode_raw: Load_keystore keeloq_mfcodes_user ERROR

GDB output:
bt
#0  0x0800f29a in __furi_crash () at furi\core\check.c:166
#1  0x0801f4d4 in subghz_devices_get_by_name (device_name=device_name@entry=0x0) at lib\subghz\devices\devices.c:16
#2  0x08023e1a in subghz_file_encoder_worker_start (instance=instance@entry=0x2000a6a0, file_path=0x2000a468 "/ext/subghz/doorhan_raw.sub", radio_device_name=radio_device_name@entry=0x0) at lib\subghz\subghz_file_encoder_worker.c:223
#3  0x08063922 in subghz_cli_command_decode_raw (cli=cli@entry=0x20004c58, args=args@entry=0x2000a3c0, context=context@entry=0x0) at applications\main\subghz\subghz_cli.c:545
#4  0x08063a9a in subghz_cli_command (cli=0x20004c58, args=0x2000a3c0, context=0x0) at applications\main\subghz\subghz_cli.c:914
#5  0x08064e9e in cli_execute_command (cli=cli@entry=0x20004c58, command=command@entry=0x20032fc0, args=args@entry=0x2000a3c0) at applications\services\cli\cli.c:186
#6  0x08065abe in cli_handle_enter (cli=cli@entry=0x20004c58) at applications\services\cli\cli.c:235
#7  0x08065c0c in cli_process_input (cli=cli@entry=0x20004c58) at applications\services\cli\cli.c:357
#8  0x08065df8 in cli_srv (p=<optimized out>) at applications\services\cli\cli.c:471
#9  0x080118ce in furi_thread_body (context=0x20004ba0) at furi\core\thread.c:90
#10 0x0801187a in furi_thread_catch () at furi\core\thread.c:61

Anything else?

Adding subghz_devices_init() on line 543 and subghz_devices_deinit() on line 569 fixes the issue.

@skotopes skotopes added the Sub-GHz Sub-GHz-related label Aug 8, 2023
@skotopes skotopes self-assigned this Aug 8, 2023
@skotopes skotopes added the Bug label Aug 8, 2023
agarof pushed a commit to agarof/flipperzero-firmware that referenced this issue Aug 30, 2023
* Fixes flipperdevices#2957 - subghz decode_raw
* SubGhz: proper decode_raw fix

Co-authored-by: Aleksandr Kutuzov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Sub-GHz Sub-GHz-related
Projects
None yet
Development

No branches or pull requests

2 participants