Merge pull request #783 from derskythe/fix/docs-formating

fix: remove not printable symbols and update FAQ and BadUSB documenta…
This commit is contained in:
MMX 2024-07-27 06:30:06 +03:00 committed by GitHub
commit 6a86a1390a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 595 additions and 556 deletions

View file

@ -16,18 +16,18 @@ Only two parameters are mandatory: **appid** and **apptype**. Others are optiona
- **apptype**: member of FlipperAppType.\* enumeration. Valid values are:
| Enum member | Firmware component type |
| ----------- | ------------------------------------------------------------------------------------------- |
| SERVICE | System service, created at early startup |
| SYSTEM | Application is not being shown in any menus. It can be started by other apps or from CLI |
| APP | Regular application for the main menu |
| PLUGIN | Application to be built as a part of the firmware and to be placed in the Plugins menu |
| DEBUG | Application only visible in Debug menu with debug mode enabled |
| ARCHIVE | One and only Archive app |
| SETTINGS | Application to be placed in the system settings menu |
| STARTUP | Callback function to run at system startup. Does not define a separate app |
| EXTERNAL | Application to be built as `.fap` plugin |
| METAPACKAGE | Does not define any code to be run, used for declaring dependencies and application bundles |
| Enum member | Firmware component type |
|:----------------|--------------------------------------------------------------------------------------------------|
| SERVICE | System service, created at early startup |
| SYSTEM | Application is not being shown in any menus. It can be started by other apps or from CLI |
| APP | Regular application for the main menu |
| PLUGIN | Application to be built as a part of the firmware and to be placed in the Plugins menu |
| DEBUG | Application only visible in Debug menu with debug mode enabled |
| ARCHIVE | One and only Archive app |
| SETTINGS | Application to be placed in the system settings menu |
| STARTUP | Callback function to run at system startup. Does not define a separate app |
| EXTERNAL | Application to be built as `.fap` plugin |
| METAPACKAGE | Does not define any code to be run, used for declaring dependencies and application bundles |
- **name**: name displayed in menus.
- **entry_point**: C function to be used as the application's entry point. Note that C++ function names are mangled, so you need to wrap them in `extern "C"` to use them as entry points.
@ -43,7 +43,7 @@ Only two parameters are mandatory: **appid** and **apptype**. Others are optiona
- **targets**: list of strings and target names with which this application is compatible. If not specified, the application is built for all targets. The default value is `["all"]`.
- **resources**: name of a folder within the application's source folder to be used for packacking SD card resources for this application. They will only be used if application is included in build configuration. The default value is `""`, meaning no resources are packaged.
#### Parameters for external applications
### Parameters for external applications
The following parameters are used only for [FAPs](./AppsOnSDCard.md):
@ -59,7 +59,10 @@ The following parameters are used only for [FAPs](./AppsOnSDCard.md):
- **fap_extbuild**: provides support for parts of application sources to be built by external tools. Contains a list of `ExtFile(path="file name", command="shell command")` definitions. `fbt` will run the specified command for each file in the list.
- **fal_embedded**: boolean, default `False`. Applies only to PLUGIN type. If `True`, the plugin will be embedded into host application's .fap file as a resource and extracted to `apps_assets/APPID` folder on its start. This allows plugins to be distributed as a part of the host application.
Note that commands are executed at the firmware root folder, and all intermediate files must be placed in an application's temporary build folder. For that, you can use pattern expansion by `fbt`: `${FAP_WORK_DIR}` will be replaced with the path to the application's temporary build folder, and `${FAP_SRC_DIR}` will be replaced with the path to the application's source folder. You can also use other variables defined internally by `fbt`.
> [!NOTE]
> These commands are executed at the firmware root folder, and all intermediate files must be placed in an application's temporary build folder.
> For that, you can use pattern expansion by `fbt`: `${FAP_WORK_DIR}` will be replaced with the path to the application's temporary build folder,
> and `${FAP_SRC_DIR}` will be replaced with the path to the application's source folder. You can also use other variables defined internally by `fbt`.
Example for building an app from Rust sources:

View file

