当前位置: 首页>編程日記>正文

Linux 4G/5G 驱动移植、实践测试记录

Linux 4G/5G 驱动移植、实践测试记录

本篇记录SIMCOM7600ce (LTE CAT4)、SIM8200 (5G) 模块驱动程序移植过程,备忘记录。

移植环境:
嵌入式平台NUC980 ARM9,内核版本linux-4.4 版本,内核中已经有 ppp 拨号软件,只需要在内核编译前打开设置选项就可以。采用拨号 RNDIS 方式。

1). 内核配置4G/5G 模块相关选项汇总如下

> Device Drivers 
--> USB support
-- -->  USB Serial Converter support
-- -- <*>   USB driver for GSM and CDMA modems> Device Drivers 
--> Network device support 
-- -- <*>   PPP (point-to-point protocol) support                                                                                            
-- -- <*>     PPP BSD-Compress compression                                                                                  
-- --  <*>     PPP Deflate compression                                                                                                       
-- -- [*]     PPP filtering                                                                                                                 
-- -- < >     PPP MPPE compression (encryption)                                                                                             
-- -- [*]     PPP multilink support                                                                                                         
-- --  <*>     PPP over Ethernet                                                                                                             
-- -- < >     PPP over IPv4 (PPTP)                                                                                                          
-- --  < >     PPP over L2TP                                                                                                                 
-- -- <*>     PPP support for async serial ports                                                                                            
-- --  <*>     PPP support for sync tty ports

注:其中关于网络部分基础选项、usb相关基础选项,根据需求自行添加。

2). 每个模块NDIS拨号脚本内容
2.1) simcom7600ce ndis 拨号脚本

echo -e "at\n\r">/dev/ttyUSB2
sleep 1
echo -e "AT+CUSBPIDSWICTH=9011,1,1\n\r">/dev/ttyUSB2
sleep 1
echo -e "at+csq?\n\r">/dev/ttyUSB2
sleep 1
# 电信卡的接入点ANP = ‘ctnet’
echo -e "at+cgdcont=6,\"ipv4v6\",\"ctnet\"\n\r">/dev/ttyUSB2
sleep 1
echo -e "at+cgact=1,1\n\r">/dev/ttyUSB2
sleep 2
echo -e "at+cgpaddr=1\n\r">/dev/ttyUSB2
sleep 3
udhcpc -i usb0 &
sleep 1

2.2) A7600C1 (LTE CAT1 模块)拨号脚本,此模块有自动识别运营商APN的功能,所以没有设置APN的内容。

echo -e "at\n\r">/dev/ttyUSB2
sleep 1
echo -e "AT+CUSBPIDSWICTH=9011,1,1\n\r">/dev/ttyUSB2
sleep 1
echo -e "at+dialmode=0\n\r">/dev/ttyUSB2
sleep 3
udhcpc -i usb0 &
sleep 3

2.3) SIM8200 5G模块的ndis拨号脚本

echo -e "at\n\r">/dev/ttyUSB2
sleep 1
# 此处配置pid = 9011 为ndis拨号方式,预防模块为其他类型拨号参数
echo -e "AT+CUSBCFG=usbid,1e0e,9011\n\r">/dev/ttyUSB2
sleep 1
echo -e "at+csq\n\r">/dev/ttyUSB2
sleep 1
# 移动卡的接入点ANP = ‘cmnet’
echo -e "at+cgdcont=1,\"ip\",\"cmnet\"\n\r">/dev/ttyUSB2
sleep 1
echo -e "at+cgact=1,1\n\r">/dev/ttyUSB2
sleep 2
echo -e "at+cgpaddr=1\n\r">/dev/ttyUSB2
sleep 1
echo -e "AT+cpsi?\n\r">/dev/ttyUSB2
sleep 3
udhcpc -i usb0 &
sleep 1

2.4) 华为ME909s 模块移动卡拨号脚本

echo -e "at\n\r">/dev/ttyUSB0
sleep 1
echo -e "at+csq?\n\r">/dev/ttyUSB0
sleep 1
echo -e "at+cgdcont=1,\"ip\",\"cmnet\"\n\r">/dev/ttyUSB0
sleep 1
echo -e "at+cgact=1,1\n\r">/dev/ttyUSB0
sleep 3
echo -e "at+cgpaddr=1\n\r">/dev/ttyUSB0
sleep 1
echo -e "at^ndisdup=1,1\n\r">/dev/ttyUSB0
sleep 1
udhcpc -i usb0 &
sleep 1

2.5)深圳有方的N720 模块电信卡拨号

echo -e "at\n\r">/dev/ttyUSB0
sleep 1
echo -e "at+csq?\n\r">/dev/ttyUSB0
sleep 1
echo -e "at+cgdcont=1,\"ip\",\"ctnet\"\n\r">/dev/ttyUSB0
sleep 1
echo -e "at+cgact=1,1\n\r">/dev/ttyUSB0
sleep 2
echo -e "at+cgpaddr=1\n\r">/dev/ttyUSB0
sleep 3
udhcpc -i usb0 &
sleep 1
  1. 测试验证信息如下:

