Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha authored Apr 10, 2024
1 parent 15da9b9 commit b215773
Showing 1 changed file with 79 additions and 54 deletions.
133 changes: 79 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,98 @@
---
title: FxBlox Lite (CM4)
id: fxblox-hardware-rpi
title: Re-imaging CM4
---

## Updating Your FxBlox Lite (RPI)
:::warning
If you were helping test nightly firmware releases **before** official testnet launch, you will be required to format drive to clear out old/incompatible chain data. **See more [details here.](../fxblox-app.md/#format-drive)**
:::
### Step 1: Download the firmware
:::info
If this is your very first time setting up your FxBlox Lite, see these [instructions first](#first-time-setup)
:::
- **Download**: Find `rpi_cm4_usb_update.zip` files in the [latest release](https://github.com/functionland/rpi-image/releases/latest) under the Assets section on GitHub, and download all files that start with `rpi_cm4_usb_update`.
- **Download**: You need `7zip` to unzip the downloaded chunked zip files. You can download it from [their website here](https://www.7-zip.org/download.html), and then right click on the file that ends with `.zip.001` and choose `7zip > extract`
## Re-imaging CM4

- Download: Download `Win32 Disk Imager` for writing update firmware to USB.
https://win32diskimager.org/

### Step 2: Unzip and Write image to USB
If for any reason the CM4 fulatower gets stuck in a blue/white light without going through the whole boot process, or it is not connected to the Wi-Fi or propagating the FxBlox hotspot, you need to perform a full re-image. This process requires you to first open the tower, which involves unscrewing parts of it. The process of opening the tower is shown in the video below:

1. **Unzipping**: Unzip `rpi_update.zip` on your computer. After unzipping there must be a .img file.
2. **Writing Image to USB**:
- In Image File section select `rpi_update.img` file.
- In Device section select USB Disk Partion letter.
- Click Write to start flashing USB Disk.
[![How to open the tower](https://img.youtube.com/vi/feBov6U_kJs/0.jpg)](https://youtu.be/feBov6U_kJs?t=246)

![Win32 Disk Imager](/img/fxyard-network/win32DiskImager.png)
### Steps for Re-imaging

### Step 3: Updating FxBlox
1. **Unplug the Tower from Power**

1. **Turn Off**: Ensure your FxBlox (RPI) Lite is turned off.
2. **USB Connection**: Connect the USB drive to the BOTTOM USB port of the FxBlox Lite (RPI).
3. **Power On**: Turn on your FxBlox Lite (RPI). After about 30 sec, the LED will blink yellow 5 times that indicating the update process started.
:::warning
In update process the LED blinks red and green. This phase is very critical, and any mistake in this phase cause breaking FxBlox Lite (RPI).
:::
4. After about 10 minutes, the LED blinks red only. Remove the USB drive.
5. Restart the FxBlox Lite (RPI) by unplugging and plugging back the power (Make sure an external storage, without the img files, is plugged to the bottom port of blox before powering it back on or the sequence of lighting you would see might defer from this documentation). The best partitioning format for storage devices is `ext4` but `vfat` is also acceptable.
Ensure the tower is not connected to any power source before proceeding.

**Note** If the blox stays in blue/white color, or does not connect to wifi and neither shows FxBlox hotspot or you rebooted during the update and think it is broken, you need to do a full re-image by following the [instructions here](fxblox-hardware-rpi-reimage.md).
2. **Opening the Tower**

### Step 4: Post-Update
Follow the instructions in the video linked above to open the tower safely.

**Be patient on the first boot, post-update!** The FxBlox automatically reboots 3 times, and will go through a series of lights. This **full process** should take about **15 minutes** to fully process the update and show the `FxBlox` WiFi.
3. **Connect the USB-C Port**

Please wait for `10-15 minutes` before doing anything. You may think it is done or stuck or it is turned off, but be sure that it is processing the update for `10-15 minutes` after the first boot. At the end of process the LED starts blinking light blue (cyan) consistently if an external storage is plugged to the blox. If no external storage is plugged, then you cannot see this sequence.
Connect the USB-C port on the side of the tower to your laptop or PC.

**Use FxBlox App**: AFter the lights become a flashing blue, you can start setting up the Blox with the application. Follow on-screen instructions in the app.
![Placeholder for USB-C connection image](/img/fxyard-network/rpi-usbc-reimage.jpg)

- If at the end of setup, you see a message that the app could not connect to Blox, Close the app, unplug and re-plug the blox and wait for 1 minute and open the app.
4. **Short Circuit the Two Pins**

Short circuit the two pins located on the bottom left side of the Raspberry Pi module. You can use anything to short circuit them, like putting hte head of a USC-C cable between them. but make sure hte material you are using is conductive nad not Aluminum for example (key rings for example are usually aluminum)

![Placeholder for short circuit pins image](/img/fxyard-network/rpi-shortcircuit.jpg)

5. **Power On the Tower**

Plug the tower back into power. It should display a blue/white light and remain like that, indicating it is in image mode. You can remove the short circuit from step 4 at this stage.

6. **Installing and Running rpiboot**

- **For Windows:**
- Download and install rpiboot from [here](https://github.com/raspberrypi/usbboot/raw/master/win32/rpiboot_setup.exe).
- Type `rpiboot` in your search bar and run it. After a few seconds it starts printing some stuff and automatically closes after 15 seconds or so. Wait for the terminal to close before proceeding.

- **For Mac:**
```
git clone --recurse-submodules --shallow-submodules --depth=1 https://github.com/raspberrypi/usbboot
cd usbboot
brew install libusb
brew install pkg-config
make
sudo ./rpiboot
```

After a few seconds it starts printing some stuff and automatically closes after 15 seconds or so. Wait for the terminal to close before proceeding.

7. **Download the Latest Image**

Download the latest image for your CM4, from [the official GitHub repository](https://github.com/functionland/rpi-image/releases/latest). Download all the files that start with `rpi_cm4_fulimage` into one folder on your computer.

8. **Unzip the Image Content**

Right click on the one that ends with `.zip.001` and use [7zip application](https://www.7-zip.org/download.html) to extract. Extract the contents of the downloaded image to a known location on your computer.

:::info
**Future firmware updates will be automatic, eliminating the need for manual updates.**
:::
9. **Install and Run Raspberry Pi Imager**

## First Time Setup
If this is your very first time setting up your FxBlox Lite (RPI), you will not be able to install the latest usb update. The reason for that is because "updating via usb" feature was not added in until a later firmware version.
- **For Windows:** Download from [here](https://downloads.raspberrypi.org/imager/imager_latest.exe).
- **For Mac:** Download from [here](https://downloads.raspberrypi.org/imager/imager_latest.dmg).

To automatically get that version, you need to connect the Blox to the wifi first. You can do so by following these steps:
10. **Configure Raspberry Pi Imager**

1. Download the latest iOS/Android app.
2. Follow prompts to create password and connect Metamask.
3. On the authorize blox screen wait for 15 seconds and a "skip" button appears in the bottom left. click that to skip the authorization and then click yes to confirm. [** * **](#troubleshoot)
4. Connect Blox to wifi. [** * **](#troubleshoot)
5. Now, wait 24 hours for the update to install. [** * **](#troubleshoot)
6. With new version installed, you can proceed with the [normal upgrading process.](#step-1-download-the-firmware)
Open Raspberry Pi Imager and select the following:

### Troubleshoot
* You may need to wait somewhere between 20-30 seconds for the button to appear.
* You may not get a `setup complete` message after connecting to wifi, because you don't have the latest firmware version. Check your router settings to see if it connected properly.
* We recommend waiting 24 hours, because there are no indicators for when it is completed.
* If the blox stays in blue/white color for a long time after reboot, or does not connect to wifi and neither shows FxBlox hotspot or you rebooted during hte update and think it is broken, you need to do a full re-image by following the [instructions here](fxblox-hardware-rpi-reimage.md)
- **Raspberry Pi Device:** RASPBERRY PI 4
- **Operating System:** Scroll down and choose "custom image," then select the `.img` file inside the folder you unzipped in the previous step.
- **Storage:** Click on "Choose storage" and select the newly added storage, which should be around 30GB and named RPi-Msd.

![Placeholder for Raspberry Pi Imager configuration image](/img/fxyard-network/raspberrypi-imager.png)

11. **Start the Imaging Process**

Click "Next." Choose "No" for the first popup asking if you want custom configs, and "Yes" for the second one asking for confirmation.

12. **Wait for Completion**

The imaging process might take about 3 hours. Please be patient.

13. **Final Steps**

After completion, remove the short circuit from the pins, disconnect the USB-C cable connecting the tower to the computer, and then unplug and re-plug the tower to power.

14. **Set Up Using FxBlox App**

Now that you have the updated fulatower, use the FxBlox app to set it up. There's no need for any other manual updates.

15. **Closing the Tower**

Once you've confirmed a successful setup through the FxBlox app, close up the tower again to protect it from damage.

- If at the end of setup, you see a message that the app could not connect to Blox, Close the app, unplug and re-plug the blox and wait for 1 minute and open the app.

0 comments on commit b215773

Please sign in to comment.