Xun ported 4G-EC20 to iTOP4418 development board Qt system

By configuring the linux kernel driver, transplant the ppp dial tool in the file system to transplant the EC20 to the Qt system and the smallest linux system. The software packages and documents required for the migration are in the network disk information "iTOP4418 development board information summary (not including the CD content)\09_iTOP- 4418 development board minimum
linux_Qt_ Ubuntu  extended document\23_chapter_porting EC20" download.
The EC20 module is packaged into a standard PCIe interface and communicates with the development board mainly through usb. The files provided this time include pppd source code, compiled chat and pppd tools, wcdma, wcdma_back, wcdma-chatconnect, wcdma-chat-disconnect, and the pppd_conf.sh script to be used at the end of the document, as shown in the following figure

before compiling To modify the compiler to arm-2009q3 compiler first, please refer to manual 5.2.2 "Cross Compiler Tool Installation" for how to set the compiler. In addition, in order to avoid problems that may arise when using environment variables to set the compiler, most of the compilation in the document uses the absolute path of the compiler, and users should also find the absolute path of their own compiler for use. The following figure shows the compiler used in this compilation and the compiler compressed package.

The above figure shows that the absolute path of the compiler is "/usr/local/arm/arm-2009q3/bin/ arm-nonelinux-gnueabi-gcc".
63.1 Driver support
First, you need to  make certain modifications to the  Linux kernel driver to enable the operating system to support EC20. First, add VID and PID, that is, the manufacturer ID and device ID of the usb. Add the following two items to the kernel /drivers/usb/serial/option.c file in the kernel source code
#define EC20_VID 0x1E0E
#define EC20_PID 0x9001
as shown in the figure below

Then search for option_ids and add the following content in the option_ids list.
USB _DEVICE(EC20_VID, EC20_PID) },
as shown in the figure below.

Go back to the kernel directory and configure the following two items of make menuconfig.

  • Device Drivers →
  • USB Support →
  • USB Serial Converter support →


  • Select all USB driver for GSM and CDMA modems and <*> PPP*** in Device Drivers> Network device support,

    then compile the kernel and burn it to the development board.
    63.2 Compile the ppp dial-up tool
    Unzip the provided source code to Ubuntu and enter the unzipped folder, as shown in the figure below.

    Use the "./configure" command to configure the source code, as shown in the figure below.

    Use the command "make CC=/usr/local/arm/arm-2009q3/bin/ arm-none-linux-gnueabigcc" to compile the source code. Note that the absolute path of the compiler is used here.

    Compilation is now complete, you can see that the pppd tool is generated in the pppd folder, and the chat tool is generated in the chat folder, as shown in the figure below.

    63.3 Copy tool
    Download the pppd and chat tools generated in the above steps to the /usr/sbin/ directory of the development board. Copy the scripts wcdma,
    wcdma-chat-connect, and wcdma-chat-disconnect provided by the compressed package to the /etc/ppp/peers/ directory of the development board.
    63.4 Test
    First install the antenna on the development board, as shown in the figure below.

    After inserting the phone card, restart the development board, and copy the script pppd_conf.sh to the development board, and then use the command "./pppd_conf.sh &" to run the script. The result is shown in the figure below.

    Use the command "ping -c 4 www.baidu.com &" to test, you can see that the network connection is successful (because the 4G connection needs to search for the signal, so you need to wait for a while in the area with poor signal to get online)

    migration is completed here.

Guess you like

Origin blog.csdn.net/mucheni/article/details/114669614