当前位置: 代码迷 >> 综合 >> NXP设备上面4G/5G模块调试过程
  详细解决方案

NXP设备上面4G/5G模块调试过程

热度:42   发布时间:2024-02-06 08:52:35.0

一、硬件信息

4G模块:龙尚U9300C

5G模块:龙尚EX510

CPU(LS1023AX)

4G/5G模块的硬件接口是通过两个pci转usb接口的

 

二、根据龙尚的指导文档添加相应的驱动模块,在option.c里面添加相应的pid和vid

1、模块识别

一开始插上5G模块的时候,模块不识别。提示

[   12.615593] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?

后面修改硬件让5G模块上电复位以后能识别了。

插入4G和5G模块,启动设备以后,可以通过lsusb看到识别模块的pid和vid

2df3和5b01就是对应的5G模块EX510

root@localhost:~# lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2df3:5b01  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

这里5G模块接到usb2.0下面去了,如果想让它接到usb3.0上面去的话,不知道是要通过硬件问题还是软件文件?

对比了nxp的参考板,usb接口插上去,是识别usb3.0的

2、ttyUSB*调试

通过dmesg | grep tty找到5G模块生成的ttyUSB

[    4.604025] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[    4.620487] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[    4.636953] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[    4.657756] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3

然后就可以调试ttyUSB了,对应5G模块的at接口,龙尚文档里面都有,不知道的话,一个一个试一下也能试出来。

这里是ttyUSB0。

 

三、pci模块验证

买了一个mini pcie转千兆网口配件(瑞联的)千兆网卡是82574L

插上去以后就lspci就能直接看到新接的设备了。

root@localhost:~# lspci
0000:00:00.0 PCI bridge: Freescale Semiconductor Inc Device 8088 (rev 11)
0000:01:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
0001:00:00.0 PCI bridge: Freescale Semiconductor Inc Device 8088 (rev 11)

内核模块添加网卡驱动(CONFIG_IGB=y)

  | Symbol: IGB [=m]                                                                                                                                                                                                                     || Type  : tristate                                                                                                                                                                                                                     || Prompt: Intel(R) 82575/82576 PCI-Express Gigabit Ethernet support                                                                                                                                                                    ||   Location:                                                                                                                                                                                                                          ||     -> Device Drivers                                                                                                                                                                                                                ||       -> Network device support (NETDEVICES [=y])                                                                                                                                                                                    ||         -> Ethernet driver support (ETHERNET [=y])                                                                                                                                                                                   || (1)       -> Intel devices (NET_VENDOR_INTEL [=y])                                                                                                                                                                                   ||   Defined at drivers/net/ethernet/intel/Kconfig:83                                                                                                                                                                                   ||   Depends on: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_INTEL [=y] && PCI [=y]                                                                                                                                                  ||   Selects: I2C [=y] && I2C_ALGOBIT [=m]                                                                                                                                                                                              ||   Implies: PTP_1588_CLOCK [=m]

 

驱动添加以后,ifconfig -a就可以看到多出一个接口来了

enp1s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500ether 6c:b3:11:54:07:78  txqueuelen 1000  (Ethernet)RX packets 0  bytes 0 (0.0 B)RX errors 0  dropped 0  overruns 0  frame 0TX packets 0  bytes 0 (0.0 B)TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0device interrupt 79  memory 0x48400c0000-48400e0000  

 

  相关解决方案