@ -1,15 +1,16 @@
# This is a UPC-A Barcode Generator for the Flipper Zero hardware.
## Author: [McAzzaMan](https://github.com/McAzzaMan/flipperzero-firmware/tree/UPC-A_Barcode_Generator/applications/barcode_generator)
> Author: [McAzzaMan](https://github.com/McAzzaMan/flipperzero-firmware/tree/UPC-A_Barcode_Generator/applications/barcode_generator)
<img src=https://i.imgur.com/TDbo1tz.png>
<img src="https://i.imgur.com/TDbo1tz.png" alt="" />
It will eventually be expanded into other barcode types. It currently only generates UPC-A type barcodes.
<img src=https://i.imgur.com/bxTdzuA.png>
<img src="https://i.imgur.com/bxTdzuA.png" alt="" />
<b> -Controls- </b> </br>
Hitting the centre button on the Flipper toggles edit mode.
When in edit mode, left and right will change the digit to be changed, and up and down will adjust the digit value.
## Controls
<img src=https://i.imgur.com/lGbzdwH.png>
Hitting the `centre` button on the Flipper toggles edit mode.
When in edit mode, `Left` and `Right` will change the digit to be changed, and up and down will adjust the digit value.
<img src="https://i.imgur.com/lGbzdwH.png" alt="" />

View file

@ -1,215 +1,244 @@
# FAQ
## I bought Flipper Zero and I don't know what I can do with it, pls help
- Start with reading official main page: https://flipperzero.one/
- Then check out official docs where you can find answers to most questions: https://docs.flipper.net/
- Start with reading [official main page](https://flipperzero.one/)
- Then check out official docs where you can find answers to [most questions](https://docs.flipper.net/)
## How do I install Unleashed firmware?
https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToInstall.md
### What version I should install? What do letters `e`, `r`, `c`... mean?
Follow this link for details:<br>
https://github.com/DarkFlippers/unleashed-firmware/blob/dev/CHANGELOG.md#recommended-update-option---web-updater
See [this](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToInstall.md)
**INSTALLED UNLEASHED AND NOW BACKLIGHT DOESNT WORK?** <br>
Youve installed a version made for custom RGB modded flippers. The version ending in `“r”` is specifically for “RGB” modded flippers. <br>
Please do not use that version if your flipper isnt modded!
## What version I should install? What do letters `e`, `r`, `c`... mean?
Follow this link for [details](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/CHANGELOG.md#recommended-update-option---web-updater).
## INSTALLED UNLEASHED AND NOW BACKLIGHT DOESNT WORK?
Youve installed a version made for custom RGB modded flippers. The version ending in `r` is specifically for `RGB` modded flippers. <br />
Please, do not use that version if your flipper isnt modded!
## What apps (plugins) are included with Unleashed FW?
See default pack and extra pack (for `e` build) list here:<br>
https://github.com/xMasterX/all-the-plugins/tree/dev
See default pack and extra pack (for `e` build) list [here](https://github.com/xMasterX/all-the-plugins/tree/dev).
## Where I can find differences between original (official) firmware and Unleashed firmware?
Right here:<br>
https://github.com/DarkFlippers/unleashed-firmware#whats-changed
[Right here](https://github.com/DarkFlippers/unleashed-firmware#whats-changed)
## How to use SubGHz Remote app?
1. Open app, press Back button, select New map file
1. Open app, press `Back` button, select `New map file`
2. Configure signal files and their names for every button (also you can add only one signal and make other buttons empty - just don't select any files for them in config)
3. Save new map file
4. Open map file and select your previously created file
5. Use buttons to send subghz signal files that you selected in map config at step 2
## How to build (compile) firmware?
Follow this link:<br>
https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToBuild.md#how-to-build-by-yourself
Follow this [link](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/HowToBuild.md#how-to-build-by-yourself).
## I installed Unleashed firmware and now my mobile app doesn't connect to flipper ( OR I changed flipper device name and my mobile app now doesn't connect to flipper )
1. Click Forget flipper in mobile app
2. Open your phone settings - bluetooth, find flipper - if it present here - open its options and click forget device
3. On flipper itself open Settings -> Bluetooth -> Forget all devices -> and confirm
4. Make sure your flipper has bluetooth ON and open Mobile app and pair it to flipper
2. Open your `phone settings - bluetooth`, find flipper - if it present here - open its options and click forget device
3. On flipper itself open `Settings -> Bluetooth -> Forget all devices` and confirm
4. Make sure your flipper has bluetooth `ON` and open Mobile app and pair it to flipper
5. Done
## My desktop (pin, favourites, etc..) (or other) settings was reset to default after update, what to do?
Just configure that settings again, all is fine, and make sure you seen changelogs for the releases that came out after your previous version, when settings struct is changed, settings file are reset after update, this happens only when struct changes is required, so don't assume that settings will be reset in every release, this will happen only in specific ones
## Why is flipper not connecting to chrome?
The most common cause of the flipper not connecting to google chrome is having qFlipper open while trying to connect your flipper. Or having second flipper lab page open at same time.<br>
## Why is flipper not connecting to Chrome?
You must close qFlipper (or other flipper lab web pages) before attempting to connect your flipper to chrome.
The most common cause of the flipper not connecting to google chrome is having qFlipper open while trying to connect your flipper. <br />
Or having second flipper lab page open at same time.<br />
You must close qFlipper (or other flipper lab web pages) before attempting to connect your flipper to Chrome.
## Flipper doesn't work! How to restore firmware???
Follow this guide:<br>
https://docs.flipper.net/basics/firmware-update/firmware-recovery
Follow this [guide](https://docs.flipper.net/basics/firmware-update/firmware-recovery)
## Useful links and files
Flipper Awesome - place where you can find almost all links that you might need:<br>
https://github.com/djsime1/awesome-flipperzero
Dict files for iButton Fuzzer and RFID Fuzzer:<br>
https://t.me/flipperzero_unofficial_ru/37058 <br>
https://t.me/flipperzero_unofficial_ru/37072
UL Releases in Telegram:<br>
https://t.me/unleashed_fw <br>
UL Dev Builds in Telegram:<br>
https://t.me/kotnehleb <br>
Our Discord: <br>
https://discord.unleashedflip.com
Flipper Awesome - place where you can find almost all links that you might need:<br />
* [Awesome-FlipperZero](https://github.com/djsime1/awesome-flipperzero)
* Dict files for iButton Fuzzer and RFID Fuzzer:<br />
* https://t.me/flipperzero_unofficial_ru/37058 <br />
* https://t.me/flipperzero_unofficial_ru/37072
* UL Releases in [Telegram](https://t.me/unleashed_fw)
* UL Dev Builds in [Telegram](https://t.me/kotnehleb)
* Our [Discord](https://discord.unleashedflip.com)
## How to change flipper name?
All is simple:
1. Open Settings -> Desktop -> Change Flipper Name
2. Enter new name and click Save
1. Open `Settings -> Desktop -> Change Flipper Name`
2. Enter new name and click `Save`
3. Exit from settings - Flipper will automatically reboot
4. Done, you have custom name which will stay until you reset it to default or replace with new one
How to reset name to default:
1. Open Settings -> Desktop -> Change Flipper Name
## How to reset name to default?
1. Open `Settings -> Desktop -> Change Flipper Name`
2. Do not enter anything, just click Save
3. Exit from settings - Flipper will automatically reboot
4. Done, name is reset to original one.
## How do I copy files from Github to my Flipper Zero?
Follow this detailed guide: <br>
https://github.com/wrenchathome/flipperfiles/blob/main/_Guides/How2Flipper.pdf
## How do I copy files from GitHub to my Flipper Zero?
Follow this detailed [guide](https://github.com/wrenchathome/flipperfiles/blob/main/_Guides/How2Flipper.pdf).
## Where can I find “This file” or “That file” for my flipper?
These 2 repos will cover most(99.9%) of your needs:<br>
https://github.com/UberGuidoZ/Flipper/tree/main
<br>
https://github.com/UberGuidoZ/Flipper-IRDB/tree/main
These 2 repos will cover most (99.9%) of your needs:<br />
* https://github.com/UberGuidoZ/Flipper/tree/main
* https://github.com/UberGuidoZ/Flipper-IRDB/tree/main
## How can I support Unleashed firmware project?
https://github.com/DarkFlippers/unleashed-firmware#please-support-development-of-the-project
Please follow this [link](https://github.com/DarkFlippers/unleashed-firmware#please-support-development-of-the-project).
## What are the dev builds? Where I can get latest build for dev branch?
This is an automatic assembly of the latest commits from the repository that have not yet been released, the previous build is deleted when a new one is uploaded and old remains only as file in the telegram channel <br>
Be aware that this is not release ready builds! They may have bugs and issues, if you are using dev build and found issue, report it! In github issues
<br>
Dev builds is available in Discord, in channel - `unleashed-development` <br>
Builds also can be found here - https://t.me/kotnehleb <br>
And here - https://dev.unleashedflip.com/ <br>
This is an automatic assembly of the latest commits from the repository that have not yet been released, the previous build is deleted when a new one is uploaded and old remains only as file in the telegram channel
> [!CAUTION]
>
> Be aware that this is not release ready builds!
>
> They may have bugs and issues,
> if you are using dev build and found issue,
> report it! In [GitHub issues](https://github.com/DarkFlippers/unleashed-firmware/issues)
Dev builds is available in Discord, Win channel - `unleashed-development` <br />
Builds also can be found [here](https://t.me/kotnehleb).<br />
And [here](https://dev.unleashedflip.com/)<br />
## What is the update server?
We have our own update server https://up.unleashedflip.com/directory.json <br>
It is identical to the official one, it is impossible to change it in applications without rebuilding the application, it is hardcoded there <br>
If you want to use it, you need to patch or build your own build of the application you are interested in <br>
Also you can use it with uFBT to build apps for UL SDK, uFBT will accept that link as one of args<br>
We have our own update server https://up.unleashedflip.com/directory.json <br /><br />
It is identical to the official one, it is impossible to change it in applications without rebuilding the application, it is hardcoded there <br /><br />
If you want to use it, you need to patch or build your own build of the application you are interested in <br />
Also you can use it with uFBT to build apps for UL SDK, uFBT will accept that link as one of args<br />
The server will remain active and will be automatically updated
## External Radio: How to connect CC1101 module
https://github.com/quen0n/flipperzero-ext-cc1101
[Guide](https://github.com/quen0n/flipperzero-ext-cc1101)
## How to add extra Sub-GHz frequencies
https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzSettings.md
[Guide](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzSettings.md)
## How to use Flipper as new remote (Nice FlorS, BFT Mitto, Somfy Telis, Aprimatic, AN-Motors, etc..)
https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzRemoteProg.md
## How Can I Unlock/Remove SubGHz restriction?
If you are using Unleashed firmware - **all region locks are removed by default**!
[Guide](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/SubGHzRemoteProg.md)
Also there is a way to go outside of frequencies stated in CC1101 datasheet, but transmission on those frequencies may cause chip damage, make sure you know what you are doing! Do not edit this settings to bypass region lock since there is no region locks in unleashed, all chip supported frequencies will work without any extra steps.<br>
But, if you know that you need to bypass subghz chip safety restriction you can unlock the safety restriction which will allow you to go outside the chips supported frequency. <br>
This covers how to do it and information regarding the risks of damage to the flipper by doing so <br>
https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/DangerousSettings.md
## How Can I Unlock / Remove SubGHz restriction?
> [!TIP]
>
> If you are using Unleashed firmware - **all region locks are removed by default**!
Also, there is a way to go outside of frequencies stated in `CC1101 datasheet`, but transmission on those frequencies may cause chip damage, make sure you know what you are doing!
Do not edit this settings to bypass region lock since there is no region locks in unleashed, all chip supported frequencies will work without any extra steps.<br /><br />
But, if you know that you need to bypass subghz chip safety restriction you can unlock the safety restriction which will allow you to go outside the chips supported frequency. <br /><br />
This covers how to do it and information regarding the risks of damage to the flipper by doing so.
Please read [this](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/DangerousSettings.md) before.
## Can I clone a car key fob for my own car to use flipper as a key?
No, and trying to do so with Read RAW will lead to key desync or unpair with blacklist which means re-pair is very hard and requires service tools
## Will Unleashed FW support car keyfobs decoding, cloning, emulating?
No, never
## Where can I find jamming files?
Nowhere, this is illegal in almost every country in the world
## I saw something on tiktok and want to ask how to do it, I just wanna be like real hacker
And you might be banned for that in our communities, since 99% of that content is fake, or showing illegal actions, and we don't like tiktok related questions
## I saw something on TikTok and want to ask how to do it, I just wanna be like real hacker
And you might be banned for that in our communities, since 99% of that content is fake, or showing illegal actions, and we don't like TikTok related questions.
## I was banned in Unleashed Discord / Telegram / etc.. How to remove ban? I created GitHub issue and it was removed too!
## I was banned in Unleashed Discord/Telegram/etc.. How to remove ban? I created github issue and it was removed too!
Not possible, rules is rules, read them before sending messages in our communities
## How to clean .DS_Store and other dot files left from macOS
`sudo dot_clean -mn /Volumes/Flipper\ SD` -> `Flipper\ SD` may be named differently for you, replace with your microSD card name
## How to sort files on flipper microSD on macOS/Linux
`will make sorting faster, and will work for OFW`
1. `brew install fatsort` -> Install fatsort using brew.sh (only on macOS)
## How to sort files on flipper microSD on macOS / Linux?
Will make sorting faster, and will work for OFW
1. `brew install fatsort` -> Install fatsort using `brew.sh` (only on macOS)
2. `diskutil list` -> Find your disk name for flipper microSD
3. `diskutil unmount /Volumes/Flipper\ SD`
4. `sudo fatsort -n /dev/disk4s1` -> Replace `disk4s1` with your microSD id found on step 2
## Your Flipper feels slow and unresponsive?
1. Make sure you using good microSD card from known brand, flipper works with microSD via SPI that means not any microSD will work good even if it works ok with other devices
2. Go into **Settings -> System** and make sure that you have
`Log Level = None`
`Debug = OFF`
`Heap Trace = None`
If some of that settings is set to something different - change it to `None` / `OFF`
3. Make sure your battery is charged, that can affect performance too
## Flipper crashed, stuck, frozen ?
Reboot it by holding Left + Back buttons
1. Make sure you using good microSD card from known brand, flipper works with microSD via SPI that means not any microSD will work good even if it works ok with other devices.
2. Go into `Settings -> System` and make sure that you have
```text
Log Level = None
Debug = OFF
Heap Trace = None
```
3. If some of that settings is set to something different - change it to `None` / `OFF`
4. Make sure your battery is charged, that can affect performance too
## Flipper crashed, stuck, frozen?
Reboot it by holding `Left` + `Back` buttons
![how to reboot flipper gif, shows how to hold left and back button](https://media.tenor.com/eUbBDDEzmwMAAAAC/flipper-zero-flipper-zero-reboot.gif)
## How to reset forgotten Flipper pin code?
**Disconnect USB Cable if it was connected**
1. Turn off the device - hold back button -> Turn Off
1. Turn off the device - hold back button -> `Turn Off`
**If you can't turn it off, try next step but hold buttons for 30-40 seconds)**
2. Hold Up + Back for ~5 sec -> You will see reset screen -> Hold Right to reset (and down arrow to exit if you don't want to reset pin code)
2. Hold <kbd>Up</kbd> + <kbd>Back</kbd> for `~5 sec` -> You will see reset screen -> Hold <kbd>Right</kbd> to reset (and <kbd>Down</kbd> arrow to exit if you don't want to reset pin code)
3. Done, internal memory (dolphin level, settings, pin code, is erased to default settings)
## What are the differences between x, y and z firmware?
If you just got your flipper and not sure what will work better for you, start with original official firmware, if you think you need more features or want to remove subghz region locks then<br>
Try installing Unleashed firmware, which is fork of official firmware with many new features and preinstalled plugins (check out `e` build)<br>
In other case If you want to experiment more with UI and other things look for existing forks of Unleashed firmware<br>
Or create your own fork with your own customisations<br>
Also before reporting any found issue make sure you are in correct repo, if you are using not Unleashed but different fork or original firmware, do not report issue in Unleashed firmware repo or UL communities (telegram, discord, etc..)
If you just got your flipper and not sure what will work better for you, start with original official firmware, if you think you need more features or want to remove subghz region locks then:<br />
* Try installing **Unleashed firmware**, which is fork of official firmware with many new features and preinstalled plugins (check out `e` build).<br />
* In other case, If you want to experiment more with UI and other things look for existing forks of Unleashed firmware.<br />
* Or, create your own fork with your own customisations<br />
* Also, before reporting any found issue make sure you are in correct repo, if you are using not **Unleashed**, but different fork or original firmware, do not report issue in **Unleashed firmware** repo or UL communities (Telegram, Discord, etc..)
## Is there a correct way to capturing Infrared signals?
There is indeed especially with AC units, a new documentation has been released with some notes and steps on capturing infrared signals correctly along with some example data so you are able to understand the difference visually between the two.
https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/InfraredCaptures.md
[More info](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/documentation/InfraredCaptures.md)
## NFC / RFID FAQ
# NFC/RFID FAQ
From our good friend `@Equip` and `@np0` <br>
**------------------------------------------------------**
From our good friend `@Equip` and `@np0` <br />
### MIFARE Ultralight
- Scan the card, hold the Flipper Zero up to the reader to get the password to unlock the rest of the sectors, then scan the card again.
Scan the card, hold the Flipper Zero up to the reader to get the password to unlock the rest of the sectors, then scan the card again.
### MIFARE DESFire/MIFARE Ultralight C
### MIFARE DESFire / MIFARE Ultralight C
- The Flipper Zero has no available attacks for this card currently.
The Flipper Zero has no available attacks for this card currently.
### Bank cards
@ -219,60 +248,63 @@ From our good friend `@Equip` and `@np0` <br>
### Amiibos
- NTAG215. that's it. It's not going on a MIFARE Classic.
- `NTAG215`. That's it. It's not going on a MIFARE Classic.
- Currently, you cannot write Amiibos to new physical tags. yet.
### HID/iClass
### HID / iClass
- Picopass iClass can be read using the Picopass reader plugin
- `Picopass` iClass can be read using the `Picopass` reader plugin
- 26bit Picopass can be downgraded to H10301 RFID credentials (note, it is not guaranteed to work if the reader is not configured to read low frequency)
- Readers will need to be configured and have an LF RFID antenna in order to be read. Certain iClass readers are HF only, and do not have the ability to have LF configured
- **Emulation for Picopass** was added on July 26th, and the updated version can be found in latest releases of Unleashed firmware with apps preinstalled, or in official Apps Hub via Flipper Mobile app
- **Emulation for Picopass** was added on July 26th, and the updated version can be found in latest releases of **Unleashed** firmware with apps preinstalled, or in official Apps Hub via Flipper Mobile app
- Write support for personalization mode cards is doable with app
- The Seader app and a SAM expansion board < https://www.redteamtools.com/nard-sam-expansion-board-for-flipper-zero-with-hid-seos-iclass-sam/ > will allow reading more secure HID cards, which may be helpful in downgrade attacks
- The Seader app and a [SAM expansion board](https://www.redteamtools.com/nard-sam-expansion-board-for-flipper-zero-with-hid-seos-iclass-sam/) will allow reading more secure HID cards, which may be helpful in downgrade attacks
### LF-RFID
If you're wanting to make clones of low frequency RFID chips you need to write to T5577's. "Blanks" do not exist. All of the chips the Flipper Zero can interact with are read-only and cannot be overwritten or purchased blank.
T5577s are multiemulator chips that the Flipper Zero can program to be other tags
### Unknown Card/Fob
If you're wanting to make clones of low frequency RFID chips you need to write to T5577's. `Blanks` do not exist. All of the chips the Flipper Zero can interact with are read-only and cannot be overwritten or purchased blank.
If you have exhausted all options of scanning via NFC/RFID/PICOPASS then take a photo of:
T5577s are multi-emulator chips that the Flipper Zero can program to be other tags
### Unknown Card / Fob
If you have exhausted all options of scanning via NFC / RFID / PICOPASS then take a photo of:
- The front and back of your credential
- The reader you use with the credential
- If your credential is a card, hold it up to a very bright light source e.g. a lightbulb and take a photo of the exposed antenna. This is useful for identification, post it for us to identify!
**------------------------------------------------------**
## How do I access the CLI / Logs?
To access the Serial CLI, click one of the following based on your platform.
## How do I access the CLI/Logs?
<blockquote>
To access the Serial CLI, click one of the following based on your platform.
<details>
<summary>Desktop web browser*</summary>
<em>*Chromium browsers only, such as: Google Chrome, Microsoft Edge, Opera/Opera GX, Brave, and Vivaldi.</em>
<em>*Chromium browsers only, such as: Google Chrome, Microsoft Edge, Opera / Opera GX, Brave, and Vivaldi.</em>
<ul>
<li>Connect your Flipper via USB.</li>
<li>Ensure qFlipper and any other serial terminals are closed.</li>
<li>Open <a href="https://my.flipp.dev/">my.flipp.dev</a> in one of the aforementioned browsers.</li>
<li>Click <kbd>CONNECT</kbd> and select "USB Serial Device" from the list.</li>
<li>Click <kbd>CONNECT</kbd> and select <kbd>USB Serial Device</kbd> from the list.</li>
<li>Wait until you can see your device details on screen.</li>
<li>Select the 💻 CLI item from the left sidebar.</li>
<li><strong>Done!</strong></li>
</ul>
</details>
</blockquote>
<blockquote>
<details>
<summary>Windows</summary>
<ul>
<li>Install <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html">PuTTY</a> if it isn't already.</li>
<li>Connect your Flipper via USB.</li>
<li>Open qFlipper and look for the COM port next to the Flipper's name. <em>(Should say COM followed by a number, like COM1)</em></li>
<li>Open qFlipper and look for the COM port next to the Flipper's name. <em> (Should say COM followed by a number, like <kbd>COM1</kbd>)</em></li>
<li>Take note of the COM port number.</li>
<li><strong>CLOSE qFlipper</strong>, otherwise the next steps won't work.</li>
<li>Open PuTTY and ensure you're on the Session screen.</li>
<li>Select "Serial" under connection type.</li>
<li>Set serial line to the COM port. <em>(Just COM followed by the number, like COM1)</em></li>
<li>Select <kbd>Serial</kbd> under connection type.</li>
<li>Set serial line to the COM port. <em> (Just COM followed by the number, like <kbd>COM1</kbd>)</em></li>
<li>Set speed to <code>115200</code></li>
<li><em>Optional: Save the session settings for easy connection later.</em></li>
<li>Finally, click <kbd>Open</kbd> to enter the CLI.</li>
@ -280,6 +312,8 @@ If you have exhausted all options of scanning via NFC/RFID/PICOPASS then take a
<li>If you get an "Access Denied" error, make sure qFlipper isn't running!</li>
</ul>
</details>
</blockquote>
<blockquote>
<details>
<summary>MacOS/Linux</summary>
<em>Note: I'm a filthy Windows user without any way to verify this procedure. Let me know if it's wrong!</em>
@ -295,6 +329,8 @@ If you have exhausted all options of scanning via NFC/RFID/PICOPASS then take a
<li><strong>Done!</strong></li>
</ul>
</details>
</blockquote>
<blockquote>
<details>
<summary>Android</summary>
<ul>
@ -308,16 +344,20 @@ If you have exhausted all options of scanning via NFC/RFID/PICOPASS then take a
<li><em>Note: To exit log mode, you'll have to disconnect and reconnect using the icon.</em></li>
</ul>
</details>
</blockquote>
<blockquote>
<details>
<summary>iPhone</summary>
Unfortunately, iOS is incapable of accessing a serial terminal over USB; try one of the other methods.
</details>
On the Flipper, open the settings, go to System, and set Log Level to Debug. <em>(You can keep Debug set to off unless someone asks you to turn it on)</em>
Once you have the CLI open, type <code>log</code> and press enter to start watching logs. Press <code>Ctrl-C</code> or <code>Cmd-C</code> to exit log mode.
Unfortunately, iOS is incapable of accessing a serial terminal over USB; try one of the other methods<br />
<ul>
<li>On the Flipper, open the settings, go to System, and set Log Level to Debug. <em>(You can keep Debug set to off unless someone asks you to turn it on)</em></li>
<li>Once you have the CLI open, type <code>log</code> and press enter to start watching logs. Press <kbd>Ctrl-C</kbd> or <kbd>Cmd-C</kbd> to exit log mode.</li>
</ul>
</details>
</blockquote>
<br>
<br>
<br />
<br />
**CLI FAQ Source + Check out this FAQ for more info:**
**CLI FAQ Source + Check out this FAQ for more info:**<br /><br />
https://github.com/djsime1/awesome-flipperzero/blob/main/FAQ.md

View file

@ -3,15 +3,21 @@
## Basic info
On system startup, most of the peripheral devices are under reset and not clocked by default. This is done to reduce power consumption and to guarantee that the device will always be in the same state before use.
Some crucial peripherals are enabled right away by the system, others must be explicitly enabled by the user code.
**NOTE:** Here and afterwards the word *"system"* refers to any code belonging to the operating system, hardware drivers or built-in applications.
> [!NOTE]
>
> Here and afterwards the word `system` refers to any code belonging to the operating system,
> hardware drivers or built-in applications.
To **ENABLE** a peripheral, call `furi_hal_bus_enable()`. At the time of the call, the peripheral in question MUST be disabled, otherwise a crash will occur to indicate improper use. This means that any given peripheral cannot be enabled twice or more without disabling it first.
To **ENABLE** a peripheral, call `furi_hal_bus_enable()`. At the time of the call, the peripheral in question **MUST** be disabled;
otherwise a crash will occur to indicate improper use. This means that any given peripheral cannot be enabled twice or more without disabling it first.
To **DISABLE** a peripheral, call `furi_hal_bus_disable()`. Likewise, the peripheral in question MUST be enabled, otherwise a crash will occur.
To **DISABLE** a peripheral, call `furi_hal_bus_disable()`. Likewise, the peripheral in question **MUST** be enabled, otherwise a crash will occur.
To **RESET** a peripheral, call `furi_hal_bus_reset()`. The peripheral in question MUST be enabled, otherwise a crash will occur. This method is used whenever it is necessary to reset all the peripheral's registers to their initial states without disabling it.
To **RESET** a peripheral, call `furi_hal_bus_reset()`. The peripheral in question MUST be enabled, otherwise a crash will occur.
This method is used whenever it is necessary to reset all the peripheral's registers to their initial states without disabling it.
## Peripherals
@ -22,26 +28,28 @@ Built-in peripherals are divided into three categories:
### Always-on peripherals
Below is the list of peripherals that are enabled by the system. The user code must NEVER attempt to disable them. If a corresponding API is provided, the user code must employ it in order to access the peripheral.
Below is the list of peripherals that are enabled by the system. The user code must **NEVER** attempt to disable them.
If a corresponding API is provided, the user code must employ it in order to access the peripheral.
*Table 1* - Peripherals enabled by the system
| Peripheral | Enabled at |
| :-----------: | :-----------------------: |
| DMA1 | `furi_hal_dma.c` |
| DMA2 | -- |
| DMAMUX | -- |
| GPIOA | `furi_hal_resources.c` |
| GPIOB | -- |
| GPIOC | -- |
| GPIOD | -- |
| GPIOE | -- |
| GPIOH | -- |
| PKA | `furi_hal_bt.c` |
| AES2 | -- |
| HSEM | -- |
| IPCC | -- |
| FLASH | enabled by hardware |
| Peripheral | Enabled at |
|:-------------:|:---------------------------:|
| DMA1 | `furi_hal_dma.c` |
| DMA2 | -- |
| DMAMUX | -- |
| GPIOA | `furi_hal_resources.c` |
| GPIOB | -- |
| GPIOC | -- |
| GPIOD | -- |
| GPIOE | -- |
| GPIOH | -- |
| PKA | `furi_hal_bt.c` |
| AES2 | -- |
| HSEM | -- |
| IPCC | -- |
| FLASH | enabled by hardware |
### On-demand system peripherals
@ -51,63 +59,64 @@ When not using the API, these peripherals MUST be enabled by the user code and t
*Table 2* - Peripherals enabled and disabled by the system
| Peripheral | API header file |
| :-----------: | :-------------------: |
| RNG | `furi_hal_random.h` |
| SPI1 | `furi_hal_spi.h` |
| SPI2 | -- |
| I2C1 | `furi_hal_i2c.h` |
| I2C3 | -- |
| USART1 | `furi_hal_serial.h` |
| LPUART1 | -- |
| USB | `furi_hal_usb.h` |
| Peripheral | API header file |
|:--------------:|:------------------------:|
| RNG | `furi_hal_random.h` |
| SPI1 | `furi_hal_spi.h` |
| SPI2 | -- |
| I2C1 | `furi_hal_i2c.h` |
| I2C3 | -- |
| USART1 | `furi_hal_serial.h` |
| LPUART1 | -- |
| USB | `furi_hal_usb.h` |
### On-demand shared peripherals
Below is the list of peripherals that are not enabled by default and MUST be enabled by the user code each time it accesses them.
Below is the list of peripherals that are not enabled by default and **MUST** be enabled by the user code each time it accesses them.
Note that some of these peripherals may also be used by the system to implement its certain features.
The system will take over any given peripheral only when the respective feature is in use.
*Table 3* - Peripherals enabled and disabled by user
| Peripheral | System | Purpose |
| :-----------: | :-------: | ------------------------------------- |
| CRC | | |
| TSC | | |
| ADC | | |
| QUADSPI | | |
| TIM1 | yes | subghz, lfrfid, nfc, infrared, etc... |
| TIM2 | yes | subghz, infrared, etc... |
| TIM16 | yes | speaker |
| TIM17 | yes | cc1101_ext |
| LPTIM1 | yes | tickless idle timer |
| LPTIM2 | yes | pwm |
| SAI1 | | |
| LCD | | |
| Peripheral | System | Purpose |
|:----------:|:------:|:----------------------------------------|
| CRC | | |
| TSC | | |
| ADC | | |
| QUADSPI | | |
| TIM1 | yes | subghz, lfrfid, nfc, infrared, etc... |
| TIM2 | yes | subghz, infrared, etc... |
| TIM16 | yes | speaker |
| TIM17 | yes | cc1101_ext |
| LPTIM1 | yes | tickless idle timer |
| LPTIM2 | yes | pwm |
| SAI1 | | |
| LCD | | |
## DMA
The DMA1,2 peripherals are a special case in that they have multiple independent channels. Some of the channels may be in use by the system.
The `DMA1`, `DMA2` peripherals are a special case in that they have multiple independent channels.
Some channels may be in use by the system.
Below is the list of DMA channels and their usage by the system.
*Table 4* - DMA channels
| DMA | Channel | System | Purpose |
| :---: | :-------: | :-------: | ------------------------- |
| DMA1 | 1 | yes | digital signal |
| -- | 2 | yes | -- |
| -- | 3 | | |
| -- | 4 | yes | pulse reader |
| -- | 5 | | |
| -- | 6 | yes | USART_Rx |
| -- | 7 | yes | LPUART_Rx |
| DMA2 | 1 | yes | infrared, lfrfid, subghz, |
| -- | 2 | yes | -- |
| -- | 3 | yes | cc1101_ext |
| -- | 4 | yes | cc1101_ext |
| -- | 5 | yes | cc1101_ext |
| -- | 6 | yes | SPI |
| -- | 7 | yes | SPI |
| DMA | Channel | System | Purpose |
|:------:|:-------:|:------:|:-----------------------------|
| DMA1 | 1 | yes | digital signal |
| -- | 2 | yes | -- |
| -- | 3 | | |
| -- | 4 | yes | pulse reader |
| -- | 5 | | |
| -- | 6 | yes | USART_Rx |
| -- | 7 | yes | LPUART_Rx |
| DMA2 | 1 | yes | infrared, lfrfid, subghz, |
| -- | 2 | yes | -- |
| -- | 3 | yes | cc1101_ext |
| -- | 4 | yes | cc1101_ext |
| -- | 5 | yes | cc1101_ext |
| -- | 6 | yes | SPI |
| -- | 7 | yes | SPI |

View file

@ -1,4 +1,3 @@
# How to Build by yourself:
## Install required software
@ -15,9 +14,10 @@ You should clone with
```shell
$ git clone --recursive https://github.com/DarkFlippers/unleashed-firmware.git
```
## VSCode integration
`fbt` includes basic development environment configuration for VS Code. Run `./fbt vscode_dist` to deploy it. That will copy the initial environment configuration to the `.vscode` folder. After that, you can use that configuration by starting VS Code and choosing the firmware root folder in the "File > Open Folder" menu.
`fbt` includes basic development environment configuration for VSCode. Run `./fbt vscode_dist` to deploy it. That will copy the initial environment configuration to the `.vscode` folder. After that, you can use that configuration by starting VSCode and choosing the firmware root folder in the `File > Open Folder` menu.
# Build on Linux/macOS
@ -31,7 +31,6 @@ Check out `documentation/fbt.md` for details on building and flashing firmware.
### Compile everything for development
```sh
./fbt updater_package
```
@ -44,8 +43,7 @@ Check out `documentation/fbt.md` for details on building and flashing firmware.
Check `dist/` for build outputs.
Use **`flipper-z-{target}-update-{suffix}.tgz`** to flash your device.
Use `flipper-z-{target}-update-{suffix}.tgz` to flash your device.
# Build on Windows
@ -53,23 +51,20 @@ Check out `documentation/fbt.md` for details on building and flashing firmware.
### Compile everything for development
```sh
```powershell
./fbt.cmd updater_package
```
### Compile everything for release + get updater package to update from microSD card
```sh
```powershell
./fbt.cmd COMPACT=1 DEBUG=0 updater_package
```
**You may need to change** `/` **to** `\` **in front of fbt command (Only for Windows)!**
**You may need to change `/` to `\` in front of fbt command (Only for Windows)!**
Check `dist/` for build outputs.
Use **`flipper-z-{target}-update-{suffix}.tgz`** to flash your device.
Use `flipper-z-{target}-update-{suffix}.tgz` to flash your device.
If compilation fails, make sure all submodules are all initialized. Either clone with `--recursive` or use `git submodule update --init --recursive`.

View file

@ -1,10 +1,13 @@
# Firmware update on Developer Board {#dev_board_fw_update}
It's important to regularly update your Developer Board to ensure that you have access to the latest features and bug fixes. This tutorial will guide you through the necessary steps to update the firmware of your Developer Board.
> [!IMPORTANT]
>
> It's important to regularly update your Developer Board to ensure that you have access to the latest features and bug fixes.
> This tutorial will guide you through the necessary steps to update the firmware of your Developer Board.
This tutorial assumes that you're familiar with the basics of the command line. If youre not, please refer to the [Windows](https://www.digitalcitizen.life/command-prompt-how-use-basic-commands/) or [MacOS/Linux](https://ubuntu.com/tutorials/command-line-for-beginners#1-overview) command line tutorials.
This tutorial assumes that you're familiar with the basics of the command line.
***
If youre not, please refer to the [Windows](https://www.digitalcitizen.life/command-prompt-how-use-basic-commands/) or [MacOS / Linux](https://ubuntu.com/tutorials/command-line-for-beginners#1-overview) command line tutorials.
## Installing the micro Flipper Build Tool
@ -14,20 +17,18 @@ Install uFBT on your computer by running the following command in the Terminal:
**For Linux & macOS:**
```text
```bash
python3 -m pip install --upgrade ufbt
```
**For Windows:**
```text
py -m pip install --upgrade ufbt
```powershell
python -m pip install --upgrade ufbt
```
If you want to learn more about uFBT, visit [the project's page](https://pypi.org/project/ufbt/).
***
## Connecting the Developer Board to your computer
1. List all of the serial devices on your computer.
@ -38,49 +39,38 @@ If you want to learn more about uFBT, visit [the project's page](https://pypi.or
**macOS**
On macOS, you can run the following command in the Terminal:
```text
On macOS, you can run the following command in the Terminal:
```bash
ls /dev/cu.*
```
**Linux**
On Linux, you can run the following command in the Terminal:
On Linux, you can run the following command in the Terminal:
```text
ls /dev/tty*
```
View the devices in the list.
2. Connect the Developer Board to your computer using a USB-C cable.
![The Developer Board in Wired mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/Aq7gfMI-m_5H6sGGjwb4I_monosnap-miro-2023-07-19-19-47-39.jpg)
3. Switch your Developer Board to Bootloader mode:
![The Developer Board in Wired mode](https://github.com/user-attachments/assets/d13e4e90-d83d-45bf-8787-6eadba590795)
4. Switch your Developer Board to Bootloader mode:
3.1. Press and hold the **BOOT** button.
3.2. Press the **RESET** button while holding the **BOOT** button.
3.3. Release the **BOOT** button.\
![You can easily switch the Dev Board to Bootloader mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/KynP9iT6sJ3mXLaLyI82__image.png)
4. Repeat Step 1 and view the name of your Developer Board that appeared in the list.
3.3. Release the **BOOT** button.
![You can easily switch the Dev Board to Bootloader mode](https://github.com/user-attachments/assets/aecc957f-f37b-4bec-af9f-9efd4837152e)
6. Repeat Step 1 and view the name of your Developer Board that appeared in the list.
For example, on macOS:
```text
```shell
/dev/cu.usbmodem01
```
***
## Flashing the firmware
To flash the firmware onto your Developer Board, run the following command in the terminal:
```text
```shell
python3 -m ufbt devboard_flash
```
@ -90,33 +80,25 @@ You should see the following message: `WiFi board flashed successfully`.
If you get an error message during the flashing process, such as this:
```text
```shell
A fatal error occurred: Serial data stream stopped: Possible serial noise or corruption.
```
Or this:
```text
```shell
FileNotFoundError: [Errno 2] No such file or directory: '/dev/cu.usbmodem01'
```
Try doing the following:
* Disconnect the Developer Board from your computer, then reconnect it.
* Use a different USB port on your computer.
* Use a different USB-C cable.
***
## Finishing the installation
After flashing the firmware:
1. Reboot the Developer Board by pressing the **RESET** button.
![Reset the Developer Board](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/rcQeKARgrVwa51tLoo-qY_monosnap-miro-2023-07-20-18-29-33.jpg)
2. Disconnect and reconnect the USB-C cable.
1. Reboot the Developer Board by pressing the **RESET** button. ![Reset the Developer Board](https://github.com/user-attachments/assets/7527dd7b-eaa5-4fac-8d67-7ba52e552756)
3. Disconnect and reconnect the USB-C cable.
The Developer Board should appear as a serial device on your computer. Now, you can use it with the Black Magic Debug client of your choice.

View file

@ -2,35 +2,34 @@
The Wi-Fi Developer Board serves as a tool to debug the Flipper Zero firmware. To debug the firmware, the initial step involves compiling the firmware from its source code. This process enables the debugging functionality within the firmware and generates all the necessary files required for debugging purposes.
> **NOTE:** Building and debugging the Flipper Zero firmware is fully supported on MacOS and Linux. Support for Windows is in beta test.
***
> [!IMPORTANT]
>
> Building and debugging the Flipper Zero firmware is fully supported on MacOS and Linux.
> Support for Windows is in beta test.
## Updating the firmware of your Developer Board
Update the firmware of your Developer Board before using it. For more information, visit [Firmware update on Developer Board](https://docs.flipperzero.one/development/hardware/wifi-debugger-module/update).
***
## Installing Git
You'll need Git installed on your computer to clone the firmware repository. If you don't have Git, install it by doing the following:
* **MacOS**
### MacOS
On MacOS, install the **Xcode Command Line Tools** package, which includes Git as one of the pre-installed command-line utilities, by running in the Terminal the following command:
On MacOS, install the **Xcode Command Line Tools** package, which includes Git as one of the pre-installed command-line utilities, by running in the Terminal the following command:
```text
xcode-select --install
```
```bash
xcode-select --install
```
* **Linux**
### Linux
On Linux, you can install Git using your package manager. For example, on Ubuntu, run in the Terminal the following command:
On Linux, you can install Git using your package manager. For example, on Ubuntu, run in the Terminal the following command:
```text
sudo apt install git
```
```bash
sudo apt install git
```
For other distributions, refer to your package manager documentation.
@ -40,14 +39,14 @@ For other distributions, refer to your package manager documentation.
First, clone the firmware repository:
```text
```bash
git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git
cd flipperzero-firmware
```
Then, run the **Flipper Build Tool** (FBT) to build the firmware:
```text
```bash
./fbt
```
@ -57,13 +56,15 @@ Then, run the **Flipper Build Tool** (FBT) to build the firmware:
The Developer Board can work in the **Wired** mode and two **Wireless** modes: **Wi-Fi access point (AP)** mode and **Wi-Fi client (STA)** mode. The Wired mode is the simplest to set up, but requires a USB Type-C cable. The Wireless modes are more complex to set up, but they allow you to debug your Flipper Zero wirelessly.
> **NOTE:** Use the following credentials when connecting to the Developer Board in **Wi-Fi access point** mode:\n
Name: **blackmagic**\n
Password: **iamwitcher**
> [!TIP]
>
> Use the following credentials when connecting to the Developer Board in **Wi-Fi access point** mode:
> Name: **blackmagic**
> Password: **iamwitcher**
## Wired
![The Developer Board in Wired mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/jZdVlRTPVdSQVegzCyXp7_monosnap-miro-2023-06-22-16-28-06.jpg)
![The Developer Board in Wired mode](https://github.com/user-attachments/assets/32938d4a-20b7-4a53-8b36-608cf0112c9a)
To connect the Developer Board in **Wired** mode, do the following:
@ -71,83 +72,81 @@ To connect the Developer Board in **Wired** mode, do the following:
2. On your computer, open the **Terminal** and run the following:
* **MacOS**
```text
ls /dev/cu.*
```
* **Linux**
```text
ls /dev/tty*
```
Note the list of devices.
### MacOS
```shell
ls /dev/cu.*
```
### Linux
```bash
ls /dev/tty*
```
Note the list of devices.
3. Connect the Developer Board to your computer via a USB-C cable.
4. Rerun the command. Two new devices have to appear: this is the Developer Board.
> **NOTE:** If the Developer Board doesn't appear in the list of devices, try using a different cable, USB port, or computer.
>
> **NOTE:** Flipper Zero logs can only be viewed when the Developer Board is connected via USB. The option to view logs over Wi-Fi will be added in future updates. For more information, visit [Reading logs via the Dev Board](https://docs.flipperzero.one/development/hardware/wifi-debugger-module/reading-logs).
> [!NOTE]
>
> If the Developer Board doesn't appear in the list of devices, try using a different cable, USB port, or computer.
<br />
> [!IMPORTANT]
>
> Flipper Zero logs can only be viewed when the Developer Board is connected via USB.
> The option to view logs over Wi-Fi will be added in future updates.
> For more information, visit [Reading logs via the Dev Board](https://docs.flipperzero.one/development/hardware/wifi-debugger-module/reading-logs).
## Wireless
### Wi-Fi access point (AP) mode
![The Developer Board in Wi-Fi access point mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/tKRTMHAuruiLSEce2a8Ve_monosnap-miro-2023-06-22-16-39-17.jpg)
![The Developer Board in Wi-Fi access point mode](https://github.com/user-attachments/assets/1f210e91-3ac8-4f4c-a910-cc7c52b94346)
Out of the box, the Developer Board is configured to work as a **Wi-Fi access point**. This means it'll create its own Wi-Fi network to which you can connect. If your Developer Board doesn't create a Wi-Fi network, it is probably configured to work in **Wi-Fi client** mode. To reset your Developer Board back to **Wi-Fi access point** mode, press and hold the **BOOT** button for 10 seconds, then wait for the module to reboot.
![You can reconfigure the Developer Board mode by pressing and holding the BOOT button](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/57eELJsAwMxeZCEA1NMJw_monosnap-miro-2023-06-22-20-33-27.jpg)
![You can reconfigure the Developer Board mode by pressing and holding the BOOT button](https://github.com/user-attachments/assets/8fee05de-fb1e-475a-b23a-d1ddca9cd701)
To connect the Developer Board in **Wi-Fi access point** mode, do the following:
1. Cold-plug the Developer Board by turning off your Flipper Zero and connecting the Developer Board, and then turning it back on.
2. Open Wi-Fi settings on your client device (phone, laptop, or other).
3. Connect to the network:
* Name: **blackmagic**
* Password: **iamwitcher**
* Name: `blackmagic`
* Password: `iamwitcher`
4. To configure the Developer Board, open a browser and go to `http://192.168.4.1`.
### Wi-Fi client (STA) mode
![The Developer Board in Wi-Fi client mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/xLQpFyYPfUS5Cx0uQhrNd_monosnap-miro-2023-06-23-12-34-36.jpg)
![The Developer Board in Wi-Fi client mode](https://github.com/user-attachments/assets/42e7e69e-51b0-4914-b082-431c68bc75d3)
To connect the Developer Board in **Wi-Fi client** mode, you need to configure it to connect to your Wi-Fi network by doing the following:
1. Cold-plug the Developer Board by turning off your Flipper Zero and connecting the Developer Board, and then turning it back on.
2. Connect to the Developer Board in **Wi-Fi access point** mode.
3. In a browser, go to the configuration page on `http://192.168.4.1`.
4. Select the **STA** mode and enter your network's **SSID** (name) and **password**. For convenience, you can click the **+** button to see the list of nearby networks.
5. Save the configuration and reboot the Developer Board.
6. In the Wi-Fi tab, you can set the Developer Board mode
![In the Wi-Fi tab, you can set the Developer Board mode](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/klbLVj8lz2bEvm7j4wRaj_monosnap-miro-2023-06-23-13-06-32.jpg)
![Developer Board mode](https://github.com/user-attachments/assets/fbeea000-1117-4297-8a0d-5d580123e938)
After rebooting, the Developer Board connects to your Wi-Fi network. You can connect to the device using the mDNS name **blackmagic.local** or the IP address it got from your router (you'll have to figure this out yourself, every router is different).
After rebooting, the Developer Board connects to your Wi-Fi network. You can connect to the device using the mDNS name `blackmagic.local` or the IP address it got from your router (you'll have to figure this out yourself, every router is different).
After connecting to your debugger via <http://blackmagic.local>, you can find its IP address in the **SYS** tab. You can also change the debugger's mode to **AP** or **STA** there.
After connecting to your debugger via [http://blackmagic.local](http://blackmagic.local), you can find its IP address in the **SYS** tab. You can also change the debugger's mode to **AP** or **STA** there.
![In the SYS tab, you can view the IP address of your Developer Board](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/5XbUptlfqzlV0p6hRUqiG_monosnap-miro-2023-06-22-18-11-30.jpg)
***
![In the SYS tab, you can view the IP address of your Developer Board](https://github.com/user-attachments/assets/aa3afc64-a2ec-46a6-a827-eea187a97c04)
## Debugging the firmware
Open the **Terminal** in the **flipperzero-firmware** directory that you cloned earlier and run the following command:
Open the **Terminal** in the `flipperzero-firmware` directory that you cloned earlier and run the following command:
```text
```bash
./fbt flash
```
@ -155,24 +154,22 @@ This will upload the firmware you've just built to your Flipper Zero via the Dev
To debug in **VSCode**, do the following:
1. In VSCode, open the **flipperzero-firmware** directory.
1. In VSCode, open the `flipperzero-firmware` directory.
2. You should see a notification about recommended extensions. Install them.
If there were no notifications, open the **Extensions** tab, enter `@recommended` in the search bar, and install the workspace recommendations.
> [!TIP]
>
> If there were no notifications, open the `Extensions` tab,
> enter `@recommended` in the search bar,
> and install the workspace recommendations.
>
3. In the **Terminal**, run the `./fbt vscode_dist` command. This will generate the VSCode configuration files needed for debugging.
4. In VSCode, open the **Run and Debug** tab and select **Attach FW (blackmagic)** from the dropdown menu.
5. If needed, flash your Flipper Zero with the `./fbt flash` command, then click the **Play** button in the debug sidebar to start the debugging session.
6. Note that starting a debug session halts the execution of the firmware, so you'll need to click the **Continue** button on the toolbar at the top of your VSCode window to continue execution.
![Click Continue in the toolbar to continue execution of the firmware](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/lp8ygGaZ3DvWD3OSI9yGO_monosnap-miro-2023-06-23-17-58-09.jpg)
![Click Continue in the toolbar to continue execution of the firmware](https://github.com/user-attachments/assets/74f26bdb-8511-4e5a-8aa8-c44212aa6228)
To learn about debugging, visit the following pages:
* [Debugging with GDB](https://sourceware.org/gdb/current/onlinedocs/gdb.pdf)
* [Debugging in VS Code](https://code.visualstudio.com/docs/editor/debugging)
* [Debugging in VSCode](https://code.visualstudio.com/docs/editor/debugging)

View file

@ -2,17 +2,16 @@
The Developer Board allows you to read Flipper Zero logs via UART. Unlike reading logs via the command-line interface (CLI), the Developer Board enables you to collect logs from the device directly to a serial console independently from the operating system of Flipper Zero. It allows you to see the device's logs when it's loading, updating, or crashing. It's useful for debugging and troubleshooting during software development.
> **NOTE:** Flipper Zero logs can only be viewed when the developer board is connected via USB. The option to view logs over Wi-Fi will be added in future updates.
***
> [!NOTE]
>
> Flipper Zero logs can only be viewed when the developer board is connected via USB.
> The option to view logs over Wi-Fi will be added in future updates.
## Setting the log level
Depending on your needs, you can set the log level by going to **Main Menu -> Settings -> Log Level**. To learn more about logging levels, visit [Settings](https://docs.flipperzero.one/basics/settings#d5TAt).
Depending on your needs, you can set the log level by going to `Main Menu -> Settings -> Log Level`. To learn more about logging levels, visit [Settings](https://docs.flipperzero.one/basics/settings#d5TAt).
![You can manually set the preferred log level](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/INzQMw8QUsG9PXi30WFS0_monosnap-miro-2023-07-11-13-29-47.jpg)
***
![You can manually set the preferred log level](https://github.com/user-attachments/assets/b1317d01-8b9b-4544-8720-303c87b85324)
## Viewing Flipper Zero logs
@ -20,118 +19,94 @@ Depending on your operating system, you need to install an additional applicatio
### MacOS
On MacOS, you need to install the **minicom** communication program by doing the following:
On MacOS, you need to install the `minicom` communication program by doing the following:
1. [Install Homebrew](https://brew.sh/) by running the following command in the Terminal:
```text
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
2. After installation of Homebrew, run the following command to install minicom:
```text
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
2. After installation of Homebrew, run the following command to install `minicom`:
```bash
brew install minicom
```
After installation of minicom on your macOS computer, you can connect to the Developer Board to read Flipper Zero logs by doing the following:
After installation of `minicom` on your macOS computer, you can connect to the Developer Board to read Flipper Zero logs by doing the following:
1. Cold-plug the Developer Board into your Flipper Zero by turning off the Flipper Zero, connecting the developer board, and then turning it back on.
2. On your computer, open the Terminal and run the following command:
```text
```bash
ls /dev/cu.*
```
Note the list of devices.
> [!NOTE]
>
> The list of devices.
3. Connect the developer board to your computer using a USB Type-C cable.
![Connect the developer board with a USB-C cable](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/iPpsMt2-is4aIjiVeFu5t_hjxs2i1oovrnps74v5jgsimage.png)
4. Rerun the command. Two new devices have to appear: this is the Developer Board.
```text
![Connect the developer board with a USB-C cable](https://github.com/user-attachments/assets/0f469a31-2dd1-4559-918a-ff3ca3309531)
5. Rerun the command. Two new devices have to appear: this is the Developer Board.
```bash
/dev/cu.usbmodemblackmagic1
```
```text
```bash
/dev/cu.usbmodemblackmagic3
```
Your Developer Board might have different names.
5. Run the following command:
```text
minicom -D /dev/<port> -b 230400
```
> [!NOTE]
>
> Your Developer Board might have different names.
6. Run the following command:
```bash
minicom -D /dev/<port> -b 230400
```
Where `<port>` is the name of your device with a bigger number.
Example:
```text
```bash
minicom -D /dev/cu.usbmodemblackmagic3 -b 230400
```
6. View logs of your Flipper Zero in the Terminal.
7. To quit, close the minicom window or quit via the minicom menu.
7. View logs of your Flipper Zero in the Terminal.
8. To quit, close the `minicom` window or quit via the `minicom` menu.
### Linux
On Linux, you need to install the **minicom** communication program. For example, on Ubuntu, run in the Terminal the following command:
On Linux, you need to install the `minicom` communication program. For example, on Ubuntu, run in the Terminal the following command:
```text
```bash
sudo apt install minicom
```
```
After installation of minicom on your Linux computer, you can connect to the Developer Board to read Flipper Zero logs by doing the following:
After installation of `minicom` on your Linux computer, you can connect to the Developer Board to read Flipper Zero logs by doing the following:
1. Cold-plug the Developer Board into your Flipper Zero by turning off the Flipper Zero, connecting the developer board, and then turning it back on.
2. On your computer, open the Terminal and run the following command:
```text
```bash
ls /dev/tty*
```
Note the list of devices.
3. Connect the developer board to your computer using a USB Type-C cable.
![Connect the developer board with a USB-C cable](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/iPpsMt2-is4aIjiVeFu5t_hjxs2i1oovrnps74v5jgsimage.png)
![Connect the developer board with a USB-C cable](https://github.com/user-attachments/assets/0f469a31-2dd1-4559-918a-ff3ca3309531)
4. Rerun the command. Two new devices have to appear: this is the Developer Board.
```text
```bash
/dev/ttyACM0
```
```text
```bash
/dev/ttyACM1
```
Your Developer Board might have different names.
> [!NOTE]
>
> Your Developer Board might have different names.
5. Run the following command:
```text
```bash
minicom -D /dev/<port> -b 230400
```
Where `<port>` is the name of your device with a bigger number.
Example:
```text
```bash
minicom -D /dev/cu.usbmodemblackmagic3 -b 230400
```
6. View logs of your Flipper Zero in the Terminal.
**NOTE:** If no logs are shown in the Terminal, try running the command from Step 5 with another device name.
> [!NOTE]
>
> If no logs are shown in the Terminal,
> try running the command from Step 5 with another device name.
>
7. To quit, close the minicom window or quit via the minicom menu.
### Windows
@ -139,22 +114,14 @@ After installation of minicom on your Linux computer, you can connect to the Dev
On Windows, do the following:
1. On your computer, [install the PuTTY application](https://www.chiark.greenend.org.uk/\~sgtatham/putty/latest.html).
2. Cold-plug the Developer Board into your Flipper Zero by turning off the Flipper Zero, connecting the developer board, and then turning it back on.
3. Connect the developer board to your computer using a USB Type-C cable.
![Connect the developer board with a USB-C cable](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/iPpsMt2-is4aIjiVeFu5t_hjxs2i1oovrnps74v5jgsimage.png)
4. Find the serial port that the developer board is connected to by going to **Device Manager -> Ports (COM & LPT)** and looking for a new port that appears when you connect the Wi-Fi developer board.
![Find the serial port in your Device Manager](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/KKLQJK1lvqmI5iab3d__C_image.png)
5. Run the PuTTY application and select **Serial** as the connection type.
6. Enter the port number you found in the previous step into the **Serial line** field.
7. Set the **Speed** parameter to **230400** and click **Open**.
![Set speed to 230400](https://archbee-image-uploads.s3.amazonaws.com/3StCFqarJkJQZV-7N79yY/ROBSJyfQ_CXiy4GUZcPbs_monosnap-miro-2023-07-12-13-56-47.jpg)
8. View logs of your Flipper Zero in the PuTTY terminal window.
9. To quit, close the PuTTY window.
![Connect the developer board with a USB-C cable](https://github.com/user-attachments/assets/0f469a31-2dd1-4559-918a-ff3ca3309531)
4. Find the serial port that the developer board is connected to by going to `Device Manager -> Ports (COM & LPT)` and looking for a new port that appears when you connect the Wi-Fi developer board.
![Find the serial port in your Device Manager](https://github.com/user-attachments/assets/aa542fe6-4781-45dc-86f6-e98ab34952b0)
6. Run the `PuTTY` application and select `Serial` as the connection type.
7. Enter the port number you found in the previous step into the `Serial line` field.
8. Set the `Speed` parameter to `230400` and click `Open`.
![Set speed to 230400](https://github.com/user-attachments/assets/93463c78-9776-479b-a6cc-d68ed712d0c4)
10. View logs of your Flipper Zero in the PuTTY terminal window.
11. To quit, close the PuTTY window.

View file

@ -9,24 +9,35 @@ If you don't need all features of `fbt` - like building the whole firmware - and
To use `fbt`, you only need `git` installed in your system.
`fbt` by default downloads and unpacks a pre-built toolchain, and then modifies environment variables for itself to use it. It does not contaminate your global system's path with the toolchain.
> However, if you wish to use tools supplied with the toolchain outside `fbt`, you can open an *fbt shell*, with properly configured environment.
> - On Windows, simply run `scripts/toolchain/fbtenv.cmd`.
> - On Linux & MacOS, run `source scripts/toolchain/fbtenv.sh` in a new shell.
> - You can also type ```. `./fbt -s env` ``` in your shell. (Keep the "." at the beginning.)
`fbt` by default downloads and unpacks a pre-built toolchain, and then modifies environment variables for itself to use it.
It does not contaminate your global system's path with the toolchain.
> [!NOTE]
>
> However, if you wish to use tools supplied with the toolchain outside `fbt`,
> you can open an *fbt shell*, with properly configured environment.
>
> - On Windows, simply run `scripts/toolchain/fbtenv.cmd`.
> - On Linux & MacOS, run `source scripts/toolchain/fbtenv.sh` in a new shell.
> - You can also type ```. `./fbt -s env` ``` in your shell. (Keep the "." at the beginning.)
If your system is not supported by pre-built toolchain variants or you want to use custom versions of dependencies, you can `set FBT_NOENV=1`. `fbt` will skip toolchain & environment configuration and will expect all tools to be available on your system's `PATH`. *(this option is not available on Windows)*
If your system is not supported by pre-built toolchain variants or you want to use custom versions of dependencies, you can `set FBT_NOENV=1`.
If `FBT_TOOLCHAIN_PATH` variable is set, `fbt` will use that directory to unpack toolchain into. By default, it downloads toolchain into `toolchain` subdirectory repo's root.
`fbt` will skip toolchain & environment configuration and will expect all tools to be available on your system's `PATH`. *(this option is not available on Windows)*
If `FBT_TOOLCHAIN_PATH` variable is set, `fbt` will use that directory to unpack toolchain into. By default, it downloads toolchain into `toolchain` subdirectory repo's root.
If you want to enable extra debug output for `fbt` and toolchain management scripts, you can `set FBT_VERBOSE=1`.
`fbt` always performs `git submodule update --init` on start, unless you set `FBT_NO_SYNC=1` in the environment:
- On Windows, it's `set "FBT_NO_SYNC=1"` in the shell you're running `fbt` from
- On \*nix, it's `$ FBT_NO_SYNC=1 ./fbt ...`
> There are more variables controlling basic `fbt` behavior. See `fbt` & `fbtenv` scripts' sources for details.
- On Windows, it's `set "FBT_NO_SYNC=1"` in the shell you're running `fbt` from
- On \*nix, it's `$ FBT_NO_SYNC=1 ./fbt ...`
> [!NOTE]
>
> There are more variables controlling basic `fbt` behavior.
> See `fbt` & `fbtenv` scripts' sources for details.
>
## Invoking FBT
@ -38,22 +49,34 @@ To run cleanup (think of `make clean`) for specified targets, add the `-c` optio
## Build directories
`fbt` builds updater & firmware in separate subdirectories in `build`, and their names depend on optimization settings (`COMPACT` & `DEBUG` options). However, for ease of integration with IDEs, the latest built variant's directory is always linked as `built/latest`. Additionally, `compile_commands.json` is generated in that folder (it is used for code completion support in IDEs).
`fbt` builds updater & firmware in separate subdirectories in `build`, and their names depend on optimization settings (`COMPACT` & `DEBUG` options).
However, for ease of integration with IDEs, the latest built variant's directory is always linked as `built/latest`.
Additionally, `compile_commands.json` is generated in that folder (it is used for code completion support in IDEs).
`build/latest` symlink & compilation database are only updated upon *firmware build targets* - that is, when you're re-building the firmware itself. Running other tasks, like firmware flashing or building update bundles *for a different debug/release configuration or hardware target*, does not update `built/latest` dir to point to that configuration.
`build/latest` symlink & compilation database are only updated upon *firmware build targets* - that is, when you're re-building the firmware itself.
Running other tasks, like firmware flashing or building update bundles *for a different debug/release configuration or hardware target*, does not update `built/latest` dir to point to that configuration.
## VSCode integration
`fbt` includes basic development environment configuration for VS Code. Run `./fbt vscode_dist` to deploy it. That will copy the initial environment configuration to the `.vscode` folder. After that, you can use that configuration by starting VS Code and choosing the firmware root folder in the "File > Open Folder" menu.
`fbt` includes basic development environment configuration for VSCode. Run `./fbt vscode_dist` to deploy it.
To use language servers other than the default VS Code C/C++ language server, use `./fbt vscode_dist LANG_SERVER=<language-server>` instead. Currently `fbt` supports the default language server (`cpptools`) and `clangd`.
That will copy the initial environment configuration to the `.vscode` folder.
After that, you can use that configuration by starting VSCode and choosing the firmware root folder in the <kbd>File > Open Folder</kbd> menu.
To use language servers other than the default VS Code C/C++ language server, use `./fbt vscode_dist LANG_SERVER=<language-server>` instead.
Currently `fbt` supports the default language server (`cpptools`) and `clangd`.
- On the first start, you'll be prompted to install recommended plugins. We highly recommend installing them for the best development experience. _You can find a list of them in `.vscode/extensions.json`._
- Basic build tasks are invoked in the Ctrl+Shift+B menu.
- Basic build tasks are invoked in the <kbd>Ctrl + Shift + B</kbd> menu.
- Debugging requires a supported probe. That includes:
- Wi-Fi devboard with stock firmware (blackmagic).
- ST-Link and compatible devices.
- J-Link for flashing and debugging (in VSCode only). _Note that J-Link tools are not included with our toolchain and you have to [download](https://www.segger.com/downloads/jlink/) them yourself and put them on your system's PATH._
- J-Link for flashing and debugging (in VSCode only). _Note that J-Link tools are not included with our toolchain and you have to [download](https://www.segger.com/downloads/jlink/) them yourself and put them on your system's `PATH`.
- Without a supported probe, you can install firmware on Flipper using the USB installation method.
## FBT targets
@ -68,7 +91,7 @@ To use language servers other than the default VS Code C/C++ language server, us
- `copro_dist` - bundle Core2 FUS+stack binaries for qFlipper.
- `flash` - flash the attached device over SWD interface with supported probes. Probe is detected automatically; you can override it with `SWD_TRANSPORT=...` variable. If multiple probes are attached, you can specify the serial number of the probe to use with `SWD_TRANSPORT_SERIAL=...`.
- `flash_usb`, `flash_usb_full` - build, upload and install the update package to the device over USB. See details on `updater_package` and `updater_minpackage`.
- `debug` - build and flash firmware, then attach with gdb with firmware's .elf loaded.
- `debug` - build and flash firmware, then attach with gdb with firmware's `.elf` loaded.
- `debug_other`, `debug_other_blackmagic` - attach GDB without loading any `.elf`. It will allow you to manually add external `.elf` files with `add-symbol-file` in GDB.
- `updater_debug` - attach GDB with the updater's `.elf` loaded.
- `devboard_flash` - Update WiFi dev board. Supports `ARGS="..."` to pass extra arguments to the update script, e.g. `ARGS="-c dev"`.
@ -76,7 +99,7 @@ To use language servers other than the default VS Code C/C++ language server, us
- `openocd` - just start OpenOCD. You can pass extra arguments with `ARGS="..."`.
- `get_blackmagic` - output the blackmagic address in the GDB remote format. Useful for IDE integration.
- `get_stlink` - output serial numbers for attached STLink probes. Used for specifying an adapter with `SWD_TRANSPORT_SERIAL=...`.
- `lint`, `format` - run clang-format on the C source code to check and reformat it according to the `.clang-format` specs. Supports `ARGS="..."` to pass extra arguments to clang-format.
- `lint`, `format` - run `clang-format` on the C source code to check and reformat it according to the `.clang-format` specs. Supports `ARGS="..."` to pass extra arguments to clang-format.
- `lint_py`, `format_py` - run [black](https://black.readthedocs.io/en/stable/index.html) on the Python source code, build system files & application manifests. Supports `ARGS="..."` to pass extra arguments to black.
- `firmware_pvs` - generate a PVS Studio report for the firmware. Requires PVS Studio to be available on your system's `PATH`.
- `doxygen` - generate Doxygen documentation for the firmware. `doxy` target also opens web browser to view the generated documentation.
@ -115,6 +138,7 @@ To use language servers other than the default VS Code C/C++ language server, us
## Configuration
Default configuration variables are set in the configuration file: `fbt_options.py`.
Values set in the command line have higher precedence over the configuration file.
You can also create a file called `fbt_options_local.py` that will be evaluated when loading default options file, enabling persisent overriding of default options without modifying default configuration.
@ -123,7 +147,12 @@ You can find out available options with `./fbt -h`.
### Firmware application set
You can create customized firmware builds by modifying the list of applications to be included in the build. Application presets are configured with the `FIRMWARE_APPS` option, which is a `map(configuration_name:str -> application_list:tuple(str))`. To specify an application set to use in the build, set `FIRMWARE_APP_SET` to its name.
You can create customized firmware builds by modifying the list of applications to be included in the build.
Application presets are configured with the `FIRMWARE_APPS` option, which is a `map(configuration_name:str -> application_list:tuple(str))`.
To specify an application set to use in the build, set `FIRMWARE_APP_SET` to its name.
For example, to build a firmware image with unit tests, run `./fbt FIRMWARE_APP_SET=unit_tests`.
Check out `fbt_options.py` for details.

View file

@ -2,7 +2,10 @@
## Command syntax
BadUsb app uses extended Duckyscript syntax. It is compatible with classic USB Rubber Ducky 1.0 scripts but provides some additional commands and features, such as custom USB ID, ALT+Numpad input method, SYSRQ command, and more functional keys.
BadUsb app uses extended DuckyScript syntax.
It is compatible with classic USB Rubber Ducky 1.0 scripts but provides some additional commands and features,
such as custom USB ID, `ALT` + `Numpad` input method, `SYSRQ` command, and more functional keys.
## Script file format
@ -12,168 +15,181 @@ BadUsb app can execute only text scripts from `.txt` files, no compilation is re
### Comment line
Just a single comment line. The interpreter will ignore all text after the REM command.
| Command | Parameters | Notes |
| ------- | ------------ | ----- |
| REM | Comment text | |
Just a single comment line. The interpreter will ignore all text after the `REM` command.
| Command | Parameters | Notes |
|:---------|:--------------|:--------|
| REM | Comment text | |
### Delay
Pause script execution by a defined time.
| Command | Parameters | Notes |
| ------------- | ----------------- | ----------------------------------- |
| DELAY | Delay value in ms | Single delay |
| DEFAULT_DELAY | Delay value in ms | Add delay before every next command |
| DEFAULTDELAY | Delay value in ms | Same as DEFAULT_DELAY |
| Command | Parameters | Notes |
|:--------------|:--------------------------|:--------------------------------------|
| DELAY | Delay value in ms | Single delay |
| DEFAULT_DELAY | Delay value in ms | Add delay before every next command |
| DEFAULTDELAY | Delay value in ms | Same as DEFAULT_DELAY |
### Special keys
| Command | Notes |
| ------------------ | ---------------- |
| DOWNARROW / DOWN | |
| LEFTARROW / LEFT | |
| RIGHTARROW / RIGHT | |
| UPARROW / UP | |
| ENTER | |
| DELETE | |
| BACKSPACE | |
| END | |
| HOME | |
| ESCAPE / ESC | |
| INSERT | |
| PAGEUP | |
| PAGEDOWN | |
| CAPSLOCK | |
| NUMLOCK | |
| SCROLLLOCK | |
| PRINTSCREEN | |
| BREAK | Pause/Break key |
| PAUSE | Pause/Break key |
| SPACE | |
| TAB | |
| MENU | Context menu key |
| APP | Same as MENU |
| Fx | F1-F12 keys |
| Command | Notes |
|:--------------------|:------------------|
| DOWNARROW / DOWN | |
| LEFTARROW / LEFT | |
| RIGHTARROW / RIGHT | |
| UPARROW / UP | |
| ENTER | |
| DELETE | |
| BACKSPACE | |
| END | |
| HOME | |
| ESCAPE / ESC | |
| INSERT | |
| PAGEUP | |
| PAGEDOWN | |
| CAPSLOCK | |
| NUMLOCK | |
| SCROLLLOCK | |
| PRINTSCREEN | |
| BREAK | Pause/Break key |
| PAUSE | Pause/Break key |
| SPACE | |
| TAB | |
| MENU | Context menu key |
| APP | Same as MENU |
| Fx | F1-F12 keys |
### Modifier keys
Can be combined with a special key command or a single character.
| Command | Notes |
| -------------- | ---------- |
| CONTROL / CTRL | |
| SHIFT | |
| ALT | |
| WINDOWS / GUI | |
| CTRL-ALT | CTRL+ALT |
| CTRL-SHIFT | CTRL+SHIFT |
| ALT-SHIFT | ALT+SHIFT |
| ALT-GUI | ALT+WIN |
| GUI-SHIFT | WIN+SHIFT |
| GUI-CTRL | WIN+CTRL |
| Command | Notes |
|:----------------|:-------------|
| CONTROL / CTRL | |
| SHIFT | |
| ALT | |
| WINDOWS / GUI | |
| CTRL-ALT | CTRL+ALT |
| CTRL-SHIFT | CTRL+SHIFT |
| ALT-SHIFT | ALT+SHIFT |
| ALT-GUI | ALT+WIN |
| GUI-SHIFT | WIN+SHIFT |
| GUI-CTRL | WIN+CTRL |
## Key hold and release
Up to 5 keys can be hold simultaneously.
| Command | Parameters | Notes |
| ------- | ------------------------------- | ---------------------------------------- |
| HOLD | Special key or single character | Press and hold key until RELEASE command |
| RELEASE | Special key or single character | Release key |
| Command | Parameters | Notes |
|:---------|:---------------------------------|:------------------------------------------|
| HOLD | Special key or single character | Press and hold key until RELEASE command |
| RELEASE | Special key or single character | Release key |
## String
| Command | Parameters | Notes |
| ------- | ----------- | ----------------- |
| STRING | Text string | Print text string |
| STRINGLN | Text string | Print text string and press enter after it |
| Command | Parameters | Notes |
|:----------|:-------------|:--------------------------------------------|
| STRING | Text string | Print text string |
| STRINGLN | Text string | Print text string and press enter after it |
## String delay
Delay between keypresses.
| Command | Parameters | Notes |
| -------------------- | ----------------- | --------------------------------------------- |
| STRING_DELAY | Delay value in ms | Applied once to next appearing STRING command |
| STRINGDELAY | Delay value in ms | Same as STRING_DELAY |
| DEFAULT_STRING_DELAY | Delay value in ms | Apply to every appearing STRING command |
| DEFAULTSTRINGDELAY | Delay value in ms | Same as DEFAULT_STRING_DELAY |
Delay between key presses.
| Command | Parameters | Notes |
|:----------------------|:-------------------|:-----------------------------------------------|
| STRING_DELAY | Delay value in ms | Applied once to next appearing STRING command |
| STRINGDELAY | Delay value in ms | Same as STRING_DELAY |
| DEFAULT_STRING_DELAY | Delay value in ms | Apply to every appearing STRING command |
| DEFAULTSTRINGDELAY | Delay value in ms | Same as DEFAULT_STRING_DELAY |
### Repeat
| Command | Parameters | Notes |
| ------- | ---------------------------- | ----------------------- |
| REPEAT | Number of additional repeats | Repeat previous command |
| Command | Parameters | Notes |
|:---------|:------------------------------|:-------------------------|
| REPEAT | Number of additional repeats | Repeat previous command |
### ALT+Numpad input
On Windows and some Linux systems, you can print characters by holding `ALT` key and entering its code on Numpad.
| Command | Parameters | Notes |
| --------- | -------------- | --------------------------------------------------------------- |
| :---------- | :--------------- | :--------------------------------------------------------------- |
| ALTCHAR | Character code | Print single character |
| ALTSTRING | Text string | Print text string using ALT+Numpad method |
| ALTCODE | Text string | Same as ALTSTRING, presents in some Duckyscript implementations |
| ALTCODE | Text string | Same as ALTSTRING, presents in some DuckyScript implementations |
### SysRq
Send [SysRq command](https://en.wikipedia.org/wiki/Magic_SysRq_key)
| Command | Parameters | Notes |
| ------- | ---------------- | ----- |
| SYSRQ | Single character | |
| Command | Parameters | Notes |
|:---------|:------------------|:-------|
| SYSRQ | Single character | |
## Media keys
Some Media/Consumer Control keys can be pressed with "MEDIA" command
Some Media/Consumer Control keys can be pressed with `MEDIA` command
| Command | Parameters | Notes |
| ------- | ------------------------- | ----- |
| MEDIA | Media key, see list below | |
| Command | Parameters | Notes |
|:---------|:---------------------------|:------|
| MEDIA | Media key, see list below | |
| Key name | Notes |
| ----------------- | ----------------------------- |
| POWER | |
| REBOOT | |
| SLEEP | |
| LOGOFF | |
| EXIT | |
| HOME | |
| BACK | |
| FORWARD | |
| REFRESH | |
| SNAPSHOT | Take photo in a camera app |
| PLAY | |
| PAUSE | |
| PLAY_PAUSE | |
| NEXT_TRACK | |
| PREV_TRACK | |
| STOP | |
| EJECT | |
| MUTE | |
| VOLUME_UP | |
| VOLUME_DOWN | |
| FN | Fn/Globe key on Mac keyboard |
| BRIGHT_UP | Increase display brightness |
| BRIGHT_DOWN | Decrease display brightness |
| Key name | Notes |
|:-------------------|:-------------------------------|
| POWER | |
| REBOOT | |
| SLEEP | |
| LOGOFF | |
| EXIT | |
| HOME | |
| BACK | |
| FORWARD | |
| REFRESH | |
| SNAPSHOT | Take photo in a camera app |
| PLAY | |
| PAUSE | |
| PLAY_PAUSE | |
| NEXT_TRACK | |
| PREV_TRACK | |
| STOP | |
| EJECT | |
| MUTE | |
| VOLUME_UP | |
| VOLUME_DOWN | |
| FN | Fn/Globe key on Mac keyboard |
| BRIGHT_UP | Increase display brightness |
| BRIGHT_DOWN | Decrease display brightness |
## Fn/Globe key commands (Mac/iPad)
| Command | Parameters | Notes |
| ------- | ------------------------------- | ----- |
| GLOBE | Special key or single character | |
| Command | Parameters | Notes |
|:---------|:---------------------------------|:-------|
| GLOBE | Special key or single character | |
## Wait for button press
Will wait indefinitely for a button to be pressed
| Command | Parameters | Notes |
| --------------------- | ------------ | --------------------------------------------------------------------- |
| WAIT_FOR_BUTTON_PRESS | None | Will wait for the user to press a button to continue script execution |
| Command | Parameters | Notes |
|:----------------------|:-----------|:------------------------------------------------------------------------------|
| WAIT_FOR_BUTTON_PRESS | None | Will wait for the user to press a button to continue script execution |
## USB device ID
You can set the custom ID of the Flipper USB HID device. ID command should be in the **first line** of script, it is executed before script run.
| Command | Parameters | Notes |
| ------- | ---------------------------- | ----- |
| ID | VID:PID Manufacturer:Product | |
| Command | Parameters | Notes |
|:---------|:------------------------------|:-------|
| ID | VID:PID Manufacturer:Product | |
Example:
`ID 1234:abcd Flipper Devices:Flipper Zero`
```text
ID 1234:abcd Flipper Devices:Flipper Zero
```
VID and PID are hex codes and are mandatory. Manufacturer and Product are text strings and are optional.
> [!IMPORTANT]
>
> VID and PID are hex codes and are mandatory.
> Manufacturer and Product are text strings and are optional.