Fibocom's 5G module FG160 is a series of 5G communication modules which support both 5G SA and NSA network architectures with faster transmission speed, better carrying capacity, and lower network latency.
FG160-EAU can support 3GPP Release 16 and NR CA. It can support up to LTE Cat19, and can support FDD & TDD ENDC. It has the standard interface of LGA, makes it convenient for customers to update products quickly and respond to the commercial needs of quick landing. It applies to gateway, industrial monitoring, remote medical treatment, UAV, virtual reality and immersive experience (VR and AR).
This module is powered by Qualcomm’s chipset SDX62 with OpenLinux inside. This means that you can develop your own application to run on Linux platform without need an external MCU/CPU. Unlike what you may be thinking, this chipset is very powerful and allows you to control GPIOs, run a Web Interface and much more.
Here are some specifications: of the module:
Qualcomm SDX62, 7nm process, ARM Cortex-A7, up to 1.5 GHz 8Gb LPDDR4x + 8Gb NAND Flash USB3.1 Gen2 Super-speed (SS) interface, data transmission rate up to 10Gbps PCIe Gen3, x2 lanes Linux Kernel ≥ 5.4.197
In this guide we will create an FWA (Fixed Wireless Access) demo that will route a 5G connection to an laptop using ETH interface and managed by a web interface.
2. Requirements- EVK-LGA-F01 (baseboard development kit)
- ADP-FG160-EAU-00 (adapter board with FG160)
- CPB-ETH-00-00 (sub-board with RTL8125 ethernet controller)
- VSCode
- Linux or WSL (Windows Subsystem for Linux)
- Docker
- ADB
- Fastboot
- Git
- SDX62 OpenSDK*
- SDX62 Generic FW**
*The download of OpenSDK will be described on next steps.
** The generic FW will be provided by the FAE that is supporting you.
3. Getting SDX62 OpenSDKThe OpenSDK is provided using an Fibocom’s Git server.
To get it, you will need to install git and provide your ssh-key* public key to the FAE that is supporting you.
*For internal reasons, just 1 ssh-key is allowed by customer.
3.1 Generating SSH Key💡 You can just share your public key to the FAE and jump to next step if you already have your ssh-key available.
Open Git Bash (Windows) or your terminal (Linux) and run ssh-keygen
:
ssh-keygen -t ed25519 -C "your_email@example.com"
Press Enter
to use the default location or select another one:
> Enter a file in which to save the key (/home/YOU/.ssh/ALGORITHM):[Press enter]
Type a secure passphrase and press Enter
:
Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]
Then send the .pub
file generated to the FAE that is supporting you (The file is stored on the selected location from last step):
After added on Fibocom’s git server, you will receive two versions of baseline for SDK. The first one is sdx62-1-0-sdk and the second one is sdx62-1-2-sdk.
They have some differences, but to keep it simple, lets just use the sdx62-1-2-sdk because is newer and smaller.
Now, open an folder with terminal and run the command git clone
to start the download (dont’ forget to replace the USER by the user that Fibocom’s FAE has provided to you):
git clone ssh://USER@xa.fibocom.com:29418/mbb/sdx62-1-2-sdk
💡 Fibocom’s git servers has 2 subdomains on git servers. xa1.fibocom.com
→ to Chinese access xa.fibocom.com
→ to overseas access. If you are using xa1 outside China you should get ~100kbps of download.If you are using xa outshide China, then you should get ≥ 2Mbps of download.So, check and replace the address if necessary according to your location.
The sdx62-1-2-sdk has around 33.4 GB. Go take a coffe and come back after finish it.
After download is finished, you can double check the status of your current branch using git status
and git log
:
git status
git log
You can use any IDE, but today we will use VSCode.
- Right click on sdx62-1-2-sdk folder > Open with other applications and select VScode.
Or
- Open VScode, click on OpenFolder and select the extracted SDK files folder.
Now you workspace should be like below:
Depending the version of your SDK you can have more or less folder, but there is basically 5 important folders that will be described simply here:
- apps_proc: kernel and yocto files
- docs_and_tools: OpenSDK documentation, hello_world demo and filesystem tools
- fibo_project_config: compilation settings
- image: make boot script and output files
- make_partition: tools to create your own Linux partition
We will talk more about each of this folders during this documentation.
4.3 Docker ContainerInstead download a lot of softwares and dependencies you can just use an Docker container to get a ready-to-go compilation environment. (To get more details about it clicking here)
If you do not have Docker installed yet, follow Docker instructions to download and install it.
4.3.1 Download Image and Mount folderOpen your extracted SDK workspace in VSCode, click on terminal and then run the command bellow to download image and mount the current folder in container:
docker run -di --name sdx62_sdk --mount type=bind,source=$PWD/,target=/home/openlinux victorffs/sdx62_sdk:latest &
Run docker start
to initiate the container and access the bash:
docker start sdx62_sdk && docker exec -it sdx62_sdk bash
Now that you have your environment done, lets start to make our kernel and system.
To compile the kernel, you could just run the script build_kernel.sh
with the desired parameters.
But lets do some modifications on OpenSDK before that.
5. Make Kernel and SystemBefore start any compilation is important to mention that the first build will take a lot of time. OpenSDK for sdx62 is based on Yocto/Bitbake and it will require to download and compile a lot of resources.
This process is VERY HEAVY! It can take 30min to 120min to finish, and will use a lot of resources from your PC. So, keep this in mind to ensure that you will have to wait and likely leave your computer free just for that (its really recommended close Chrome and other apps).
The SDK will increase the storage size from ≃ 33.4GB to ≃ 120GB, so confirm that you will have enough space.
The good point is that this process will be required just on first time. After that it will be reduced to less than 20min (depending your computer settings).
5.1 Make menuconfig (optional)The menuconfig is a CLI tool to help us to customize some kernel settings. It's very similar to the menuconfig from ESP, Raspberry, Fibocom’s NL668 OpenSDK or others platforms which allow us to modify settings before create the firmware.
The first run of any build command should take a lot of time because the system will download and compile the yocto resources.
./build_kernel.sh menuconfig
Wait to compile some resources and choose the Project (module version) you want to compile. In my case I will select PRJ_FG160_EAU_00 (Option 3)
After selection the bitbake will start to download and compile resources.
After the screen below appears go take another coffee and live your life… It will take a lot of time as mentioned before 😅
After finished you should see this screen:
The menuconfig provide us a lot of settings like add/remove drivers, library routines, manage the power and set file systems.
By default the menuconfig setup is stored on sdx62-1-2-sdk/apps_proc/build/tmp-glibc/work/sdxlemur-oe-linux-gnueabi/linux-msm/5.4-r0/build
We will talk more about drivers and kernel modifications on future tutorials. So just select Exit
and go to next step.
Lets finally compile our kernel!
5.2 Make KernelYou can compile your current SDK using ./build.sh
.
./build.sh
The script will ask which project (module) do you want to compile. Select input the number option and press Enter
:
Now you need to select which part of system do you want to compile.
Let’s compile just the kernel for now using build_kernel
(option 1):
Each of build menu compilation will generate different files on image/
folder.
For the case of build_kernel it will generates the sdxlemur-boot.img
, sdxlemur-recovery.img
, vmlinux
We will use it on next steps to flash firmware.
5.3 Make apps_procYou need to compile the apps_proc to build the rootfs with drivers and some extra applications to run this demo.
So, run ./build_apps_proc.sh
, select your module version (option 3) and build_apps_proc (option 1):
./build_apps_proc.sh
If asked about Clean Last Build, you can input no
to improve the compilation time:
The output files will be available at image/SDX65_Build_Version/
for this demo we will use just sysfs
, usrfs
and recoveryfs
on next step:
Extract the generic SDX62 FW provided by the FAE that is supporting you. (In this case we will use the FG160-EAU-00 FW version 89115.1000.00.02.04.07)
Get into FW Folder > Maincode and replace the generic files by the new generated by your kernel compilation (sdxlemur-boot.img, sdxlemur-recovery.img and vmlinux) from /sdx62-1-2-sdk/image
:
Then replace the generic FS files by the new generated by your apps_proc compilation (sdxlemur-recoveryfs.ubi, sdxlemur-sysfs.ubi and sdxlemur-usrfs.ubi) from /sdx62-1-2-sdk/image/SDX65_Build_Version
:
Now, lets flash your new FW.
6. Flashing FWThere is some different ways to flash the FW into your module.
I will provide a complete tutorial on future about all different ways to flash.
Here I will show just 2 ways to flash: on Windows and Linux.
The applications mentioned here is available on FG160 documentation folders. But you can ask for FAE support if needed.
6.1 Flashing FW on Windows computerYou should need the module Drivers on Windows.
Extract and install the FbUSBDeviceSetup.exe if you have not installed before:
Connect the power supply on your EVK board (baseboard) and plug the USB-C Cable on your ADP board (with FG160):
Use the Device Manager to check if the Fibocom USB AT port is available:
Extract the Common FW Updater Tool and run FW_Updater.exe
:
On FW_Updater.exe select the AT COM Port
, Whole Package
mode, point the programmer path to the FW prog_firehose_lite.elf
and click Download
:
Then wait the whole process to finish:
To flash FW on Linux you can use the CLI upgrade_tool. You can find the source code/binaries on FG160 Linux documentation provided by FAE. If needed, you can request to your FAE some crosscompiled binary to flash on other architectures like ARM.
Connect the power supply on your EVK board (baseboard) and plug the USB-C Cable on your ADP board (with FG160):
Copy the ./upgrade_tool
into the same folder of the generic/modified FW folder:
Open terminal and run sudo ./upgrade_tool -f FOLDER_NAME
replacing the -f
parameter by the named folder you want to flash it as below:
sudo ./upgrade_tool -f 89115.1000.00.02.04.07
Wait finish the process:
The module will automatically restart after flashing.
Now lets go test our module!
7. Testing FW7.1 Preparing DevkitFibocom has some Sub-boards called CPB that can enable new functionalities to the devkits.
As the idea of this tutorial is to enable an FWA application, we will use the CPB-ETH-00* board to enable the Ethernet interface (using Realtek RTL8125) to forward the Internet connection from carrier network to the ETH device that will be plugged.
💡 *Obs.: In this demo we will use just the Ethernet port, but you could use another CPB that is the CPB-WLAN-01 for example to enable Ethernet + WiFi interfaces.
Unplug your power supply, then connect the CPB board and Ethernet cable from your PC to the 2.5G port:
Then connect a SIMCard to your ADP board:
Now we will do 2 different tests. The first one is to access the ADB shell to run some Linux commands. The second one will access the FWA Default Web Server.
7.2 Testing ADB shellIf this is your first OpenSDK flash, your module probably is on default USB mode and the ADB is disabled.
So, to enable it open Putty (or any other terminal serial interface) or Minicom (usually the default port mounted is /dev/ttyUSB1 on Linux) and send some commands. Let’s enable the data autoconnection, enable the ADB and network interface:
AT+GTAUTOCONNECT=1
AT+GTUSBMODE=18
The module will automatically restart after send the command.
Wait to restart and check if the ADB is available:
adb devices
Now, let’s access it using adb shell
and check the system information using uname -a
:
adb shell
uname -a
Probably you already has noticed that this is a Linux terminal. So you can input any Linux command and use as any embedded Linux device.
If you have sent the AT+GTAUTOCONNECT=1 command as suggested on the start of this section, you can use ifconfig
to check your network interface settings.
I will highlight just the rmnet_data0 here because this is our internet conection provided by carrier.
By the way, if you need to send any AT commands, you can use the ADB interface for that. So, in OpenLinux shell use nc 127.0.0.1 40096
to enable the send internal AT commands. Let’s try ATI
and AT+GTCOPS
to get your FW version and your APN settings:
Your PC probably already has detected the ethernet network interface and is connected on internet. Just let’s take a look on the FWA Web Server. Open your Internet Browser and access 192.168.1.1
, change the language to english
, type the password 12345678
then click Log In
:
Now you can manage your 5G FWA router using your browser:
Congratulations! You have finished your first 5G FWA quickstart.
You can check the troubleshooting below or feel free to contact us to support you.
8. Troubleshooting8.1 Can’t access ADB Shell on LinuxIf you are having some permission issues to access the ADB interface on Linux, you probably need to create or edit udev rules. You can manually check your vendor and product id, or just run the following commands on terminal:
sudo sh -c "echo '# Fibocom FG160' >> /etc/udev/rules.d/51-android.rules"
sudo sh -c "echo 'SUBSYSTEM==\\"usb\\", ATTR{idVendor}==\\"2cb7\\", ATTR{idProduct}==\\"0105\\", MODE=\\"0666\\", GROUP=\\"plugdev\\"' >> /etc/udev/rules.d/51-android.rules"
sudo sh -c "echo '# Google Inc. (fastboot)' >> /etc/udev/rules.d/51-android.rules"
sudo sh -c "echo 'SUBSYSTEM==\\"usb\\", ATTR{idVendor}==\\"18d1\\", ATTR{idProduct}==\\"d00d\\", MODE=\\"0666\\", GROUP=\\"plugdev\\"' >> /etc/udev/rules.d/51-android.rules"
sudo service udev restart
echo "Done! Reconnect your usb cable now."
8.2 Can’t flash FWIf by any reason your module is no booting or flashing, you can force it with the QDL mode. Keep the DL button pressed on ADP boad when power the board to force it to enter in QDL mode.
Then you will see an QDL device on your device manager to flash it using the tools from this tutorial.
8.3 Ethernet not workingIf the connection manager of your computer is not correctly detecting the Ethernet port from FG160 DevKit (maybe got stuck on “identifying connection” and/or detects just 100Mbps of local network speed) you should having some poor contact issue on CPB board.
You can check if the ETH was correctly detected using dmesg:
dmesg | grep -i r8125
And should return some message like below:
Then you can double check if the driver module was loaded correctly using lsmod to check r8125
and r8125_ioss
:
lsmod
This drivers modules should be loaded automatically. But you can load it manually if needed:
rmmod r8125 # to disable
rmmod r8125_ioss # to disable
modprobe r8125 # to enable
modprobe r8125_ioss # to enable
Comments
Please log in or sign up to comment.