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

SubGhz: add subghz tx_from_file CLI cmd, major TX flow refactoring, various improvements and bug fixes #3302

Merged
merged 23 commits into from
Jan 15, 2024

Conversation

Skorpionm
Copy link
Member

@Skorpionm Skorpionm commented Dec 20, 2023

What's new

  • SubGhz: add cmd CLI "subghz tx_from_file
  • SubGhz: refactor TX control flow, fix various bugs and condition races

Verification

  • Plays *.sub files
    CLI: subghz tx_from_file <file_name> [<repeat: count> <device: 0 - CC1101_INT, 1 - CC1101_EXT>]
    default value:
    repeat = 10
    device = CC1101_INT
    Examination. Launch CLI, run the command "subghz tx_from_file /any/subghz/file.sub" file.sub - pre-saved SubGhz file
  • Full set of subghz tests, especially TX part

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

Copy link

github-actions bot commented Dec 20, 2023

Compiled f7 firmware for commit 79a28260:

Copy link

github-actions bot commented Dec 20, 2023

PVS-Studio report for commit 47750153:

@rcork
Copy link

rcork commented Dec 20, 2023

This worked. I was able to use the CLI to replay a RAW .sub file. I tested with two different sub files and both worked in turning on and off a light that uses an RF remote. The only thing that looks strange is that there is an ERROR message on the command line but it worked regardless. Here is the output when i ran the command.

: subghz tx_from_file /ext/subghz/cabinet_off.sub 1 0
subghz tx_from_file: Load_keystore keeloq_mfcodes OK
subghz tx_from_file: Load_keystore keeloq_mfcodes_user ERROR
Listening at /ext/subghz/cabinet_off.sub. Frequency=915000000, Protocol=BinRAW

@Skorpionm
Copy link
Member Author

Это сработало. Мне удалось использовать CLI для воспроизведения файла RAW .sub. Я тестировал два разных подфайла, и оба работали при включении и выключении света с помощью радиочастотного пульта дистанционного управления. Единственное, что выглядит странно, это то, что в командной строке есть сообщение ОШИБКА, но оно все равно работает. Вот результат, когда я выполнил команду.

: subghz tx_from_file /ext/subghz/cabinet_off.sub 1 0
subghz tx_from_file: Load_keystore keeloq_mfcodes OK
subghz tx_from_file: Load_keystore keeloq_mfcodes_user ОШИБКА
Прослушивание в /ext/subghz/cabinet_off.sub. Частота=915000000, Протокол=BinRAW

it's not a mistake. this means that you don’t have the keeloq_mfcodes_user file, but yes, I’ll change the message now

@Skorpionm Skorpionm marked this pull request as ready for review December 21, 2023 09:46
@hedger hedger added the Sub-GHz Sub-GHz-related label Dec 24, 2023
@skotopes skotopes changed the title SubGhz: add cmd CLI "subghz tx_from_file" SubGhz: add subghz tx_from_file CLI cmd, major TX flow refactoring, various improvements and bug fixes Jan 15, 2024
@skotopes skotopes merged commit d73d007 into dev Jan 15, 2024
9 checks passed
@skotopes skotopes deleted the skorp/subghz_tx_from_file branch January 15, 2024 05:38
RogueMaster pushed a commit to RogueMaster/flipperzero-firmware-wPlugins that referenced this pull request Feb 13, 2024
… various improvements and bug fixes (flipperdevices#3302)

By Skorpionm
* SubGhz: add cmd CLI "subghz tx_from_file"
* SubGhz:  add sending raw.sub files
* SubGhz: add load custom preset
* SubGhz: remove unnecessary files
* SubGhz: change message
* SubGhz: fix printf formatting
* SubGhz: Cli refactoring code
* FuriHal: add furi_hal_subghz Tx Rx IDLE state switching test
* SubGhz: remove debug code, fix ext driver compilation
* SubGhz: cleanup code, move wait status routine to cc1101 driver
* SubGhz: proper pin mode transition in tx stop isr routine, proper DMA and ISR priorities, fix issue with async tx stuck
* SubGhz: simplify async tx stop flow, fix ISR ARR check condition race
* SubGhz: check ARR only when we transmitting
* SubGhz: check ARR only when we transmitting for ext cc1101
* SubGhz: lower ISR priorities to safe level
* SubGhz: proper gpio config, comments update

Co-authored-by: あく <alleteam@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sub-GHz Sub-GHz-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants