主题 : 把mini2440作为USB网卡或者移动存储设备(U盘) 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 9416
精华: 1
发帖: 6
金钱: 80 两
威望: 40 点
贡献值: 10 点
综合积分: 32 分
注册时间: 2009-09-28
最后登录: 2017-09-13
楼主  发表于: 2009-10-15 18:41

 把mini2440作为USB网卡或者移动存储设备(U盘)

管理提醒: 本帖被 kasim 执行加亮操作(2009-10-15)
以上都是智能手机常见的功能,mini2440官方对USB Host端的驱动支持很丰富,就是忽略了USB Slave口。
这个口能够做很多有趣的东西

这里不方便发带图的全文了,百度有图片防盗链,完整版见
http://hi.baidu.com/deep_pro/blog/item/d2c2e8a8b947dbbbca130c22.html
http://hi.baidu.com/deep_pro/blog/item/bf0f17efcbc01c3cadafd513.html

重新编译内核(2.6.29)
Device Drivers ---> USB support --->   USB Gadget Support --->
其中 USB Peripheral Controller 选 S3C2410 USB Device Controller
然后再选一个内核自带的Gadget驱动程序来做演示,Ethernet Gadget (with CDC Ethernet support)   或File-backed Storage Gadget
注意内核大小不要超过2m
加载模块后要记得重新插拔一下USB连接线

RNDIS网卡驱动下载
http://download.csdn.net/source/1742242

一个可以实现通过USB网卡,就是不会实现eth0和usb0的转发,不然PC就能通过mini2440上网了
另一个PC和mini2440能同时读写同一个SD卡,是移动设备常见的一个功能

Linux下Gadget驱动,比wm方便多了,不用安装ActiveSync
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-10-15 21:34
呵呵,写的不错,我以前也写过一个关于USB Gadget的帖子 http://www.aiothome.com/bbs/read.php?tid-1753.html
Gadget功能还不光只有这两个,希望LZ继续研究,哈哈
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2009-11-20 17:24

 回 4楼(caai) 的帖子

确保mini2440上的"USB_EN"信号是有效的
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2010-08-25 22:46
引用第14楼波菜籽于2010-08-25 21:23发表的  :
我的是刚买的板,光盘带的是linux-2.6.32.2-mini2440-20100113.tgz,我想打开Gadget,但make menuconfig 后,进入deivce driver-->USB Support-->USB Gadget Support-->后,发现只有USB Peripheral Controller(Renesas R8A66597 USB peripheral...) Renesas R8A66597 USB Peripheral Controller,没有“S3C2410 USB Device Controller”。这是怎么回事啊?

这是一个选择菜单,在USB Peripheral Controller上按回车,会出现一个类似下面的子菜单:

x       (X) Renesas R8A66597 USB Peripheral Controller         x x
x x         ( ) S3C2410 USB Device Controller                      x x
x x         ( ) Renesas M66592 USB Peripheral Controller           x x
x x         ( ) Dummy HCD (DEVELOPMENT)
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2010-08-26 07:53
引用第16楼波菜籽于2010-08-25 23:40发表的  :
非常感谢kasim的解答,可是我的确实不是菜单,只有那两项,按回车啥的都没用。
[attachment=1483]

你在menuconfig之前加载了mini2440的config没有?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2010-08-26 21:17

 回 19楼(波菜籽) 的帖子

那我就不知道了,我的步骤就是那样。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."