Skip to content

Commit

Permalink
Added new instructions for flashing dev board. (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbrodude6119 authored Jul 7, 2023
1 parent a257355 commit d2c4ed5
Showing 1 changed file with 52 additions and 50 deletions.
102 changes: 52 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ I am not a C developer and I am using this project as a way to learn more about

This program is for educational purposes only.

## Getting Started
# Getting Started

There are pre-built .fap files for the official FW (untested) as well as unleashed FW (tested).
The pre-built fap file is made for the unleashed custom firmware. If you are on a different firmware you can download the `evil_portal.fap` file [at flipc.org](https://flipc.org/bigbrodude6119/flipper-zero-evil-portal?branch=main&root=flipper/flipper-evil-portal&firmware=unleashed) or you can build the `.fap` file yourself by following [these instructions](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/documentation/AppsOnSDCard.md).

You will need to manually flash the Wi-Fi dev board.
**Note** The official Flipper Zero firmware is unfortunately not supported. Some of the functions used in this app are not compatible.

### Install pre-built app on the flipper
## Install the pre-built app on the flipper

Go to the releases section on this repo and download and extract either the `ofw-evil_portal.fap.zip` file or the `unleashed-evil_portal.fap.zip` file depending on if you are using the official firmware (ofw) or the unleashed firmware. These files will contain the `evil_portal.fap` file for your firmware.

You will also need to download and extract the `evil_portal_sd_folder.zip` folder. This will contain necessary files for the app to run.
Go to the releases section on this repo. Download and extract the `unleashed-evil_portal.fap.zip` file from the latest release. This file will contain the `evil_portal.fap` file for the Unleashed firmware.

Put the `evil_portal.fap` file into the `apps/GPIO/` folder on your Flipper SD card.

Put the `evil_portal` folder into the `apps_data` folder.
In the releases section you will also need to download and extract the `evil_portal_sd_folder.zip` folder. This .zip file contains a `evil_portal` folder.

Put the `evil_portal` folder into the `apps_data` folder on your SD card.
This is an example of your Flipper SD card if done correctly.

```
Expand All @@ -45,11 +45,35 @@ apps_data/

You should be able to see the `[ESP32] Evil Portal` app on your flipper zero now.

If you want to create your own `index.html` file keep in mind that there is a limit of 4000 characters for the file. I plan to increase this later but I ran into some issues with larger files.
# Installing/flashing the Wi-Fi dev board

There is now an easier method (Option One) of flashing the **official Wi-Fi dev board**. Thank you to reddit user dellycem for showing me how to do this.

**If you are not using the official Wi-Fi dev board you will have to go with option two.**

## Option One - Official Wi-Fi Dev Board

Starting with version `0.0.2` I will include pre-compiled `.bin` files for the official WiFi Dev board. This will allow users to flash their dev boards via a website instead of through the Arduino IDE.

1. Download and extract the `wifi_dev_board.zip` file that is part of the latest release. This will contain 4 `.bin` files.
2. Connect your WiFi dev board to your computer while holding the boot button.
3. Go to the website https://esp.huhn.me/ and press the `Connect` button.
4. Select the port associated with your board.
5. Add each of the 4 `.bin` files using the blue `Add` button.
6. Enter the following addresses in the text field to the left of each file.

## Installing/flashing the Wi-Fi dev board
- 1000 - EvilPortal.ino.bootloader.bin
- 8000 - EvilPortal.ino.partitions.bin
- e000 - boot_app0.bin
- 10000 - EvilPortal.ino.bin

Follow the steps below to flash the Wi-Fi dev board with the evil portal firmware via Windows. The instructions below are for the Flipper Zero Wi-Fi Wrover Development Module (**ESP32-S2**), you may have to adjust the steps for your specific board:
7. Press the `Program` button and wait while the board is being flashed.
8. Assuming you do not have any errors you are good to go.


## Option Two - Other compatible boards

Follow the steps below toflash the other compatible ESP32 boards. You may have to adjust the steps below for your specific board:

1. Download and install the Arduino IDE from [here][link-arduino].
2. Download zip/clone dependency [AsyncTCP][link-asynctcp] to file.
Expand All @@ -63,38 +87,22 @@ Follow the steps below to flash the Wi-Fi dev board with the evil portal firmwar
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
```
7. Go to `Tools > Board > Boards Manager...` and search for `esp32` and install `esp32 by Espressif Systems`.
8. Go to `Tools > Board` and select `ESP32S2 Dev Module`.
8. Go to `Tools > Board` and select `ESP32S2 Dev Module` or the ESP32 board that you are trying to flash.
9. On your ESP32-S2 Wi-Fi module, hold the BOOT button.
10. Connect your ESP32-S2 to your computer, keep holding the BOOT button (holding for just 3-5 seconds and releasing may be fine, continuously holding worked better for me).
11. Go to `Tools > Port` and select the port that appeared when you connected your ESP32-S2.
10. Connect your board to your computer, keep holding the BOOT button (holding for just 3-5 seconds and releasing may be fine, continuously holding worked better for me).
11. Go to `Tools > Port` and select the port that appeared when you connected your ESP32.
12. Click the "Upload" button in the top left corner of the Arduino IDE.
13. On success, you will see:
13. On success, you will see something like:
```
Hash of data verified.
Leaving...
WARNING: ESP32-S2 (revision v0.0) chip was placed into download mode...
```
14. Plug in the Wi-Fi Dev board to the flipper, press the reset button on the Wi-Fi dev board and you should now see a solid blue light.
Some users reported that if you've already flashed your Wi-Fi dev board with the Marauder firmware or something else you **might** need to erase it before installing the new firmware here. Follow [the guide here](#erasing-firmware) or the `Erasing firmware` section below if you run into issues.
## Installing/flashing an ESP32 Wroom board
Reddit user dellycem [compiled binaries](https://old.reddit.com/r/flipperzero/comments/14ni93r/i_made_a_evil_portal_app_for_the_fz_wifi_dev_board/jqd42fi/?context=3) for the ESP32 Wroom board if you would like to use that instead of the Wi-Fi devboard.
1. Download the bin files from [this link](https://wetransfer.com/downloads/4d3dd914f2df43dc6c84efa452043f4220230702094742/33a478)
2. Go to [ESPWebTool](https://esp.huhn.me/) and get your board connected.
3. Add each of the bin files at the following locations
```
EvilPortal.bootloader.bin - 0x1000
EvilPortal.partitions.bin - 0x8000
boot_app0.bin - 0xe000
EvilPortal.bin - 0x10000
```
4. Press the program button and wait while your board is flashed.
5. Once complete, hook up the 3.3v, GND, RX0, and TX0 pins to the flipper zero. Remember that the RX/TX pins should go to the opposite pins on the flipper zero. RX -> TX, TX -> RX.
## Usage
# Usage
Plug in the Wi-Fi Dev board to the flipper.
Expand All @@ -110,13 +118,21 @@ You can manually save logs using the `Save logs` command. Logs will be stored in
Logs will automatically be saved when exiting the app or when the current log reaches 4000 characters.
## Building for different firmware
## Troubleshooting
- If you run into any issues make sure that you have the required files set up on the Flipper `apps_data` folder on the Flipper SD card.
- Logs will not be saved if there is no `logs` folder in `apps_data/evil_portal/`.
If you are not using the official flipper zero firmware or the unleashed firmware you can build the .fap file yourself by following [these instructions](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/documentation/AppsOnSDCard.md).
- If the AP won't start or you have other issues try pressing reset on the Wi-Fi dev board, waiting a few seconds, and pressing `Start portal` on the main menu.
Note that you will need to use the firmware repo that you wish to build for.
- It is important to give the devboard some time to load the html files from the Flipper.
You can also download builds for each firmware via [flipc](https://flipc.org/bigbrodude6119/flipper-zero-evil-portal?branch=main&root=flipper%2Fflipper-evil-portal).
- If you have the Marauder firmware on your dev board you **might** need to enable `Erase All Flash Before Sketch Upload` before flashing or follow the `Erasing firmware` instructions below. If you are using the web flasher there is an erase function on the website.
- If you see garbage characters in the AP name you will need to press the reset button on the board.
- Some users are reporting that the captive portal login does not open on some Android phones.
## Erasing firmware <a name="erasing-firmware"></a>
Expand All @@ -143,20 +159,6 @@ Assuming you have the Flipper Zero Wi-Fi Wrover Development Module (**ESP32-S2**
9. When successful you will get the message `Chip erase completed successfully in ___s` (time in seconds suffixed with "s").
10. Unplug/reset your board.
## Issues
If you run into any issues make sure that you have the required files set up on the Flipper `apps_data` folder on the Flipper SD card.
Logs will not be saved if there is no `logs` folder in `apps_data/evil_portal/`.
If the AP won't start or you have other issues try pressing reset on the Wi-Fi dev board, waiting a few seconds, and pressing `Start portal` on the main menu.
It is important to give the devboard some time to load the html files from the Flipper.
If you have the Marauder firmware on your dev board you may need to enable `Erase All Flash Before Sketch Upload` before flashing.
Some users are reporting that the captive portal login does not open on some Android phones.
## Todo
I plan on working on this in my free time. Here is my todo list.
Expand Down

0 comments on commit d2c4ed5

Please sign in to comment.