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
- Download Visual Studio Code.
- 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
- Download and unzip the latest firmware from the T-Stick reposity
- In Visual Studio, under the File menu select open folder.
- Navigate to where you downloaded the T-Stick repository and select the firmware folder.
- On the bottom bar select the correct environment depending on your T-Stick version (ie:
tstick5gw_enchanti
ortstick5gw_trill
) - In the build flags ensure the
-DTSTICK_SIZE
is the correct value for your T-Stick. - Navigate to the data folder and open
config.json
. - Update the
id
of the T-Stick to a number of your choosing. -
Update the
author
to your name. -
Build the firmware by clicking the checkmark on the bottom menu.
-
Click the PlatformIO Icon to show the Project Tasks.
-
Select
Build Filesystem Image
.
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.
-
Plug in your T-Stick to a USB Port on your computer.
-
In the PlatformIO Project Tasks select
Upload Filesystem Image
. -
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 pongreboot
to rebootsleep
to enter deep sleep