Skip to content

Flashing Firmware for a T-Stick 5GW

Warning

This guide is written for the preview firmware for the T-Stick 5GW located at https://github.com/aburt2/T-Stick/tree/5gw-main.

Option 1: Using Visual Studio Code and PlatformIO

You can use Visual Studio Code and the PlatformIO extension in order to flash firmware for the T-Stick-5GW.

Setup VS Code and PlatformIO

  1. Download Visual Studio Code.
  2. Follow the installation guide on PlatformIO's website to setup PlatformIO extension in VS Code

Tip

If you are not familiar with PlatformIO or VS Code it is recommended to read a quick start guide for both platforms before continuing this guide.

Build the Firmware

  1. Download and unzip the latest firmware from the T-Stick reposity
  2. In Visual Studio, under the File menu select open folder. open folder button in VS code code
  3. Navigate to where you downloaded the T-Stick repository and select the firmware folder.
  4. On the bottom bar select the correct environment depending on your T-Stick version (ie: tstick5gw_enchanti or tstick5gw_trill)
  5. In the build flags ensure the -DTSTICK_SIZE is the correct value for your T-Stick.
  6. Navigate to the data folder and open config.json.
  7. Update the id of the T-Stick to a number of your choosing.
  8. Update the author to your name.

  9. Build the firmware by clicking the checkmark on the bottom menu.

  10. Click the PlatformIO Icon to show the Project Tasks.

  11. Select Build Filesystem Image.

PlatformIO project Tasks

Upload the Firmware and Filesystem Image

Note

If your T-Stick was in deep sleep prior to flashing, you may have to wake up the instrument by pressing the button for it to show up on your computer.

  1. Plug in your T-Stick to a USB Port on your computer.

  2. In the PlatformIO Project Tasks select Upload Filesystem Image.

  3. Once the filesystem is uploaded. Select Upload to flash the firmware to the board.

Warning

DO NOT DISCONNECT the USB cable while the T-Stick is flashing.

Tip

If the T-Stick is not responding or there are issues with flashing try unscrew the cap closer for the ESP32-S3 endcap and hold the boot button while pressing the reset button to force the board into flash mode. If you do this you may need to press the reset button after flashing to force the T-Stick to flash again.

Once the firmware is flashed you should see an orange light from the inside of the T-Stick. When the T-Stick successfully connects to a network you will see a flashing blue light.

You can use the VSC/PlatformIO serial monitor to check if the T-Stick is booting properly. You should see T-Stick booting process.

You can also interact with the controller using the following commands:

  • ping to get the T-Stick to reply pong
  • reboot to reboot
  • sleep to enter deep sleep