Before starting the setup, download the following files:
1. Ubuntu 16.04 (Xenial) WSL package
Download the Ubuntu 16.04 root filesystem from the official Ubuntu cloud images repository:
Download the following archive:
xenial-server-cloudimg-amd64-root.tar.gz
2. Python 3.8.0 Installation Script
Download the install_python3.8.sh script. This script automates the installation of Python 3.8.0 along with the required development dependencies.
If you prefer to create the script manually, create a file named install_python3.8.sh and add the following code:
#!/bin/bash
set -e
echo "π§ Installing dependencies..."
sudo apt update
sudo apt install -y build-essential checkinstall \
libreadline-gplv2-dev libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev \
zlib1g-dev libffi-dev wget
echo "β¬οΈ Downloading Python 3.8.0 source..."
cd /usr/src
sudo wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
sudo tar xzf Python-3.8.0.tgz
cd Python-3.8.0
echo "βοΈ Configuring and building Python 3.8.0..."
sudo ./configure --enable-optimizations
sudo make -j$(nproc)
sudo make altinstall
echo "β
Python 3.8.0 installed at /usr/local/bin/python3.8"
python3.8 --version
echo "π οΈ Setting python3 to point to python3.8 (optional)..."
sudo update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.8 1
sudo update-alternatives --config python3
echo "β
Done."Note: Changing the default python3 version is optional. Keep the existing system Python configuration unless your SDK setup specifically requires this change.
First, enable the Windows Subsystem for Linux feature on your Windows computer.
Follow these steps:
Open Control Panel.
- Open Control Panel.
Navigate to Programs β Programs and Features.
- Navigate to Programs β Programs and Features.
Click Turn Windows features on or off on the left side.
- Click Turn Windows features on or off on the left side.
Locate and select Windows Subsystem for Linux.
- Locate and select Windows Subsystem for Linux.
Click OK and wait for Windows to apply the changes.
- Click OK and wait for Windows to apply the changes.
Restart your computer when prompted.
- Restart your computer when prompted.
After restarting your computer, WSL will be enabled.
You can now proceed to the next step to configure Ubuntu 16.04 on your Windows system.
Open File Explorer and navigate to the C:\ drive.
- Open File Explorer and navigate to the
C:\drive.
Create a folder named WSL.
- Create a folder named
WSL.
Inside the WSL folder, create another folder named Ubuntu16.
- Inside the
WSLfolder, create another folder namedUbuntu16.
The final directory path should be:
C:\WSL\Ubuntu16Copy the downloaded xenial-server-cloudimg-amd64-root.tar.gz file into the C:\WSL directory.
- Copy the downloaded
xenial-server-cloudimg-amd64-root.tar.gzfile into theC:\WSLdirectory.
Your folder structure should look like this:
C:\
βββ WSL
βββ xenial-server-cloudimg-amd64-root.tar.gz
βββ Ubuntu16Note: If you do not see the ext4.vhdx file inside the Ubuntu16 folder, don't worry. It will be created automatically when you import the Ubuntu 16.04 distribution using the WSL command in the next step.
Click the Windows Start button.
- Click the Windows Start button.
Type PowerShell in the search bar.
- Type PowerShell in the search bar.
Right-click Windows PowerShell from the search results.
- Right-click Windows PowerShell from the search results.
Select Run as administrator.
- Select Run as administrator.
If prompted by User Account Control (UAC), click Yes.
- If prompted by User Account Control (UAC), click Yes.
Once PowerShell opens with administrator privileges, you are ready to import the Ubuntu 16.04 distribution in the next step.
Now that PowerShell is running with administrator privileges, execute the following command to import the Ubuntu 16.04 root filesystem.
Run the following command:
wsl --import Ubuntu16 C:\WSL\Ubuntu16 C:\WSL\Ubuntu16\xenial-server-cloudimg-amd64-root.tar.gzCommand explanation:
Ubuntu16 β Name assigned to the WSL distribution.
Ubuntu16β Name assigned to the WSL distribution.
C:\WSL\Ubuntu16 β Installation directory where the Ubuntu filesystem will be stored.
C:\WSL\Ubuntu16β Installation directory where the Ubuntu filesystem will be stored.
C:\WSL\Ubuntu16\xenial-server-cloudimg-amd64-root.tar.gz β Path to the downloaded Ubuntu root filesystem archive.
C:\WSL\Ubuntu16\xenial-server-cloudimg-amd64-root.tar.gzβ Path to the downloaded Ubuntu root filesystem archive.
After successful execution:
Wait for the import process to complete. If successful, the Ubuntu 16.04 distribution will be registered in WSL, and its virtual disk file (ext4.vhdx) will be created in the installation directory.
You can now proceed to the next step to launch Ubuntu 16.04.
Step 5: Launch Ubuntu 16.04After successfully importing Ubuntu 16.04, launch the distribution using PowerShell.
1. Run the following command in PowerShell:
wsl -d Ubuntu16This will launch the Ubuntu 16.04 environment.
2. Create a new user named ubuntu:
Once Ubuntu starts, execute:
adduser ubuntuFollow the on-screen instructions to set a password and complete the user creation process.
3. Verify Ubuntu access:
After completing the setup, you should be inside the Ubuntu terminal.
<escape>Note:</escape> The imported Ubuntu distribution may initially launch as the root user. The adduser ubuntu command creates a regular user account for development.
You are now ready to proceed with the basic Ubuntu environment setup.
You are now inside the Ubuntu 16.04 environment.
First, update the Ubuntu package lists and install the required development tools and utilities.
Run the following commands:
1. Update and upgrade Ubuntu packages
apt update && apt upgrade -y2. Install the required packages
apt install sudo wget curl git build-essential -yThese packages provide the basic tools required for SDK development and source code management.
Step 7: Install Python 3.8.0The Fibocom LE Series SDK requires Python 3.8.0 for the build environment.
Follow these steps to install Python 3.8.0.
1. Install the additional development dependencies
apt install build-essential python3 python3-tk qtbase5-dev -y2. Enable 32-bit architecture support
dpkg --add-architecture i3863. Update the package lists
apt update4. Install the required 32-bit libraries
apt install libc6:i386 libstdc++6:i386 zlib1g:i386 -y5. Copy the downloaded install_python3.8.sh script into the Ubuntu root directory (/root).
Make the script executable:
chmod +x install_python3.8.sh6. Run the installation script
./install_python3.8.shThe script will automatically download the Python 3.8.0 source code, install the required dependencies, and compile Python.
7. Verify the Python installation
python3.8 --versionExpected output:
Python 3.8.0Python 3.8.0 is now installed and ready for the SDK build environment.
Step 8: Install the VS Code WSL ExtensionVisual Studio Code can connect directly to the Ubuntu environment through the WSL extension. This allows you to edit and compile the SDK within Ubuntu using the VS Code interface.
Follow these steps:
Open Visual Studio Code in Windows.
- Open Visual Studio Code in Windows.
Open the Extensions panel by pressing Ctrl + Shift + X.
- Open the Extensions panel by pressing
Ctrl + Shift + X.
Search for WSL.
- Search for WSL.
Locate Remote - WSL published by Microsoft.
- Locate Remote - WSL published by Microsoft.
Click Install.
- Click Install.
Once installed, VS Code will be ready to connect to your Ubuntu 16.04 environment.
In the next step, we will configure SSH access and prepare the Fibocom SDK repository.
To access the Fibocom Git repository, you need to generate an SSH key pair and share the public key with the Fibocom FAE team.
1. Open Windows PowerShell or Windows Terminal.
Run the following command:
ssh-keygen -t rsa -b 4096 -C "[email protected]"Replace [email protected] with your registered email address.
2. Follow the prompts:
Press Enter to save the key in the default location.
- Press
Enterto save the key in the default location.
Press Enter again if you do not want to set a passphrase.
- Press
Enteragain if you do not want to set a passphrase.
Press Enter once more to confirm.
- Press
Enteronce more to confirm.
3. Locate the generated SSH keys.
By default, the keys are saved in:
C:\Users\<YourUserName>\.ssh\You will find two files:
id_rsa β Private key. Never share this file.
id_rsaβ Private key. Never share this file.
id_rsa.pub β Public key. This is the file you need to share.
id_rsa.pubβ Public key. This is the file you need to share.
4. Share your public key with the Fibocom FAE team.
Open id_rsa.pub using Notepad, copy its complete contents, and share it with the Fibocom FAE team.
The FAE team will provide the Git clone link after configuring your SSH public key.
Important: Never share your private key (id_rsa) with anyone. Only share the public key (id_rsa.pub).
Open the Ubuntu terminal and create the SSH configuration directory:
mkdir -p ~/.sshOpen the private key file:
nano ~/.ssh/id_rsaCopy the complete contents of the Windows id_rsa file and paste them into the editor.
Save the file using the following keyboard shortcuts:
Press Ctrl + X.
- Press
Ctrl + X.
Press Y to confirm.
- Press
Yto confirm.
Press Enter to save.
- Press
Enterto save.
Important: The id_rsa file is your private key. Never share it with anyone.
Open the public key file:
nano ~/.ssh/id_rsa.pubCopy the complete contents of the Windows id_rsa.pub file and paste them into the editor.
Save the file:
Press Ctrl + X.
- Press
Ctrl + X.
Press Y to confirm.
- Press
Yto confirm.
Press Enter to save.
- Press
Enterto save.
Note: Make sure you copy the correct contents:
id_rsa β Private key.
id_rsaβ Private key.
id_rsa.pub β Public key.
id_rsa.pubβ Public key.
Only the public key should be shared with the Fibocom FAE team.
Step 12: Set SSH File PermissionsFor security, configure the appropriate permissions for the SSH directory and its files.
Run:
chmod -R go= ~/.sshThis removes group and other-user permissions from the SSH directory and its contents.
Step 14: Clone the Fibocom SDK RepositoryOnce the Fibocom FAE team has configured your public SSH key, they will provide the Git clone link.
Open the Ubuntu terminal and navigate to your module development directory.
For example:
cd /home/ubuntuClone the SDK repository using the Git clone link provided by the Fibocom FAE team:
git clone <GIT_CLONE_LINK>Replace <GIT_CLONE_LINK> with the actual repository URL provided by the FAE team.
Wait for the repository to download successfully.
Step 15: Open the SDK Project in Visual Studio CodeAfter cloning the SDK repository, launch Ubuntu 16.04 from Windows PowerShell:
wsl -d Ubuntu16Navigate to the Ubuntu home directory:
cd /home/ubuntuOpen the project in Visual Studio Code:
code .Visual Studio Code will launch and connect to the Ubuntu 16.04 environment through the WSL extension.
You can now browse the SDK source code, modify files, and execute build commands directly from VS Code.
After successfully cloning the Fibocom SDK repository, you can access the SDK source code through Visual Studio Code.
To compile the SDK, first make sure you are working inside the Ubuntu 16.04 environment.
1. Launch Ubuntu 16.04 from Windows PowerShell or Command Prompt:
wsl -d Ubuntu162. Open the VS Code integrated terminal.
You can now execute the required SDK build commands from the Ubuntu terminal.
Note: Make sure you are in the correct SDK directory before starting the compilation process. The next step will cover the SDK build procedure.
After opening the SDK project in Visual Studio Code, follow the steps below to compile the firmware.
1. Open the VS Code integrated terminal.
2. Check the current directory contents:
ls -l3. Navigate to the projects directory:
cd projects/4. Navigate to the Fibocom LE270 SDK directory:
cd LE270/le270-014-sdk/fibocom_opensrcSDK_12007_70005. Run the SDK build script:
python3 launch.py6. Select the module part number:
Once the script starts, a module selection menu will appear in the terminal.
Find your required module part number in the list.
- Find your required module part number in the list.
Enter the corresponding selection number.
- Enter the corresponding selection number.
Press Enter to start the compilation.
- Press
Enterto start the compilation.
7. Wait for the compilation to complete.
The build script will compile the SDK for the selected module.
After successful compilation, you can proceed to locate the generated firmware output and prepare it for flashing.
In my case, I am testing the LE270-CN-1S3W6-00-OPEN module.
From the module selection menu:
Select option 6.
- Select option 6.
Press Enter to start the compilation.
- Press Enter to start the compilation.
Once the compilation is completed successfully, you will see the [PASS] message in the VS Code terminal.
This confirms that the SDK has been compiled successfully for the selected module.
After successful compilation, the .binpkg firmware package will be generated at the following location:
You can use this generated .binpkg file for the next step: flashing the firmware onto the LE270 module.
After successful compilation, locate the generated .binpkg firmware package.
1. Copy the firmware package to Windows
Copy the generated .binpkg file from the Ubuntu WSL environment to your Windows machine.
2. Open Fibocom Flash Tools
Launch FlashTools V4.1.17 on Windows.
3. Select the USB initialization configuration
Click Browse next to the configuration file field.
- Click Browse next to the configuration file field.
Select the config_pkg_product_usb.ini file from the Flash Tools directory.
- Select the
config_pkg_product_usb.inifile from the Flash Tools directory.
4. Load the firmware package
Click the three-dot (...) button next to the package field.
- Click the three-dot (
...) button next to the package field.
Browse to the location where you copied the generated .binpkg file.
- Browse to the location where you copied the generated
.binpkgfile.
Select the firmware package.
- Select the firmware package.
5. Verify the package information
After loading the package, verify that the firmware components are displayed in the package list.
6. Start firmware flashing
Connect the LE270 development board to your PC through USB and select the appropriate COM port.
Click Reset and download to start the firmware flashing process.
Wait until the flashing process completes successfully.
Follow these steps to flash the compiled firmware onto your LE270 development board.
1. Enter USB Boot Mode
Press and hold the USB_BOOT pin.
- Press and hold the USB_BOOT pin.
Power ON the development board while keeping the USB_BOOT pin pressed.
- Power ON the development board while keeping the USB_BOOT pin pressed.
Connect the board to your PC through USB.
- Connect the board to your PC through USB.
2. Configure Flash Tools
Open Fibocom Flash Tools V4.1.17.
- Open Fibocom Flash Tools V4.1.17.
Select the detected USB COM port (for example, COM113).
- Select the detected USB COM port (for example, COM113).
Verify that the correct USB configuration file is loaded.
- Verify that the correct USB configuration file is loaded.
Confirm that the generated .binpkg firmware package is selected.
- Confirm that the generated
.binpkgfirmware package is selected.
3. Start Firmware Download
Click the Download button.
- Click the Download button.
Monitor the download progress in the Status window.
- Monitor the download progress in the Status window.
Wait until the progress reaches 100%.
- Wait until the progress reaches 100%.
4. Complete the Flashing Process
Once the download reaches 100%, verify that the Status window displays:
Downloading process success
Download progress: 100%Click Disconnect to complete the process.
<escape>Result:</escape> The LE270 development board has been successfully flashed with the newly compiled firmware.
You can now proceed to test the firmware on the development board.
Once the firmware has been successfully flashed onto the LE270 development board, you can start debugging and testing your application.
You can use Visual Studio Code to:
Browse and modify the SDK source code.
- Browse and modify the SDK source code.
Debug and troubleshoot application code.
- Debug and troubleshoot application code.
Make changes to the firmware.
- Make changes to the firmware.
Rebuild the SDK and flash updated firmware onto the module.
- Rebuild the SDK and flash updated firmware onto the module.
If you encounter problems while switching or checking out Git branches, run the following commands from your SDK repository directory.
1. Reset the working directory:
git reset --hard2. Remove untracked files and directories:
git clean -fd3. Switch to the required branch:
git checkout <branch-name>Replace <branch-name> with the actual branch name.
Important:git reset --hard discards uncommitted changes, and git clean -fd deletes untracked files and directories. Back up any important work before running these commands.
Congratulations! You have successfully set up the Fibocom LE Series SDK development environment on Windows using Windows Subsystem for Linux (WSL) and Ubuntu 16.04.
Throughout this tutorial, we covered:
Enabling and configuring WSL on Windows.
- Enabling and configuring WSL on Windows.
Installing Ubuntu 16.04.
- Installing Ubuntu 16.04.
Setting up the development environment and Python 3.8.0.
- Setting up the development environment and Python 3.8.0.
Configuring SSH access for the Fibocom Git repository.
- Configuring SSH access for the Fibocom Git repository.
Cloning the LE270 SDK and opening it in Visual Studio Code.
- Cloning the LE270 SDK and opening it in Visual Studio Code.
Building the firmware for the LE270-CN-1S3W6-00-OPEN module.
- Building the firmware for the LE270-CN-1S3W6-00-OPEN module.
Generating the .binpkg firmware package.
- Generating the
.binpkgfirmware package.
Flashing firmware onto the LE270 development board.
- Flashing firmware onto the LE270 development board.
Debugging and testing the application.
- Debugging and testing the application.
With this environment ready, you can start developing, modifying, compiling, and testing your own applications using the Fibocom LE Series SDK.
Happy Coding and Happy IoT Development with Fibocom!



_LSu6OxbI3P.png)



Comments