mini2440原理图是不是支持工业相机

mini2440是不是支持工业相机 - Linux/Unix当前位置:& &&&mini2440是不是支持工业相机mini2440是不是支持工业相机&&网友分享于:&&浏览:83次mini2440是否支持工业相机最近小弟手头要做一个利用mini2440开发板外扩USB接口工业相机的问题,买了一个北京睿智奥恒公司的RZ-F系列USB接口快速CMOS工业相机,在mini2440启动Linux系统进入终端后插上USB工业相机提示如下信息:[root@FriendlyARM /dev]# usb 1-1: new full speed USB device using s3c2410-ohci 2usb 1-1: unable to read config index 0 descriptor/start: -61
& usb 1-1: chopping to 0 config(s)
& usb 1-1: New USB device found, idVendor=fea7, idProduct=2013
& usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
& usb 1-1: Product: 1.3M USB Camera
& usb 1-1: Manufacturer: F130C USB Camera
& usb 1-1: SerialNumber: F130C USB Camera
& usb 1-1: no configuration chosen from 0 choices& 而且dev目录下也不会出现video0这一设备文件。这表示不支持这款相机。后来打电话到友善之臂公司(mini2440厂家)的技术支持询问,他们说没做过工业相机的测试,不是很清楚。因此小弟的疑问是mini2440是否可以支持这种USB接口的工业相机,核心问题应该是内部内置的摄像头驱动能否支持工业相机?有哪位大哥知道的麻烦告知小弟一声,小弟不胜感激!!------解决方案--------------------1、现在linux已经有了uvc驱动,如果你摄像头芯片型号(PID、VID)已经被UVC驱动支持,可以采用。那当然,还是其它许多的USB摄像头驱动。2、如果支持,需要重新编译内核,事情就比较多了。PS:那个技术支持不是一般的支持,我发e-mail问几次问题,都是说我环境跟手册里不一致造成的,也不解释原因。唉。
------解决方案--------------------先在/proc下的usb目录下,看你的设备信息.你可以看到PID和VID.然后用这个PID VID去你的USB摄象头驱动里面找,能找到恭喜你可以使用.不能找到,也恭喜你,可以练练手啊可以通过在usb目录下的stv80.c这个驱动来试着写.
------解决方案--------------------硬件上没问题,可能要改驱动。
------解决方案--------------------你说的工业相机跟普通相机有什么区别?
12345678910
12345678910
12345678910 上一篇:下一篇:文章评论相关解决方案 12345678910 Copyright & &&版权所有安装mjpq-stream
使用方法:
下载二进制包:或源代码和编译使用NFS,FTP或SD卡复制到mini2440的创建一个目录,例如 #mkdir mjpg解压, tar -xzvf **.tar首先要确保你的电脑与开发板能够通信,即是相互能够ping通,如果这里出现问题解决方式就是:1.查看双方的网段是否是一致;2.电脑的防火墙关掉,防火墙有电脑自身的还有就是360或者其他杀毒软件的等等。这两个弄好之后一般能够相互通信的。尝试使用, #./start_s3c2410.sh尝试使用基于USB UVC相机 - 相机连接至USB插座和运行,#./start_uvc.sh尝试使用USB摄像头,不支持MJPG - 相机连接至USB插座和运行,#./start_uvc_yuv.sh#./start_uvc.执行测试程序 (这个没成功,我用的下面start_uvc_yuv.sh成功了 )
在 在浏览器中输 输入: /stream_simple.html 即可看到摄 摄像头的动态的画面了。192.168.1.230这个是你开发板的ip地址,如果你的开发板是其他ip地址就输入那个ip地址就行。
Step4:通过浏览器控制 制 USB摄像 像头
点页面左侧的“Control“会出来一个控制页面窗口,这个大家可以自已摸索,就到这里。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:44285次
排名:千里之外
原创:31篇
转载:13篇
(1)(2)(1)(5)(3)(5)(16)(11)1 Pages: 1/3& & &Go
主题 : 在mini2440上使用USB Gadget功能
级别: 论坛版主
发帖: 5407
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11054 分
&在mini2440上使用USB Gadget功能
下面是我在mini2440上使用USB Gadget功能的过程。我将USB Gadget的各个功能编译成内核模块,目前只尝试了g_serial和g_ether功能,有兴趣的兄弟可以试试其余的,别忘了告诉大家结果:)就像powerpan在帖子里提到的,2.6.29内核对于内核模块的处理存在bug,要使用内核模块,必须先给内核打上,重新编译内核zImage下载到板子中运行。这是我编译的所有的Gadget模块[root@FriendlyARM /]# ls -l /lib/modules/2.6.29-FriendlyARM/kernel/drivers/usb/gadget/-rw-r--r--&&&&1 root&&&& root&&&&&&&&40404 May&&4&&2009 g_cdc.ko-rw-r--r--&&&&1 root&&&& root&&&&&&&&40331 May&&4&&2009 g_ether.ko-rw-r--r--&&&&1 root&&&& root&&&&&&&&34559 May&&4&&2009 g_file_storage.ko-rw-r--r--&&&&1 root&&&& root&&&&&&&&34116 May&&4&&2009 g_serial.ko-rw-r--r--&&&&1 root&&&& root&&&&&&&&23541 May&&4&&0_udc.koA. 加载S3C2440A的USB Device (s3c2410_udc.ko)模块:[root@FriendlyARM /]# modprobe s3c2410_udcs3c2410_udc: debugfs dir creation failed -19s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes[root@FriendlyARM /]# [root@FriendlyARM /]# [root@FriendlyARM /]# lsmods3c2410_udc 20360 0 - Live 0xbf000000B. 加载g_serial (g_serial.ko, 在mini2440上模拟出一个USB串口):[root@FriendlyARM /]# modprobe g_serialg_serial gadget: Gadget Serial v2.4g_serial gadget: g_serial ready[root@FriendlyARM /]# [root@FriendlyARM /]# lsmodg_serial 22056 0 - Live 0xbf00a000s3c2410_udc 20360 1 g_serial, Live 0xbf000000[root@FriendlyARM /]# [root@FriendlyARM /]# [root@FriendlyARM /]# g_serial gadget: full speed config #2: CDC ACM config这是在我的PC Ubuntu 9.04上lsusb的输出Bus 002 Device 006: ID
Netchip Technology, Inc. Linux-USB Serial Gadget (CDC ACM mode)Device Descriptor:&&bLength&&&&&&&&&&&&&&&&18&&bDescriptorType&&&&&&&& 1&&bcdUSB&&&&&&&&&&&&&& 2.00&&bDeviceClass&&&&&&&&&&&&2 Communications&&bDeviceSubClass&&&&&&&& 0 &&bDeviceProtocol&&&&&&&& 0 &&bMaxPacketSize0&&&&&&&& 8&&idVendor&&&&&&&&&& 0x0525 Netchip Technology, Inc.&&idProduct&&&&&&&&&&0xa4a7 Linux-USB Serial Gadget (CDC ACM mode)&&bcdDevice&&&&&&&&&& 24.12&&iManufacturer&&&&&&&&&& 1 &&iProduct&&&&&&&&&&&&&&&&2 &&iSerial&&&&&&&&&&&&&&&& 0 &&bNumConfigurations&&&&&&1&&Configuration Descriptor:&&&&bLength&&&&&&&&&&&&&&&& 9&&&&bDescriptorType&&&&&&&& 2&&&&wTotalLength&&&&&&&&&& 67&&&&bNumInterfaces&&&&&&&&&&2&&&&bConfigurationValue&&&& 2&&&&iConfiguration&&&&&&&&&&3 &&&&bmAttributes&&&&&&&& 0xc0&&&&&&Self Powered&&&&MaxPower&&&&&&&&&&&&&&&&2mA&&&&Interface Descriptor:&&&&&&bLength&&&&&&&&&&&&&&&& 9&&&&&&bDescriptorType&&&&&&&& 4&&&&&&bInterfaceNumber&&&&&&&&0&&&&&&bAlternateSetting&&&&&& 0&&&&&&bNumEndpoints&&&&&&&&&& 1&&&&&&bInterfaceClass&&&&&&&& 2 Communications&&&&&&bInterfaceSubClass&&&&&&2 Abstract (modem)&&&&&&bInterfaceProtocol&&&&&&1 AT-commands (v.25ter)&&&&&&iInterface&&&&&&&&&&&&&&4 &&&&&&CDC Header:&&&&&&&&bcdCDC&&&&&&&&&&&&&& 1.10&&&&&&CDC Call Management:&&&&&&&&bmCapabilities&&&&&& 0x00&&&&&&&&bDataInterface&&&&&&&&&&1&&&&&&CDC ACM:&&&&&&&&bmCapabilities&&&&&& 0x02&&&&&&&&&&line coding and serial state&&&&&&CDC Union:&&&&&&&&bMasterInterface&&&&&&&&0&&&&&&&&bSlaveInterface&&&&&&&& 1 &&&&&&Endpoint Descriptor:&&&&&&&&bLength&&&&&&&&&&&&&&&& 7&&&&&&&&bDescriptorType&&&&&&&& 5&&&&&&&&bEndpointAddress&&&& 0x83&&EP 3 IN&&&&&&&&bmAttributes&&&&&&&&&&&&3&&&&&&&&&&Transfer Type&&&&&&&&&&&&Interrupt&&&&&&&&&&Synch Type&&&&&&&&&&&&&& None&&&&&&&&&&Usage Type&&&&&&&&&&&&&& Data&&&&&&&&wMaxPacketSize&&&& 0x000a&&1x 10 bytes&&&&&&&&bInterval&&&&&&&&&&&&&&32&&&&Interface Descriptor:&&&&&&bLength&&&&&&&&&&&&&&&& 9&&&&&&bDescriptorType&&&&&&&& 4&&&&&&bInterfaceNumber&&&&&&&&1&&&&&&bAlternateSetting&&&&&& 0&&&&&&bNumEndpoints&&&&&&&&&& 2&&&&&&bInterfaceClass&&&&&&&&10 CDC Data&&&&&&bInterfaceSubClass&&&&&&0 Unused&&&&&&bInterfaceProtocol&&&&&&0 &&&&&&iInterface&&&&&&&&&&&&&&5 &&&&&&Endpoint Descriptor:&&&&&&&&bLength&&&&&&&&&&&&&&&& 7&&&&&&&&bDescriptorType&&&&&&&& 5&&&&&&&&bEndpointAddress&&&& 0x81&&EP 1 IN&&&&&&&&bmAttributes&&&&&&&&&&&&2&&&&&&&&&&Transfer Type&&&&&&&&&&&&Bulk&&&&&&&&&&Synch Type&&&&&&&&&&&&&& None&&&&&&&&&&Usage Type&&&&&&&&&&&&&& Data&&&&&&&&wMaxPacketSize&&&& 0x bytes&&&&&&&&bInterval&&&&&&&&&&&&&& 0&&&&&&Endpoint Descriptor:&&&&&&&&bLength&&&&&&&&&&&&&&&& 7&&&&&&&&bDescriptorType&&&&&&&& 5&&&&&&&&bEndpointAddress&&&& 0x02&&EP 2 OUT&&&&&&&&bmAttributes&&&&&&&&&&&&2&&&&&&&&&&Transfer Type&&&&&&&&&&&&Bulk&&&&&&&&&&Synch Type&&&&&&&&&&&&&& None&&&&&&&&&&Usage Type&&&&&&&&&&&&&& Data&&&&&&&&wMaxPacketSize&&&& 0x bytes&&&&&&&&bInterval&&&&&&&&&&&&&& 0can't get device qualifier: Operation not permittedcan't get debug descriptor: Operation not permittedcannot read device status, Operation not permitted (1)PC端对应生成的设备是/dev/ttyACM0C. 加载e_ether模块(g_ether.ko, 由于Gadget功能一次只能加载一个,所以先卸载g_serial)[root@FriendlyARM /]# rmmod g_serial[root@FriendlyARM /]# modprobe g_ethers3c2410_udc: debugfs dir creation failed -19s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytesg_ether gadget: using random self ethernet addressg_ether gadget: using random host ethernet addressusb0: MAC 16:1a:1d:a8:3f:97usb0: HOST MAC e6:62:d2:0d:be:18g_ether gadget: Ethernet Gadget, version: Memorial Day 2008g_ether gadget: g_ether ready[root@FriendlyARM /]# [root@FriendlyARM /]# [root@FriendlyARM /]# [root@FriendlyARM /]# [root@FriendlyARM /]# [root@FriendlyARM /]# g_ether gadget: full speed config #1: CDC Ethernet (ECM)[root@FriendlyARM /]# ifconfig -aeth0&&&&&&Link encap:Ethernet&&HWaddr 08:90:90:90:90:90&&&&&&&&&&&&inet addr:192.168.1.230&&Bcast:192.168.1.255&&Mask:255.255.255.0&&&&&&&&&&UP BROADCAST RUNNING MULTICAST&&MTU:1500&&Metric:1&&&&&&&&&&RX packets:201 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:33 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:1000 &&&&&&&&&&RX bytes:2 KiB)&&TX bytes: KiB)&&&&&&&&&&Interrupt:51 lo&&&&&&&&Link encap:Local Loopback&&&&&&&&&&&&inet addr:127.0.0.1&&Mask:255.0.0.0&&&&&&&&&&UP LOOPBACK RUNNING&&MTU:16436&&Metric:1&&&&&&&&&&RX packets:4 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:4 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:0 &&&&&&&&&&RX bytes:370 (370.0 B)&&TX bytes:370 (370.0 B)usb0&&&&&&Link encap:Ethernet&&HWaddr 16:1A:1D:A8:3F:97&&&&&&&&&&&&BROADCAST MULTICAST&&MTU:1500&&Metric:1&&&&&&&&&&RX packets:0 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:1000 &&&&&&&&&&RX bytes:0 (0.0 B)&&TX bytes:0 (0.0 B)[root@FriendlyARM /]# ifconfig usb0 192.168.0.202[root@FriendlyARM /]# ifconfig -aeth0&&&&&&Link encap:Ethernet&&HWaddr 08:90:90:90:90:90&&&&&&&&&&&&inet addr:192.168.1.230&&Bcast:192.168.1.255&&Mask:255.255.255.0&&&&&&&&&&UP BROADCAST RUNNING MULTICAST&&MTU:1500&&Metric:1&&&&&&&&&&RX packets:202 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:34 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:1000 &&&&&&&&&&RX bytes:2 KiB)&&TX bytes: KiB)&&&&&&&&&&Interrupt:51 lo&&&&&&&&Link encap:Local Loopback&&&&&&&&&&&&inet addr:127.0.0.1&&Mask:255.0.0.0&&&&&&&&&&UP LOOPBACK RUNNING&&MTU:16436&&Metric:1&&&&&&&&&&RX packets:4 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:4 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:0 &&&&&&&&&&RX bytes:370 (370.0 B)&&TX bytes:370 (370.0 B)usb0&&&&&&Link encap:Ethernet&&HWaddr 16:1A:1D:A8:3F:97&&&&&&&&&&&&inet addr:192.168.0.202&&Bcast:192.168.0.255&&Mask:255.255.255.0&&&&&&&&&&UP BROADCAST RUNNING MULTICAST&&MTU:1500&&Metric:1&&&&&&&&&&RX packets:0 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:1000 &&&&&&&&&&RX bytes:0 (0.0 B)&&TX bytes:0 (0.0 B)对应的PC端也将生成usb0以太网卡,将其IP地址配置为192.168.0.200(我之前已经通过脚本配置,大家可以用ifconfig命令手动配置), 通过ftp功能验证可以连接开发板alex@alex-desktop:~$ ifconfig -aeth6&&&&&&Link encap:Ethernet&&HWaddr 00:0c:29:6c:73:0e&&&&&&&&&&&&inet addr:192.168.247.129&&Bcast:192.168.247.255&&Mask:255.255.255.0&&&&&&&&&&inet6 addr: fe80::20c:29ff:fe6c:730e/64 Scope:Link&&&&&&&&&&UP BROADCAST RUNNING MULTICAST&&MTU:1500&&Metric:1&&&&&&&&&&RX packets:54558 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:105673 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:1000 &&&&&&&&&&RX bytes:.3 MB)&&TX bytes:.9 MB)&&&&&&&&&&Interrupt:19 Base address:0x2000 lo&&&&&&&&Link encap:Local Loopback&&&&&&&&&&&&inet addr:127.0.0.1&&Mask:255.0.0.0&&&&&&&&&&inet6 addr: ::1/128 Scope:Host&&&&&&&&&&UP LOOPBACK RUNNING&&MTU:16436&&Metric:1&&&&&&&&&&RX packets:74 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:74 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:0 &&&&&&&&&&RX bytes: KB)&&TX bytes: KB)pan0&&&&&&Link encap:Ethernet&&HWaddr 0a:d4:ab:6d:db:f3&&&&&&&&&&&&BROADCAST MULTICAST&&MTU:1500&&Metric:1&&&&&&&&&&RX packets:0 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:0 &&&&&&&&&&RX bytes:0 (0.0 B)&&TX bytes:0 (0.0 B)usb0&&&&&&Link encap:Ethernet&&HWaddr e6:62:d2:0d:be:18&&&&&&&&&&&&BROADCAST MULTICAST&&MTU:1500&&Metric:1&&&&&&&&&&RX packets:0 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:1000 &&&&&&&&&&RX bytes:0 (0.0 B)&&TX bytes:0 (0.0 B)alex@alex-desktop:~$ sudo ifup usb0[sudo] password for alex: WARNING: All config files need .conf: /etc/modprobe.d/lrm-video, it will be ignored in a future release.WARNING: All config files need .conf: /etc/modprobe.d/ipw3945, it will be ignored in a future release.WARNING: All config files need .conf: /etc/modprobe.d/nvidia-kernel-nkc, it will be ignored in a future release.WARNING: All config files need .conf: /etc/modprobe.d/vmware-tools, it will be ignored in a future release.WARNING: All config files need .conf: /etc/modprobe.d/kqemu, it will be ignored in a future release. * if-up.d/mountnfs[usb0]: waiting for interface eth0 before doing NFS mounts * if-up.d/mountnfs[usb0]: waiting for interface ath0 before doing NFS mounts * if-up.d/mountnfs[usb0]: waiting for interface wlan0 before doing NFS mounts * Stopping NTP server ntpdalex@alex-desktop:~$&&&&...done.alex@alex-desktop:~$ alex@alex-desktop:~$ ifconfig -aeth6&&&&&&Link encap:Ethernet&&HWaddr 00:0c:29:6c:73:0e&&&&&&&&&&&&inet addr:192.168.247.129&&Bcast:192.168.247.255&&Mask:255.255.255.0&&&&&&&&&&inet6 addr: fe80::20c:29ff:fe6c:730e/64 Scope:Link&&&&&&&&&&UP BROADCAST RUNNING MULTICAST&&MTU:1500&&Metric:1&&&&&&&&&&RX packets:54636 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:105745 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:1000 &&&&&&&&&&RX bytes:.3 MB)&&TX bytes:.9 MB)&&&&&&&&&&Interrupt:19 Base address:0x2000 lo&&&&&&&&Link encap:Local Loopback&&&&&&&&&&&&inet addr:127.0.0.1&&Mask:255.0.0.0&&&&&&&&&&inet6 addr: ::1/128 Scope:Host&&&&&&&&&&UP LOOPBACK RUNNING&&MTU:16436&&Metric:1&&&&&&&&&&RX packets:74 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:74 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:0 &&&&&&&&&&RX bytes: KB)&&TX bytes: KB)pan0&&&&&&Link encap:Ethernet&&HWaddr 0a:d4:ab:6d:db:f3&&&&&&&&&&&&BROADCAST MULTICAST&&MTU:1500&&Metric:1&&&&&&&&&&RX packets:0 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:0 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:0 &&&&&&&&&&RX bytes:0 (0.0 B)&&TX bytes:0 (0.0 B)usb0&&&&&&Link encap:Ethernet&&HWaddr e6:62:d2:0d:be:18&&&&&&&&&&&&inet addr:192.168.0.200&&Bcast:192.168.0.207&&Mask:255.255.255.240&&&&&&&&&&inet6 addr: fe80::e462:d2ff:fe0d:be18/64 Scope:Link&&&&&&&&&&UP BROADCAST RUNNING MULTICAST&&MTU:1500&&Metric:1&&&&&&&&&&RX packets:0 errors:0 dropped:0 overruns:0 frame:0&&&&&&&&&&TX packets:21 errors:0 dropped:0 overruns:0 carrier:0&&&&&&&&&&collisions:0 txqueuelen:1000 &&&&&&&&&&RX bytes:0 (0.0 B)&&TX bytes: KB)alex@alex-desktop:~$ ping 192.168.0.202PING 192.168.0.202 (192.168.0.202) 56(84) bytes of data.64 bytes from 192.168.0.202: icmp_seq=1 ttl=64 time=43.4 ms64 bytes from 192.168.0.202: icmp_seq=2 ttl=64 time=6.68 ms64 bytes from 192.168.0.202: icmp_seq=3 ttl=64 time=6.62 ms^C--- 192.168.0.202 ping statistics ---3 packets transmitted, 3 received, 0% packet loss, time 2006msrtt min/avg/max/mdev = 6.626/18.932/43.492/17.366 msalex@alex-desktop:~$ alex@alex-desktop:~$ alex@alex-desktop:~$ ftp 192.168.0.202Connected to 192.168.0.202.220 FriendlyARM FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready.Name (192.168.0.202:alex): 331 Password required for alex.Password:530 Login incorrect.Login failed.ftp& 这里是我编译的所有模块,使用时可解压到开发板文件系统的/lib目录下,Gadget模块位于/lib/modules/2.6.29-FriendlyARM/kernel/drivers/usb/gadget目录下。
(62 K) 下载次数:202
&If you have an apple and I have an apple and we exchange apples, then you and I willstill each have one apple. But if you have an idea and I have an idea and we exchangethese ideas, then each of us will have two ideas.&
级别: 论坛版主
发帖: 5407
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11054 分
关于g_serial,详细的信息可以参考内核源代码目录下的Documentation/usb/gadget_serial.txt关于USB Gadget各个模块的介绍,可参考drivers/usb/gadget/Kconfig中个模块的相关描述欢迎各位补充
&If you have an apple and I have an apple and we exchange apples, then you and I willstill each have one apple. But if you have an idea and I have an idea and we exchangethese ideas, then each of us will have two ideas.&
级别: 侠客
金钱: 390 两
威望: 297 点
贡献值: 0 点
综合积分: 100 分
哪位兄弟试过g_file_storage.ko?我这反正是效果不咋地……
级别: 新手上路
金钱: 335 两
威望: 293 点
贡献值: 0 点
综合积分: 74 分
就是g_file_storage.ko加载有问题
级别: 新手上路
金钱: 250 两
威望: 158 点
贡献值: 0 点
综合积分: 68 分
--- a/drivers/usb/gadget/file_storage.c&&&& 11:13:03. -0400+++ b/drivers/usb/gadget/file_storage.c&&&& 11:16:41. -0400@@ -63,8 @@&&&&if (rc &= 0 && rc != DELAYED_STATUS) {&&&&&&&&rc = min(rc, w_length);&&&&&&&&fsg-&ep0req-&length =-&&&&&&&&fsg-&ep0req-&zero = rc & w_+&&&&&&&&fsg-&ep0req-&zero = rc & w_length+&&&&&&&&&&&&&& (rc % gadget-&ep0-&maxpacket) == 0;&&&&&&&&fsg-&ep0req_name = (ctrl-&bRequestType & USB_DIR_IN ?&&&&&&&&&&&&&&&&&ep0-in& : &ep0-out&);&&&&&&&&rc = ep0_queue(fsg);
级别: 新手上路
金钱: 250 两
威望: 158 点
贡献值: 0 点
综合积分: 68 分
This is a patch that seems to make the USB hangs on the S3C2440 go away. Atleast a good amount of ping torture didn't make them come back so far.The issue is that, if there are several back-to-back packets,sometimes no interrupt is generated for one of them. Thisseems to be caused by the mysterious dual packet mode, whichthe USB hardware enters automatically if the endpoint size ishalf that of the FIFO. (On the 2440, this is the normalsituation for bulk data endpoints.)There is also a timing factor in this. I think what happens isthat the USB hardware automatically sends an acknowledgementif there is only one packet in the FIFO (the FIFO has spacefor two). If another packet arrives before the host hasretrieved and acknowledged the previous one, no interrupt isgenerated for that second one.However, there may be an indication. There is one undocumentedbit (none of the 244x manuals document it), OUT_CRS1_REG[1],that seems to be set suspiciously often when this conditionoccurs. There is also CLR_DATA_TOGGLE, OUT_CRS1_REG[7], whichmay have a function related to this. (The Samsung manual israther terse on that, as usual.)This needs to be examined further. For now, the patch seems to do thetrick. Note that this is not a clean solution by any means, because wemight potentially get stuck in that interrupt for quite a while.Index: linux-2.6.28.8/drivers/usb/gadget/s3c2410_udc.c===================================================================--- linux-2.6.28.8.orig/drivers/usb/gadget/s3c2410_udc.c&&&& 21:14:28. +0100+++ linux-2.6.28.8/drivers/usb/gadget/s3c2410_udc.c&&&& 21:14:46. +0100@@ -843,6 +843,7 @@&&&& u32&&&&&&&&&&&&ep_csr1;&&&& u32&&&&&&&&&&&& +handle_ep_again:&&&& if (likely (!list_empty(&ep-&queue)))&&&&&&&& req = list_entry(ep-&queue.next,&&&&&&&&&&&&&&&& struct s3c2410_request, queue);@@ -882,6 +883,8 @@ &&&&&&&& if ((ep_csr1 & S3C2410_UDC_OCSR1_PKTRDY) && req) {&&&&&&&&&&&& s3c2410_udc_read_fifo(ep,req);+&&&&&&&&&&&&if (s3c2410_udc_fifo_count_out())+&&&&&&&&&&&&&&&&goto handle_ep_&&&&&&&& }&&&& } }
级别: 论坛版主
发帖: 5407
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11054 分
&回 5楼(lpc2292) 的帖子
&If you have an apple and I have an apple and we exchange apples, then you and I willstill each have one apple. But if you have an idea and I have an idea and we exchangethese ideas, then each of us will have two ideas.&
级别: 新手上路
金钱: 250 两
威望: 158 点
贡献值: 0 点
综合积分: 68 分
mini2440HOST口接U盘DEVICE口接PC机,传输26.2M 文件用了1分钟,400多k的速率
级别: 新手上路
金钱: 250 两
威望: 158 点
贡献值: 0 点
综合积分: 68 分
// drivers/usb/gadget/s3c2410_udc.cstatic int __init udc_init(void){&&&&&&&&&&&&&&&&……..#if 0&&&&&&&&s3c2410_udc_debugfs_root = debugfs_create_dir(gadget_name, NULL);&&&&&&&&if (IS_ERR(s3c2410_udc_debugfs_root)) {&&&&&&&&&&&&&&&&printk(KERN_ERR &%s: debugfs dir creation failed %ld\n&,&&&&&&&&&&&&&&&&&&&&&&&&gadget_name, PTR_ERR(s3c2410_udc_debugfs_root));&&&&&&&&&&&&&&&&s3c2410_udc_debugfs_root = NULL;&&&&&&&&}&&&&&& #endif&&&&&&&&………}
级别: 侠客
金钱: 425 两
威望: 213 点
贡献值: 31 点
综合积分: 186 分
请问楼主,我按楼主的方法,终于在友善的2.6.29.4的内核中,加入了g_file_storage.ko的功能。现在,windows可以正常识别到U盘。但是,对它进行格式化,却报不能完成格式化,偶而能完成,但也无法拷贝文件进去?我用/dev/mtdblock2,/devmtdblock3均试过,都不行。又按照网上的方法,在内存中开了一片区域,同样也不行,情况相同。使用内存中的区域时,格式化基本能完成,但不能拷贝数据。不知何故?楼主遇到过这样的情况吗?
1 Pages: 1/3& & &Go
Powered by

我要回帖

更多关于 mini2440用户手册 的文章

 

随机推荐