F1 Starter Kit user flasher tool from SG Wireless. This is the F1 Starter Kit programming flash tool written in Python running on top of Espressif ESP Tool Set.
Prerequisite:
- Python environment has already setup, Python version V3.11.x or below.
- Packages listed on requirement.txt:
- bitstring==3.1.9
- cffi==1.16.0
- cryptography==41.0.7
- ecdsa==0.18.0
- future==0.18.3
- pycparser==2.21
- pyparsing==2.3.1
- pyserial==3.5
- reedsolo==1.5.4
- six==1.16.0
- Silicon Labs CP210x USB to UART bridge VCP Drivers
If you are the first time using this user flasher tool, some required Python packages should be installed first, below is the installation instructions:
- In user_flasher.py directory, run "pip install -r requirements.txt" to install all the required package onto top of your existing Python environment.
- If all the packages are well installed in system, the system should response requirement already satified messages, below is a sample output of command prompt tested in Windows 11 environment:
D:\Downloads\V1.3.0-Release>pip install -r requirements.txt Requirement already satisfied: bitstring==3.1.9 in c:\users\h246\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from -r requirements.txt (line 1)) (3.1.9) Requirement already satisfied: cffi==1.16.0 in c:\users\h246\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from -r requirements.txt (line 2)) (1.16.0) Requirement already satisfied: cryptography==41.0.7 in c:\users\h246\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from -r requirements.txt (line 3)) (41.0.7) Requirement already satisfied: ecdsa==0.18.0 in c:\users\h246\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from -r requirements.txt (line 4)) (0.18.0) Requirement already satisfied: future==0.18.3 in c:\users\h246\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from -r requirements.txt (line 5)) (0.18.3) Requirement already satisfied: pycparser==2.21 in c:\users\h246\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from -r requirements.txt (line 6)) (2.21) Requirement already satisfied: pyparsing==2.3.1 in c:\users\h246\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from -r requirements.txt (line 7)) (2.3.1) Requirement already satisfied: pyserial==3.5 in c:\users\h246\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from -r requirements.txt (line 8)) (3.5) Requirement already satisfied: reedsolo==1.5.4 in c:\users\h246\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from -r requirements.txt (line 9)) (1.5.4) Requirement already satisfied: six==1.16.0 in c:\users\h246\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages (from -r requirements.txt (line 10)) (1.16.0)
Silicon Labs CP210x USB to UART bridge VCP driver is another important required software package in your OS, if you are the first time using this command, you may need to install this VCP driver first. In Silicon Labs's webpage, it provides driver on three different operating system platforms: Microsoft Windows, Linux and MAC OS X.
CP210x driver download link in Silicon Labs official web: https://www.silabs.com/software-and-tools/usb-to-uart-bridge-vcp-drivers?tab=downloads
Command list and usage of F1 Starter Kit user flasher tool (user_flasher.py):
1. Check COM ports of F1 Stater Kit
python user_flasher.py list
Upon successful running of this command, list of available COM port is listed at output, notice any Silicon Labls CP210x USB to UART Bridge, this is the COM of your F1 Starter Kit, in case of multiple CP210x USB to UART Bridges, you could try to re-run the command by first disconnecting and then connecting it back to your computer for identifying which COM port is your desired F1 Starter Kit.
Sample output of check COM ports command:
COM8 [Silicon Labs CP210x USB to UART Bridge (COM8)] [USB VID:PID=10C4:EA60 SER=14A381CE510CEE11A65A38D6F49E3369 LOCATION=1-3] COM4 [Standard Serial over Bluetooth link (COM4)] [BTHENUM{00001101-0000-1000-8000-00805F9B34FB}_LOCALMFG&0000\7&151D1373&0&000000000000_00000000] COM3 [Standard Serial over Bluetooth link (COM3)] [BTHENUM{00001101-0000-1000-8000-00805F9B34FB}_VID&00010075_PID&A012\7&151D1373&0&3482C5BA949E_C00000000]
2. Flash F1 Starter Kit program into flash
python user_flasher.py --port COM# flash --tar <filename.tar.gz>
Sample output of F1 Starter Kit flash programming command:
Flashing firmware file: <_io.BufferedReader name='SGW3501-F1-StarterKit-v1.3.0-0-40dbabba-20250523.tar.gz'> Flash will be erased from 0x00000000 to 0x00004fff... Compressed 19232 bytes to 12492... Wrote 19232 bytes (12492 compressed) at 0x00000000 in 0.5 seconds (effective 301.2 kbit/s)... Hash of data verified.
Leaving... Flash will be erased from 0x00020000 to 0x001d3fff... Compressed 1783728 bytes to 1193800... Wrote 1783728 bytes (1193800 compressed) at 0x00020000 in 27.4 seconds (effective 521.4 kbit/s)... Hash of data verified.
Leaving... Flash will be erased from 0x00010000 to 0x00010fff... Compressed 3072 bytes to 155... Wrote 3072 bytes (155 compressed) at 0x00010000 in 0.0 seconds (effective 515.3 kbit/s)... Hash of data verified.
Leaving... Flash will be erased from 0x0001b000 to 0x0001cfff... Compressed 8192 bytes to 31... Wrote 8192 bytes (31 compressed) at 0x0001b000 in 0.1 seconds (effective 992.8 kbit/s)... Hash of data verified. Leaving... Hard resetting via RTS pin...
3. Erase flash of F1 Starter Kit (Remark: please use with caution, all F1 Starter Kit configuration contents and tokens will be erased, please ensure all the necessary information is well kept before erase)
python user_flasher.py --port COM# erase
Samples output of F1 Start Kit flash erasing command:
esptool.py v3.3.4-dev Serial port COM8 Connecting.... Chip is ESP32-S3 (revision v0.2) Features: WiFi, BLE Crystal is 40MHz MAC: 24:58:7c:54:52:5c Uploading stub... Running stub... Stub running... Changing baud rate to 460800 Changed. Erasing flash (this may take a while)... Chip erase completed successfully in 3.2s Hard resetting via RTS pin...
4. Check MAC address of the connected board
python user_flasher.py --port COM# checkmac
This command provides a method for your to check the MAC address of the connected board, the MAC address on the F1 Starter Kit is laser marked on the shield can of F1 module, you can cross check with your hardware. Upon successful funning of this command, MAC address of the board should be displayed. Sample output of check COM ports command:
MAC address=7C:51:89:02:2A:74