当前位置:网站首页>Hezhou Cat1 4G module Air724UG is configured with RNDIS network card or PPP dial-up, and the development board is connected to the Internet through the RNDIS network card (taking the RV1126/1109 devel
Hezhou Cat1 4G module Air724UG is configured with RNDIS network card or PPP dial-up, and the development board is connected to the Internet through the RNDIS network card (taking the RV1126/1109 devel
2022-08-04 18:00:00 【51CTO】
前言
本教程使用Ubuntu16.04,The development board used is RockchipRV1109、4GThe module is launched by HezhouAir724UG Cat1.Official at RockchipSDKThe source code is compiled without any configuration or modification,The development board is not recognized correctly4G模块的.In order to allow the development board to be correctly identified4GNetwork card and able to access the Internet,It is necessary to configure and modify the source code.
不同的4GModules are differentVID和PID,合宙Cat1 Air724UG的VID和PID为(0x1782,0x4e00),Cat4系列PID和VID为(0x1286,0x4e3d).this will be a.1.①中涉及,That is, add the device to the kernel source codeVID和PID.
一、源码修改
1./home/lihq/RV1109/kernel/drivers/usb/serial/option.cDirectory file source code modification
①首先进入目录/home/lihq/RV1109/kernel/drivers/usb/serial/

然后执行指令sudo vim option.c打开option.c文件,Add the following code in the corresponding position,That is, the addition device mentioned aboveVID和PID(VimThe use of the editor will not be explained too much here)



②Then enter the directory again/home/lihq/RV1109/kernel/drivers/usb/serial/,再打开文件usb_wwan.c.
Add the following code in the appropriate place:

到这里,All file codes of the kernel have been modified.Next comes the graphical configuration.
二、make menuconfig图形化配置
1.Enter the kernel source root directory
Execute in the kernel source root directorymake menuconfig指令:

2.修改相关配置
Press on the keyboard in the GUI/键,再输入RNDIS进行搜索.并且将与RNDISThe relevant options are configured as y或者m,That is, the relevant drivers are compiled into the kernel after configuration,启动时自动加载.


PPPDial-up drivers are the same,Press on the keyboard in the GUI/键,再输入PPP进行搜索.并且将与PPPThe relevant options are configured as y或者m.
三、Recompile the kernel and verify
1.重新编译内核
cd /home/lihq/RV1109 Enter the kernel source root directory
再进行编译
编译完成后,将得到的update.imgThe image file is burned to the development board by Rockchip development tools.

2.Verify in the development board
将4G模块通过USB连接开发板,给开发板上电.在终端输入ls /dev/ttyUSB*,If three can be identifiedUSB端口,即ttyUSB0、ttyUSB1、ttyUSB2,It indicates that the development board has been successfully identified4G模块.

再在终端输入ifconfig,则能看到RNDIS驱动提供的eth1网卡,and has been assigned successfullyIP.

再终端输入ping www.baidu.com,也能成功ping通百度.

总结
1:配置RNDIS 4GThere are two main steps in the network card,One is to modify the relevant kernel source code,其二是make menuconfig进行图形化配置,然后再重新编译内核.
2:When modifying the kernel source code,注意不要输错了,Otherwise, the configuration may fail.
3:其他开发板SDKThe source code is also modified by similar operations.
边栏推荐
猜你喜欢
随机推荐
如何让 JS 代码不可断点
Thrift IDL Sample File
php如何查询字符串以什么开头
Investigation and Research Based on the Involution Behavior of College Students
Web端即时通讯技术:WebSocket、socket.io、SSE
《机器学习理论到应用》电子书免费下载
树莓派通过API向企业微信推送图文
shell函数内如何调用另一个函数
使用scikit-learn计算文本TF-IDF值
LeetCode 899. Ordered Queues
Cholesterol-PEG-DBCO,CLS-PEG-DBCO,胆固醇-聚乙二醇-二苯基环辛炔科研试剂
Error when using sourcemap for reporting an error: Can‘t resolve original location of error.
CF86D Powerful array
R语言ggpubr包的ggline函数可视化折线图、设置add参数为mean_se和dotplot可视化不同水平均值的折线图并为折线图添加误差线(se标准误差)和点阵图、设置折线和数据点边框颜色
嵌入式开发:使用堆栈保护提高代码完整性
框架整合(二)- 使用Apache ShardingSphere实现数据分片
2018读书记
哈夫曼树(暑假每日一题 15)
【软件工程之美 - 专栏笔记】37 | 遇到线上故障,你和高手的差距在哪里?
图解LeetCode——899. 有序队列(难度:困难)









