- 论坛徽章:
- 0
|
小弟刚入门不大懂 ,想请教一下
我现在做这块的驱动,
usb 模拟成优盘 不成功,一开始还能出现盘符 就出现过一次,现在都是找不到驱动
insmod s3c2410_udc.ko后出现
0.00 USB: s3c2410_udc: version 30 Apr 2006
0.01 USB: s3c2410_udc_probe
0.02 USB: udc_disable called
insmod g_file_storage.ko file=/root/data/backing_file后出现
0.03 USB: usb_gadget_register_driver() 'g_file_storage'
0.04 USB: binding gadget driver 'g_file_storage'
0.05 USB: s3c2410_set_selfpowered()
g_file_storage gadget: File-backed Storage Gadget, version: 28 November 2005
g_file_storage gadget: Number of LUNs=1
g_file_storage gadget-lun0: ro=0, file: /root/data/backing_file
0.06 USB: udc_enable called
连接开发板和PC
终端提示死在g_file_storage gadget: full speed config #1
没找到原因,我想做下转串口的 因为我的模块都是同时编译出来的
我是照着gadget_serial.txt来做的
首先建立设备节点
mknod /dev/ttygserial c 127 0
insmod s3c2410_udc.ko后出现
0.00 USB: s3c2410_udc: version 30 Apr 2006
0.01 USB: s3c2410_udc_probe
0.02 USB: udc_disable called
insmod g_serial.ko use_acm=1
提示忘了copy了
然后安装pc主机端驱动,用的是该文件给的usbser.sys文件
和windows自带的usbser.sys
在C:\WINDOWS\Driver Cache\i386\driver.cab下解压而来
装好驱动后,连接开发板和主机,照到模拟的端口号是com7
新建一个超级终端设置串口,打开以后
原来串口的超级终端输出
.1161 USB: ep0csr 1 ep0state EP0_IDLE
0.1162 USB: read_fifo_crq(): fifo_count=8
0.1163 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1164 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1165 USB: ep0csr 8 ep0state EP0_IDLE
0.1166 USB: ep0csr 0 ep0state EP0_IDLE
0.1167 USB: ep0csr 1 ep0state EP0_IDLE
0.1168 USB: read_fifo_crq(): fifo_count=8
0.1169 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1170 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1171 USB: ep0csr 8 ep0state EP0_IDLE
0.1172 USB: ep0csr 1 ep0state EP0_IDLE
0.1173 USB: read_fifo_crq(): fifo_count=8
0.1174 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1175 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1176 USB: ep0csr 8 ep0state EP0_IDLE
0.1177 USB: ep0csr 0 ep0state EP0_IDLE
0.1178 USB: ep0csr 1 ep0state EP0_IDLE
0.1179 USB: read_fifo_crq(): fifo_count=8
0.1180 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1181 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1182 USB: ep0csr 8 ep0state EP0_IDLE
0.1183 USB: ep0csr 1 ep0state EP0_IDLE
0.1184 USB: read_fifo_crq(): fifo_count=8
0.1185 USB: bRequest = 32 bRequestType 33 wLength = 7
0.1186 USB: ep0csr 1 ep0state EP0_OUT_DATA_PHASE
0.1187 USB: EP0_OUT_DATA_PHASE ... what now?
0.1188 USB: fifo_read fifo count : 7
0.1189 USB: ep0csr 0 ep0state EP0_IDLE
0.1190 USB: ep0csr 1 ep0state EP0_IDLE
0.1191 USB: read_fifo_crq(): fifo_count=8
0.1192 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1193 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1194 USB: ep0csr 8 ep0state EP0_IDLE
0.1195 USB: ep0csr 0 ep0state EP0_IDLE
0.1196 USB: ep0csr 1 ep0state EP0_IDLE
0.1197 USB: read_fifo_crq(): fifo_count=8
0.1198 USB: bRequest = 34 bRequestType 33 wLength = 0
0.1199 USB: ep0csr 10 ep0state EP0_IDLE
0.1200 USB: ... serviced SETUP_END ...
0.1201 USB: ep0csr 1 ep0state EP0_IDLE
0.1202 USB: read_fifo_crq(): fifo_count=8
0.1203 USB: bRequest = 32 bRequestType 33 wLength = 7
0.1204 USB: ep0csr 1 ep0state EP0_OUT_DATA_PHASE
0.1205 USB: EP0_OUT_DATA_PHASE ... what now?
0.1206 USB: fifo_read fifo count : 7
0.1207 USB: ep0csr 0 ep0state EP0_IDLE
0.1208 USB: ep0csr 1 ep0state EP0_IDLE
0.1209 USB: read_fifo_crq(): fifo_count=8
0.1210 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1211 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1212 USB: ep0csr 8 ep0state EP0_IDLE
0.1213 USB: ep0csr 0 ep0state EP0_IDLE
0.1214 USB: ep0csr 1 ep0state EP0_IDLE
0.1215 USB: read_fifo_crq(): fifo_count=8
0.1216 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1217 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1218 USB: ep0csr 8 ep0state EP0_IDLE
0.1219 USB: ep0csr 0 ep0state EP0_IDLE
0.1220 USB: ep0csr 1 ep0state EP0_IDLE
0.1221 USB: read_fifo_crq(): fifo_count=8
0.1222 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1223 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1224 USB: ep0csr 8 ep0state EP0_IDLE
0.1225 USB: ep0csr 1 ep0state EP0_IDLE
0.1226 USB: read_fifo_crq(): fifo_count=8
0.1227 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1228 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1229 USB: ep0csr 8 ep0state EP0_IDLE
0.1230 USB: ep0csr 0 ep0state EP0_IDLE
0.1231 USB: ep0csr 1 ep0state EP0_IDLE
0.1232 USB: read_fifo_crq(): fifo_count=8
0.1233 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1234 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1235 USB: ep0csr 8 ep0state EP0_IDLE
0.1236 USB: ep0csr 0 ep0state EP0_IDLE
0.1237 USB: ep0csr 1 ep0state EP0_IDLE
0.1238 USB: read_fifo_crq(): fifo_count=8
0.1239 USB: bRequest = 32 bRequestType 33 wLength = 7
0.1240 USB: fifo_read fifo count : 7
0.1241 USB: ep0csr 8 ep0state EP0_IDLE
0.1242 USB: ep0csr 1 ep0state EP0_IDLE
0.1243 USB: read_fifo_crq(): fifo_count=8
0.1244 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1245 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1246 USB: ep0csr 8 ep0state EP0_IDLE
0.1247 USB: ep0csr 1 ep0state EP0_IDLE
0.1248 USB: read_fifo_crq(): fifo_count=8
0.1249 USB: bRequest = 34 bRequestType 33 wLength = 0
0.1250 USB: ep0csr 10 ep0state EP0_IDLE
0.1251 USB: ... serviced SETUP_END ...
0.1252 USB: ep0csr 1 ep0state EP0_IDLE
0.1253 USB: read_fifo_crq(): fifo_count=8
0.1254 USB: bRequest = 32 bRequestType 33 wLength = 7
0.1255 USB: ep0csr 1 ep0state EP0_OUT_DATA_PHASE
0.1256 USB: EP0_OUT_DATA_PHASE ... what now?
0.1257 USB: fifo_read fifo count : 7
0.1258 USB: ep0csr 0 ep0state EP0_IDLE
0.1259 USB: ep0csr 1 ep0state EP0_IDLE
0.1260 USB: read_fifo_crq(): fifo_count=8
0.1261 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1262 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1263 USB: ep0csr 8 ep0state EP0_IDLE
0.1264 USB: ep0csr 0 ep0state EP0_IDLE
0.1265 USB: ep0csr 1 ep0state EP0_IDLE
0.1266 USB: read_fifo_crq(): fifo_count=8
0.1267 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1268 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1269 USB: ep0csr 8 ep0state EP0_IDLE
0.1270 USB: ep0csr 0 ep0state EP0_IDLE
0.1271 USB: ep0csr 1 ep0state EP0_IDLE
0.1272 USB: read_fifo_crq(): fifo_count=8
0.1273 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1274 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1275 USB: ep0csr 8 ep0state EP0_IDLE
0.1276 USB: ep0csr 1 ep0state EP0_IDLE
0.1277 USB: read_fifo_crq(): fifo_count=8
0.1278 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1279 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1280 USB: ep0csr 8 ep0state EP0_IDLE
0.1281 USB: ep0csr 0 ep0state EP0_IDLE
0.1282 USB: ep0csr 1 ep0state EP0_IDLE
0.1283 USB: read_fifo_crq(): fifo_count=8
0.1284 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1285 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1286 USB: ep0csr 8 ep0state EP0_IDLE
0.1287 USB: ep0csr 1 ep0state EP0_IDLE
0.1288 USB: read_fifo_crq(): fifo_count=8
0.1289 USB: bRequest = 32 bRequestType 33 wLength = 7
0.1290 USB: ep0csr 1 ep0state EP0_OUT_DATA_PHASE
0.1291 USB: EP0_OUT_DATA_PHASE ... what now?
0.1292 USB: fifo_read fifo count : 7
0.1293 USB: ep0csr 0 ep0state EP0_IDLE
0.1294 USB: ep0csr 1 ep0state EP0_IDLE
0.1295 USB: read_fifo_crq(): fifo_count=8
0.1296 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1297 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1298 USB: ep0csr 8 ep0state EP0_IDLE
0.1299 USB: ep0csr 0 ep0state EP0_IDLE
0.1300 USB: ep0csr 1 ep0state EP0_IDLE
0.1301 USB: read_fifo_crq(): fifo_count=8
0.1302 USB: bRequest = 34 bRequestType 33 wLength = 0
0.1303 USB: ep0csr 10 ep0state EP0_IDLE
0.1304 USB: ... serviced SETUP_END ...
0.1305 USB: ep0csr 1 ep0state EP0_IDLE
0.1306 USB: read_fifo_crq(): fifo_count=8
0.1307 USB: bRequest = 32 bRequestType 33 wLength = 7
0.1308 USB: ep0csr 1 ep0state EP0_OUT_DATA_PHASE
0.1309 USB: EP0_OUT_DATA_PHASE ... what now?
0.1310 USB: fifo_read fifo count : 7
0.1311 USB: ep0csr 0 ep0state EP0_IDLE
0.1312 USB: ep0csr 1 ep0state EP0_IDLE
0.1313 USB: read_fifo_crq(): fifo_count=8
0.1314 USB: bRequest = 33 bRequestType 161 wLength = 7
0.1315 USB: Written ep0 7.7 of 7 b [last 1,z 0]
0.1316 USB: ep0csr 8 ep0state EP0_IDLE
0.1317 USB: ep0csr 0 ep0state EP0_IDLE
关闭的时候也有提示... serviced SETUP_END ...
可是不知道如何传送文件,这样做了以后怎么通信
还有就是里面一段话不懂
Testing with Minicom or HyperTerminal
-------------------------------------
Once the gadget serial driver and the host driver are both installed,
and a USB cable connects the gadget device to the host, you should
be able to communicate over USB between the gadget and host systems.
You can use minicom or HyperTerminal to try this out.
On the gadget side run "minicom -s" to configure a new minicom
session. Under "Serial port setup" set "/dev/ttygserial" as the
"Serial Device". Set baud rate, data bits, parity, and stop bits,
to 9600, 8, none, and 1--these settings mostly do not matter.
Under "Modem and dialing" erase all the modem and dialing strings.On a Linux host running the ACM driver, configure minicom similarly
but use "/dev/ttyACM0" as the "Serial Device". (If you have other
ACM devices connected, change the device name appropriately.)
On a Linux host running the USB generic serial driver, configure
minicom similarly, but use "/dev/ttyUSB0" as the "Serial Device".
(If you have other USB serial devices connected, change the device
name appropriately.)
On a Windows host configure a new HyperTerminal session to use the
COM port assigned to Gadget Serial. The "Port Settings" will be
set automatically when HyperTerminal connects to the gadget serial
device, so you can leave them set to the default values--these
settings mostly do not matter.
With minicom configured and running on the gadget side and with
minicom or HyperTerminal configured and running on the host side,
you should be able to send data back and forth between the gadget
side and host side systems. Anything you type on the terminal
window on the gadget side should appear in the terminal window on
the host side and vice versa.
红色部分是什么意思,怎么实现呢?我用的是windows下的环境 用超级终端 |
|