peter li1:
大家好,我在DM368上使用pppd拨号3G无线上网卡,功能已经实现了,但拨号很不稳定,
有时候拨号会失败,有时候发送数据时网络会卡死,出错的时候都有下面的log;
root@dm368-evm:/# pppd debug 1 kdebug 7 call unicom&
root@dm368-evm:/# Script /usr/sbin/chat -v -f /etc/ppp/peers/unicom-chat finished (pid 1609), status = 0x4
Connect script failed
drivers/usb/serial/option.c: option_close
drivers/usb/serial/option.c: option_indat_callback: c257e300
drivers/usb/serial/option.c: option_indat_callback: nonzero status: -2 on endpoint 02.
drivers/usb/serial/option.c: option_indat_callback: c257e700
drivers/usb/serial/option.c: option_indat_callback: nonzero status: -2 on endpoint 02.
drivers/usb/serial/option.c: option_indat_callback: c257e480
drivers/usb/serial/option.c: option_indat_callback: nonzero status: -2 on endpoint 02.
drivers/usb/serial/option.c: option_indat_callback: c257e980
drivers/usb/serial/option.c: option_indat_callback: nonzero status: -2 on endpoint 02.
只要出现
drivers/usb/serial/option.c: option_indat_callback: nonzero status: -2 on endpoint 02.
网络就会出错,我们使用的是USB接口的3G上网卡,不知道是跟USB驱动有关还是跟pppd的拨号设置有关?
请大家不吝赐教,谢谢了!
Feng Dong:
回复 peter li1:
用的哪个kernel版本?应该和驱动关系大一些.google一下吧.
peter li1:
回复 Feng Dong:
您好,我使用的是DM368评估板自带的dvsdk_dm368_4_02_00_06里面的kernel,linux-2.6.32.17-psp03.01.01.39
现在是怀疑USB驱动这块有问题了,我还要进一步调试。
如果您有相关的经验,请一起讨论下。
peter li1:
回复 peter li1:
#define EPROTO 71 /* urb 发生错误: 在传送中发生bitstuff 错误或硬件没有及时收到响应帧 */
Yaoming Qin:
回复 peter li1:
这个是一个通用的驱动,你最好在pc上测测这个usb 3g dongle是否稳定先
peter li1:
回复 Yaoming Qin:
我使用的是huawei E180上网卡,这个卡在mini2440和PC ubuntu上运行都是很稳定的。
我在网上搜到了一篇文章,
blog.21ic.com/…/67075.html
2.DMA部分的BUG
MUSB系列的DMA模式分为3种。DMA MODE 0,DMA MODE 1 REQ MODE 0, DMA MODE 1 REQ MODE 1。
其中DMA MODE 1 REQ MODE 1在MUSBHDRC上无法正常工作,一旦FIFO里有Packet,并且< MAXP 则不会再来中断。
DMA MODE 1 REQ MODE 0在连续的发起DMA请求时候会挂住总线,导致系统锁死,而且因为DMA MODE 1 REQ MODE 0必须知道数据总量的限制,在很多的USB上层的协议中都无法使用。
DMA MODE 0在Device方式时效率低下,不考虑。
解决:
只能在SOC级解决,可以见到Davinci和TUSB都没有使用MUSBHDRC的DMA控制器,都是在SOC上做了一个DMA控制器实现相关DMA操作。
我不知道我现在遇到的网络卡死是不是他说的这个问题?请专家指教。
peter li1:
回复 peter li1:
3G拨号成功后,设置DM368为路由,PC通过以太网网口接入DM368,出口是3G无线网卡。
执行ping 8.8.8.8,打印下面的正常log;
drivers/usb/serial/option.c: option_write: endpoint 1 buf 0
drivers/usb/serial/option.c: option_outdat_callback
drivers/usb/serial/option.c: option_write: wrote (did 1)
drivers/usb/serial/option.c: option_indat_callback: c1ab7980
drivers/usb/serial/option.c: option_indat_callback: c1ab7080
drivers/usb/serial/option.c: option_set_termios
drivers/usb/serial/option.c: option_send_setup
drivers/usb/serial/option.c: option_send_setup
drivers/usb/serial/option.c: option_chars_in_buffer: 0
drivers/usb/serial/option.c: option_set_termios
drivers/usb/serial/option.c: option_send_setup
drivers/usb/serial/option.c: option_chars_in_buffer: 0
drivers/usb/serial/option.c: option_chars_in_buffer: 0
drivers/usb/serial/option.c: option_write: write (45 chars)
drivers/usb/serial/option.c: option_write: endpoint 1 buf 0
drivers/usb/serial/option.c: option_outdat_callback
drivers/usb/serial/option.c: option_write: wrote (did 45)
drivers/usb/serial/option.c: option_indat_callback: c1ab7b80
drivers/usb/serial/option.c: option_indat_callback: c1ab7b00
然后在PC上打开暴风影音观看在线视频,选择720P高清,几分钟后,网络卡死;
这时候在Dm368上执行ping,无输出,打印下面的log;
drivers/usb/serial/option.c: option_write: write (250 chars)
drivers/usb/serial/option.c: option_write: endpoint 1 buf 0
drivers/usb/serial/option.c: option_outdat_callback
drivers/usb/serial/option.c: option_write: wrote (did 250)
drivers/usb/serial/option.c: option_write: write (250 chars)
drivers/usb/serial/option.c: option_write: endpoint 1 buf 0
drivers/usb/serial/option.c: option_write: wrote (did 250)
drivers/usb/serial/option.c: option_write: write (143 chars)
drivers/usb/serial/option.c: option_write: endpoint 1 buf 1
drivers/usb/serial/option.c: option_write: wrote (did 143)
drivers/usb/serial/option.c: option_outdat_callback
drivers/usb/serial/option.c: option_outdat_callback
drivers/usb/serial/option.c: option_write: write (250 chars)
drivers/usb/serial/option.c: option_write: endpoint 1 buf 0
drivers/usb/serial/option.c: option_outdat_callback
drivers/usb/serial/option.c: option_write: wrote (did 250)
drivers/usb/serial/option.c: option_write: write (250 chars)
drivers/usb/serial/option.c: option_write: endpoint 1 buf 0
可以看到,此时无option_indat_callback,好像就是USB转串口的驱动,虽然有数据出去,但没有数据输入,自然就ping不通了。
现在就是怀疑DM368的USB控制器可能设计有问题,请TI的专家关注下,谢谢。
zheng chen:
您好,请问你们这个3G卡上网不稳定的问题解决了吗?如果解决了,可否告知问题在哪里?谢谢了.
James lin1:
回复 peter li1:
请问问题解决了吗?
TI中文支持网

