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

SubGhz: add cmd CLI "subghz tx_from_file"

Open Skorpionm opened this issue 1 year ago • 4 comments

What's new

  • SubGhz: add cmd CLI "subghz tx_from_file

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

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

Skorpionm avatar Dec 20 '23 07:12 Skorpionm

Compiled f7 firmware for commit 79a28260:

github-actions[bot] avatar Dec 20 '23 12:12 github-actions[bot]

PVS-Studio report for commit 47750153:

github-actions[bot] avatar Dec 20 '23 12:12 github-actions[bot]

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

rcork avatar Dec 20 '23 20:12 rcork

Это сработало. Мне удалось использовать 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 avatar Dec 21 '23 09:12 Skorpionm