mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 13:03:13 +00:00
USB, SD-card wiki updates (#172)
This commit is contained in:
parent
b463db4f57
commit
a7ee68c095
16 changed files with 186 additions and 16 deletions
|
@ -45,6 +45,7 @@ Flipper consists of the two main parts:
|
|||
### Features
|
||||
|
||||
* [Basic Features](https://github.com/Flipper-Zero/flipperzero-firmware-community/wiki/Basic-features)
|
||||
* [SD-card](https://github.com/Flipper-Zero/flipperzero-firmware-community/wiki/SD-Card.md)
|
||||
* [Sub-1 GHz radio](https://github.com/Flipper-Zero/flipperzero-firmware-community/wiki/Sub-1-GHz-radio) (Transceiver Based on CC1101 chip for 315/433/868 MHz)
|
||||
* [125 kHz RFID](https://github.com/Flipper-Zero/flipperzero-firmware-community/wiki/125-kHz-RFID)
|
||||
* [Infrared](https://github.com/Flipper-Zero/flipperzero-firmware-community/wiki/Infrared)
|
||||
|
|
|
@ -63,6 +63,14 @@ On standby screen we can see battery, status bar and dolphin animation. Animatio
|
|||
|
||||
![](../wiki_static/ui/UI-Standby-status-88.png)
|
||||
|
||||
## Status Bar Icons
|
||||
|
||||
- SD Card mounted
|
||||
- SD Card failed
|
||||
- USB connected
|
||||
|
||||
![](./../wiki_static/ui/UI-statusbar.png)
|
||||
|
||||
# Main menu
|
||||
|
||||
Active row is always in the middle of the screen.
|
||||
|
|
|
@ -68,6 +68,62 @@ There are many use cases that impossible to run directly on Flipper Zero. Most o
|
|||
|
||||
We can use Flipper Zero as a regular USB NFC adapter along with `LibNFC` library, so all existing software will work out of the box without any modifications. This mode must be run from menu `NFC -> USB NFC adapter`. In this mode all commands from PC should be forwarded directly to NFC chip `ST25R3916` via USB serial interface.
|
||||
|
||||
<details>
|
||||
<summary>Chat log with <a href="https://github.com/doegox">Philippe @doegox Teuwen</a> about LibNFC driver for ST25R3916</summary>
|
||||
|
||||
> [Pavel Zhovner]: About ST chip support in libnfc: I understand that libnfc is tightly tied to PNxxx and I can't fully imagine how big this work will be :slight_smile: Our main goal is to keep compatibility for user space applications like mfterm, mfoc and so on. I don't know much about Libnfc userspace API, and in my imagination, we just need to write a low level driver for ST25R3916 and the rest will work out of the box, maybe I'm wrong. Here how I imagine this. We already start to implementing commands forwarding daemon.
|
||||
|
||||
![](../../wiki_static/applications/NFC/libnfc_proxy_scheme.png)
|
||||
|
||||
> [doegox]: ther are intermediate APIs within libnfc, as I said yesterday maybe not super well layered
|
||||
with directories buses/chips/drivers
|
||||
and struct like this:
|
||||
|
||||
```
|
||||
const struct nfc_driver pn53x_usb_driver = {
|
||||
.name = PN53X_USB_DRIVER_NAME,
|
||||
.scan_type = NOT_INTRUSIVE,
|
||||
.scan = pn53x_usb_scan,
|
||||
.open = pn53x_usb_open,
|
||||
.close = pn53x_usb_close,
|
||||
.strerror = pn53x_strerror,
|
||||
|
||||
.initiator_init = pn53x_initiator_init,
|
||||
.initiator_init_secure_element = NULL, // No secure-element support
|
||||
.initiator_select_passive_target = pn53x_initiator_select_passive_target,
|
||||
.initiator_poll_target = pn53x_initiator_poll_target,
|
||||
.initiator_select_dep_target = pn53x_initiator_select_dep_target,
|
||||
.initiator_deselect_target = pn53x_initiator_deselect_target,
|
||||
.initiator_transceive_bytes = pn53x_initiator_transceive_bytes,
|
||||
.initiator_transceive_bits = pn53x_initiator_transceive_bits,
|
||||
.initiator_transceive_bytes_timed = pn53x_initiator_transceive_bytes_timed,
|
||||
.initiator_transceive_bits_timed = pn53x_initiator_transceive_bits_timed,
|
||||
.initiator_target_is_present = pn53x_initiator_target_is_present,
|
||||
|
||||
.target_init = pn53x_target_init,
|
||||
.target_send_bytes = pn53x_target_send_bytes,
|
||||
.target_receive_bytes = pn53x_target_receive_bytes,
|
||||
.target_send_bits = pn53x_target_send_bits,
|
||||
.target_receive_bits = pn53x_target_receive_bits,
|
||||
|
||||
.device_set_property_bool = pn53x_usb_set_property_bool,
|
||||
.device_set_property_int = pn53x_set_property_int,
|
||||
.get_supported_modulation = pn53x_usb_get_supported_modulation,
|
||||
.get_supported_baud_rate = pn53x_get_supported_baud_rate,
|
||||
.device_get_information_about = pn53x_get_information_about,
|
||||
|
||||
.abort_command = pn53x_usb_abort_command,
|
||||
.idle = pn53x_idle,
|
||||
.powerdown = pn53x_PowerDown,
|
||||
};
|
||||
```
|
||||
|
||||
> [doegox]: so if you can write ST equivalents to these pn53x_*, and map them to the generic names of the left column, that should work :) in a new driver
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
|
||||
# Schematic
|
||||
|
||||
![](./../../wiki_static/applications/NFC/ST25R3916-schematic.png)
|
||||
|
|
63
wiki/applications/SD-Card.md
Normal file
63
wiki/applications/SD-Card.md
Normal file
|
@ -0,0 +1,63 @@
|
|||
<img width="450" src="https://habrastorage.org/webt/la/fp/fz/lafpfzh4fsihzkdx0x_e5hofmdi.png" />
|
||||
|
||||
Flipper Zero support **optional** micro SD-card for expanding file system. It can store additional assets, plugins, libraries and so on. There is official SD-card image supplied with firmware updates, user can upload it using desktop firmware update util
|
||||
|
||||
# Supported cards
|
||||
|
||||
- micro SD HC class 1? **TODO: What actually types are NOT supported?**
|
||||
- FAT/exFAT filesystem
|
||||
- GPT and MBR partitioning table **TODO: Not clear in FatFS library docs**
|
||||
- Max size: up to 2TB **TODO: not tested, on 8GB confirmed**
|
||||
- Read/Write speed: up to 500 kbit/s **TODO: not clearly tested**
|
||||
- Built-in filesystem **TODO: not sure**
|
||||
|
||||
# File manager
|
||||
|
||||
File manager allows user to:
|
||||
|
||||
- See information of filesystem
|
||||
- Format sd-card to exFAT
|
||||
- View files list
|
||||
- View file info
|
||||
- Run executable file: `.bin`, `.py`
|
||||
- Delete file
|
||||
|
||||
## SD-card not inserted
|
||||
|
||||
If SD-card is not inserted, statusbar is empty. File manager application menu only shows help text "SD-card not found".
|
||||
**TODO:** Do we need `Scan for sd-card` action when card not found automatically?
|
||||
|
||||
![](./../../wiki_static/applications/sd-card/sd-card-not-found.jpg)
|
||||
|
||||
## SD-card inserted and mounted correctly
|
||||
|
||||
When SD-card with correct fylesystem inserted, Flipper automatically trying to mount filesystem. If filesystem mounted correcly, the normal SD-card icon brings in statusbar.
|
||||
|
||||
![](./../../wiki_static/ui/status-bar-sdcard-ok.png)
|
||||
|
||||
![](./../../wiki_static/applications/sd-card/sd-card-file-manager-ok.jpg)
|
||||
|
||||
## SD-card inserted and mount failed
|
||||
|
||||
If SD-card cannot be mounted because of not supported filesystem or any other reason, statusbar icon indicates this error. User can go to `File Manager` and see the info about failed card and the exact error code or full message. Also can format the whole card to supported filesystem and partition table.
|
||||
|
||||
![](./../../wiki_static/ui/status-bar-sdcard-fail.png)
|
||||
|
||||
![](./../../wiki_static/applications/sd-card/sd-card-error.jpg)
|
||||
|
||||
|
||||
### Card Info
|
||||
|
||||
Press `← Left` to see the card info:
|
||||
|
||||
- Size
|
||||
- Partition type: GPT, MBR
|
||||
- Partitions with title and size
|
||||
|
||||
![](./../../wiki_static/applications/sd-card/sd-card-info.jpg)
|
||||
|
||||
### Format (erase card)
|
||||
|
||||
Press `→ Right` to format card. One action should completely erase card and create one parition with recommended filesystem (exFAT?).
|
||||
|
||||
![](./../../wiki_static/applications/sd-card/sd-card-format.jpg)
|
|
@ -1,23 +1,32 @@
|
|||
As we all know, computers completely trust connected input devices like mouse and keyboard. Flipper Zero can emulate a USB slave device, allowing it to be recognized by the computer as a regular input device, such as HID keyboard or Ethernet adapter, just as USB Rubber Ducky. You can write your own keyboard payloads to type any key sequence, as well as fuzzing USB stack on a target device.
|
||||
Flipper Zero can connects to host system via USB 2.0 in several possible modes. When USB connected to host, the menu for choosing USB mode appears:
|
||||
|
||||
## Flashing firwmare (HID mode)
|
||||
Firmware mode activating only when chosen from menu.
|
||||
- Serial port (Default mode)
|
||||
- Firmware Update (reboot to bootloader)
|
||||
- Mass storage, mount SD card filesystem **TODO: only SD Card filesystem or not?**
|
||||
- Bad USB mode (HID device emulation)
|
||||
- USB NFC Reader
|
||||
|
||||
# Serial port (Default mode)
|
||||
|
||||
Activating when Flipper Zero operates in normal mode. Allow to communicate with PC from any application or forward commands from UART/I2C/SPI interfaces from external GPIO. When `Serial Port` mode activated, the USB port icon brings shown in status bar.
|
||||
|
||||
![](./../../wiki_static/ui/status-bar-usb.png)
|
||||
|
||||
# Firmware Update (Bootloader DFU Mode)
|
||||
|
||||
![](./../../wiki_static/ui/USB-firmware-update-mode.jpg)
|
||||
|
||||
To activate `Firmware Update` mode Flipper Zero must reboot to bootloader. Firmware mode activating only when chosen from menu or triggered from desktop application via `Serial Port` mode.
|
||||
|
||||
# Bad USB mode
|
||||
|
||||
Flipper Zero can emulate a USB slave device, allowing it to be recognized by the computer as a regular input device, such as HID keyboard just as USB Rubber Ducky. You can write your own keyboard payloads to type any key sequence, as well as fuzzing USB stack on a target device.
|
||||
|
||||
Allow user to run scripts from menu. User should choose script before connecting to victim PC.
|
||||
|
||||
## Bad USB mode
|
||||
Allow user to run scripts from menu. User should choose script before connecting to victim PC.
|
||||
1. User selects payload on filesystem
|
||||
2. Press on it with central button, then payload executed, if here a USB connection. Otherwise, it got message "Awaiting connection"
|
||||
3. After connection established, it shows progress of execution
|
||||
4. At end of execution, it says "ok", user can start script again by pressing central button, or return to list payloads by pressing "back"
|
||||
|
||||
## USB Serial mode
|
||||
GPIO can act as UART/I2C/SPI so user can use Flipper as PC serial adapter.
|
||||
|
||||
# UI
|
||||
|
||||
|
||||
### Firmware update
|
||||
|
||||
### Bad USB
|
||||
* Payloads
|
||||
* Settings
|
||||
- Mass storage, mount SD card filesystem
|
3
wiki_static/applications/NFC/libnfc_proxy_scheme.png
Normal file
3
wiki_static/applications/NFC/libnfc_proxy_scheme.png
Normal file
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ab566f4ad1ef282e038e1a982937228edf5e52fcbaa2f0a18d90b96ea4d6e493
|
||||
size 148325
|
3
wiki_static/applications/sd-card/sd-card-error.jpg
Normal file
3
wiki_static/applications/sd-card/sd-card-error.jpg
Normal file
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ad8828548bf9afd6d1cd6f2faf7c9fd7c80b686b6a6e93b673923503e6c15799
|
||||
size 107441
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a225f89987da7c5b503f7fa795de267dd3e1d648b24baebdaa66f0e27706037a
|
||||
size 87387
|
3
wiki_static/applications/sd-card/sd-card-format.jpg
Normal file
3
wiki_static/applications/sd-card/sd-card-format.jpg
Normal file
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:11ee366535cd1039c755c6682a8f49d65774216394d687441b232e267630d81d
|
||||
size 82107
|
3
wiki_static/applications/sd-card/sd-card-info.jpg
Normal file
3
wiki_static/applications/sd-card/sd-card-info.jpg
Normal file
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:987ef78e80e1c15df9c7e662122396999a0b55946e939dc32dae271312cbd2ff
|
||||
size 80059
|
3
wiki_static/applications/sd-card/sd-card-not-found.jpg
Normal file
3
wiki_static/applications/sd-card/sd-card-not-found.jpg
Normal file
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:104772cc4c0c19c8df7076035a731f97e95d633c0681acfb0ec99ddb48e1ab0d
|
||||
size 105156
|
3
wiki_static/ui/UI-statusbar.png
Normal file
3
wiki_static/ui/UI-statusbar.png
Normal file
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bb0661070b12698aec7214b57633f4f349900657213d7922b16a0dfa83b903a9
|
||||
size 53238
|
3
wiki_static/ui/USB-firmware-update-mode.jpg
Normal file
3
wiki_static/ui/USB-firmware-update-mode.jpg
Normal file
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8ec5f4e2af36b93d97f19a2e05aaa730a753b403c01138170e1b20ae0e7571d0
|
||||
size 108155
|
3
wiki_static/ui/status-bar-sdcard-fail.png
Normal file
3
wiki_static/ui/status-bar-sdcard-fail.png
Normal file
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8c3ddbd82503884f7bc50ce887ba8c32f0e9a44f75b16e648584723ad5b9ac6b
|
||||
size 60362
|
3
wiki_static/ui/status-bar-sdcard-ok.png
Normal file
3
wiki_static/ui/status-bar-sdcard-ok.png
Normal file
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f815453700784da0481db2464674d68040515ae3fa0bdb94100a1f2993f54423
|
||||
size 61342
|
3
wiki_static/ui/status-bar-usb.png
Normal file
3
wiki_static/ui/status-bar-usb.png
Normal file
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9da63c316bfd1fcb15a3d40f48a2cd479f7db0e2833a6210d2b98cd822f56200
|
||||
size 48794
|
Loading…
Reference in a new issue