3.1) 华为me906s 模块插入后识别usb识别信息

usb 1-2: new high-speed USB device number 2 using nuc980-ehci
usb 1-2: New USB device found, idVendor=12d1, idProduct=15c1
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: HUAWEI Mobile V7R11
usb 1-2: Manufacturer: Huawei Technologies Co., Ltd.
usb 1-2: SerialNumber: 0123456789ABCDEF
cdc_ether 1-2:2.0 usb0: register 'cdc_ether' at usb-nuc980-ehci-2, CDC Ethernet Device, 02:1e:10:1f:00:00
option 1-2:2.2: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
option 1-2:2.3: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
option 1-2:2.4: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
option 1-2:2.5: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB3
option 1-2:2.6: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB4

3.2) SIMCOM8000 5G模块usb2.0打印信息

usb 1-2: new high-speed USB device number 3 using nuc980-ehci
usb 1-2: device descriptor read/64, error -71
//此处的pid为9001是 qcom 拨号方式
usb 1-2: New USB device found, idVendor=1e0e, idProduct=9001 
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: SDXPRAIRIE-MTP _SN:0987AA7D
usb 1-2: Manufacturer: QCOM
usb 1-2: SerialNumber: 0123456789ABCDEF
option 1-2:1.0: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
option 1-2:1.1: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
option 1-2:1.2: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
option 1-2:1.3: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB3
option 1-2:1.4: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB4

至此,4G / 5G 模块移植完成。


https://www.fengoutiyan.com/post/13376.html

相关文章:

  • fpga远程固件升级
  • 4g模块改5g模块
  • 4G卡放在5G手机能用吗
  • fpga 网卡
  • zynq驱动开发
  • zynq远程升级
  • 刚买4G手机就要5G了
  • FPGA驱动
  • 鏡像模式如何設置在哪,圖片鏡像操作
  • 什么軟件可以把圖片鏡像翻轉,C#圖片處理 解決左右鏡像相反(旋轉圖片)
  • 手機照片鏡像翻轉,C#圖像鏡像
  • 視頻鏡像翻轉軟件,python圖片鏡像翻轉_python中鏡像實現方法
  • 什么軟件可以把圖片鏡像翻轉,利用PS實現圖片的鏡像處理
  • 照片鏡像翻轉app,java實現圖片鏡像翻轉
  • 什么軟件可以把圖片鏡像翻轉,python圖片鏡像翻轉_python圖像處理之鏡像實現方法
  • matlab下載,matlab如何鏡像處理圖片,matlab實現圖像鏡像
  • 圖片鏡像翻轉,MATLAB:鏡像圖片
  • 鏡像翻轉圖片的軟件,圖像處理:實現圖片鏡像(基于python)
  • canvas可畫,JavaScript - canvas - 鏡像圖片
  • 圖片鏡像翻轉,UGUI優化:使用鏡像圖片
  • Codeforces,CodeForces 1253C
  • MySQL下載安裝,Mysql ERROR: 1253 解決方法
  • 勝利大逃亡英雄逃亡方案,HDU - 1253 勝利大逃亡 BFS
  • 大一c語言期末考試試題及答案匯總,電大計算機C語言1253,1253《C語言程序設計》電大期末精彩試題及其問題詳解
  • lu求解線性方程組,P1253 [yLOI2018] 扶蘇的問題 (線段樹)
  • c語言程序設計基礎題庫,1253號C語言程序設計試題,2016年1月試卷號1253C語言程序設計A.pdf
  • 信奧賽一本通官網,【信奧賽一本通】1253:抓住那頭牛(詳細代碼)
  • c語言程序設計1253,1253c語言程序設計a(2010年1月)
  • 勝利大逃亡英雄逃亡方案,BFS——1253 勝利大逃亡
  • 直流電壓測量模塊,IM1253B交直流電能計量模塊(艾銳達光電)
  • c語言程序設計第三版課后答案,【渝粵題庫】國家開放大學2021春1253C語言程序設計答案
  • 18轉換為二進制,1253. 將數字轉換為16進制
  • light-emitting diode,LightOJ-1253 Misere Nim
  • masterroyale魔改版,1253 Dungeon Master
  • codeformer官網中文版,codeforces.1253 B
  • c語言程序設計考研真題及答案,2020C語言程序設計1253,1253計算機科學與技術專業C語言程序設計A科目2020年09月國家開 放大學(中央廣播電視大學)
  • c語言程序設計基礎題庫,1253本科2016c語言程序設計試題,1253電大《C語言程序設計A》試題和答案200901
  • 肇事逃逸車輛無法聯系到車主怎么辦,1253尋找肇事司機