阅读:2811回复:14
wince(PXA255)下的USB ActiveSync添加U盘功能
我希望将wince(PXA255)下的USB驱动添加一项功能,它原本是ActiveSync和串口的.我想通过设置参数将它改成支持U盘(将PDA中的flash当做U盘用)和ActiveSync,串口的device设备.现在差不多了,U盘部分的协议已经跑起来了,就差Read Write ,format这三个命令了,台式机上能看到U盘的图标,可是read命令总是出错.附件是抓下来的数据,求达人指点原因,不盛感谢,愿意以这部分USB驱动的源吗相送,谢谢!
Bus Hound 5.00 capture. Complements of www.perisoft.net Device - Device ID (followed by the endpoint for USB devices) (12) USB Root Hub (23) USB Mass Storage Device (24) Watertek PDA eboot [ROM=1.00] Phase - Phase Type ATO ATA task file command LEN Data length CDB Command descriptor block NSTS NT status CTL USB control transfer RSET bus reset DI Data in SSTS SCSI request block status DO Data out Data - Hex dump of the data transferred Descr - Description of the phase Cmd... - Position in the captured data Delta - Elapsed time from the previous phase to the current phase Date - Date the phase occurred in year/month/day form Device Phase Data Description Cmd.Phase.Ofs(rep) Delta Date ------ ----- -------------------------------------------------- ---------------- ------------------ ----- ---------- 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 1.1.0(2) 5.8sc 2007-09-11 12.0 LEN 04 00 00 00 4 1.2.0 32us 2007-09-11 12.0 DI 01 01 01 00 .... 1.3.0 3us 2007-09-11 12.0 CTL 23 01 10 00 01 00 00 00 CLEAR FEATURE 3.1.0 81us 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 4.1.0(2) 90us 2007-09-11 12.0 LEN 04 00 00 00 4 4.2.0 28us 2007-09-11 12.0 DI 01 01 00 00 .... 4.3.0 3us 2007-09-11 12.0 CTL 23 03 04 00 01 00 00 00 SET FEATURE 6.1.0 124ms 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 7.1.0 31ms 2007-09-11 12.0 LEN 04 00 00 00 4 7.2.0 29us 2007-09-11 12.0 DI 03 01 10 00 .... 7.3.0 3us 2007-09-11 12.0 CTL 23 01 14 00 01 00 00 00 CLEAR FEATURE 8.1.0 8us 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 9.1.0(2) 31ms 2007-09-11 12.0 LEN 04 00 00 00 4 9.2.0 55us 2007-09-11 12.0 DI 03 01 00 00 .... 9.3.0 4us 2007-09-11 12.0 CTL 23 03 04 00 01 00 00 00 SET FEATURE 11.1.0 35ms 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 12.1.0 27ms 2007-09-11 12.0 LEN 04 00 00 00 4 12.2.0 30us 2007-09-11 12.0 DI 03 01 10 00 .... 12.3.0 3us 2007-09-11 12.0 CTL 23 01 14 00 01 00 00 00 CLEAR FEATURE 13.1.0 8us 2007-09-11 12.0 CTL 80 06 00 03 00 00 ff 00 GET DESCRIPTOR 14.1.0 101ms 2007-09-11 12.0 LEN 04 00 00 00 4 14.2.0 4.9ms 2007-09-11 12.0 DI 04 03 09 04 .... 14.3.0 4us 2007-09-11 12.0 CTL 80 06 02 03 09 04 ff 00 GET DESCRIPTOR 15.1.0 29us 2007-09-11 12.0 LEN 20 00 00 00 32 15.2.0 6.9ms 2007-09-11 12.0 DI 20 03 30 00 30 00 30 00 30 00 30 00 30 00 30 00 .0.0.0.0.0.0.0. 15.3.0 4us 2007-09-11 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 0.0.0.0.0.0.0.0. 15.3.16 12.0 CTL 80 06 00 02 00 00 ff 00 GET DESCRIPTOR 16.1.0 29us 2007-09-11 12.0 LEN 20 00 00 00 32 16.2.0 6.9ms 2007-09-11 12.0 DI 09 02 20 00 01 01 00 c0 4b 09 04 00 00 02 08 06 .. .....K....... 16.3.0 3us 2007-09-11 50 00 07 05 81 02 40 00 00 07 05 02 02 40 00 00 P.....@......@.. 16.3.16 12.0 CTL a3 00 00 00 02 00 04 00 GET STATUS 17.1.0 27us 2007-09-11 12.0 LEN 04 00 00 00 4 17.2.0 32us 2007-09-11 12.0 DI 00 01 00 00 .... 17.3.0 3us 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 18.1.0(2) 4.9ms 2007-09-11 12.0 LEN 04 00 00 00 4 18.2.0 29us 2007-09-11 12.0 DI 03 01 00 00 .... 18.3.0 3us 2007-09-11 12.0 CTL 23 03 04 00 01 00 00 00 SET FEATURE 20.1.0 108us 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 21.1.0 30ms 2007-09-11 12.0 LEN 04 00 00 00 4 21.2.0 35us 2007-09-11 12.0 DI 03 01 10 00 .... 21.3.0 3us 2007-09-11 12.0 CTL 23 01 14 00 01 00 00 00 CLEAR FEATURE 22.1.0 9us 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 23.1.0(2) 31ms 2007-09-11 12.0 LEN 04 00 00 00 4 23.2.0 28us 2007-09-11 12.0 DI 03 01 00 00 .... 23.3.0 3us 2007-09-11 12.0 CTL 23 03 04 00 01 00 00 00 SET FEATURE 25.1.0 35ms 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 26.1.0 27ms 2007-09-11 12.0 LEN 04 00 00 00 4 26.2.0 30us 2007-09-11 12.0 DI 03 01 10 00 .... 26.3.0 3us 2007-09-11 12.0 CTL 23 01 14 00 01 00 00 00 CLEAR FEATURE 27.1.0 8us 2007-09-11 23.0 CTL 80 06 00 01 00 00 12 00 GET DESCRIPTOR 28.1.0 128ms 2007-09-11 23.0 LEN 12 00 00 00 18 28.2.0 4.5ms 2007-09-11 23.0 DI 12 01 10 01 00 00 00 10 24 15 03 45 00 01 04 03 ........$..E.... 28.3.0 4us 2007-09-11 02 01 .. 28.3.16 23.0 CTL 80 06 00 02 00 00 09 00 GET DESCRIPTOR 29.1.0 24us 2007-09-11 23.0 LEN 09 00 00 00 9 29.2.0 3.9ms 2007-09-11 23.0 DI 09 02 20 00 01 01 00 c0 4b .. .....K 29.3.0 3us 2007-09-11 23.0 CTL 80 06 00 02 00 00 20 00 GET DESCRIPTOR 30.1.0 21us 2007-09-11 23.0 LEN 20 00 00 00 32 30.2.0 4.9ms 2007-09-11 23.0 DI 09 02 20 00 01 01 00 c0 4b 09 04 00 00 02 08 06 .. .....K....... 30.3.0 2us 2007-09-11 50 00 07 05 81 02 40 00 00 07 05 02 02 40 00 00 P.....@......@.. 30.3.16 23.0 CTL 80 06 00 03 00 00 02 00 GET DESCRIPTOR 31.1.0 19us 2007-09-11 23.0 LEN 02 00 00 00 2 31.2.0 3.9ms 2007-09-11 23.0 DI 04 03 .. 31.3.0 3us 2007-09-11 23.0 CTL 80 06 00 03 00 00 04 00 GET DESCRIPTOR 32.1.0 20us 2007-09-11 23.0 LEN 04 00 00 00 4 32.2.0 3.9ms 2007-09-11 23.0 DI 04 03 09 04 .... 32.3.0 3us 2007-09-11 23.0 CTL 80 06 02 03 09 04 02 00 GET DESCRIPTOR 33.1.0 20us 2007-09-11 23.0 LEN 02 00 00 00 2 33.2.0 3.9ms 2007-09-11 23.0 DI 20 03 . 33.3.0 3us 2007-09-11 23.0 CTL 80 06 02 03 09 04 20 00 GET DESCRIPTOR 34.1.0 20us 2007-09-11 23.0 LEN 20 00 00 00 32 34.2.0 4.9ms 2007-09-11 23.0 DI 20 03 30 00 30 00 30 00 30 00 30 00 30 00 30 00 .0.0.0.0.0.0.0. 34.3.0 3us 2007-09-11 30 00 30 00 30 00 30 00 30 00 30 00 30 00 30 00 0.0.0.0.0.0.0.0. 34.3.16 23.0 CTL 00 09 01 00 00 00 00 00 SET CONFIG 35.1.0 21us 2007-09-11 23.0 CTL 01 0b 00 00 00 00 00 00 SET INTERFACE 36.1.0 59ms 2007-09-11 23.0 CTL a1 fe 00 00 00 00 01 00 GET MAX LUN 37.1.0 62ms 2007-09-11 23.0 LEN 01 00 00 00 1 37.2.0 3.5ms 2007-09-11 23.0 DI 00 . 37.3.0 3us 2007-09-11 23.2 LEN 1f 00 00 00 31 38.1.0 1.9ms 2007-09-11 23.2 DO 55 53 42 43 08 80 e5 84 24 00 00 00 80 00 06 12 USBC....$....... 38.2.0 3us 2007-09-11 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 ...$........... 38.2.16 23.1 LEN 24 00 00 00 36 39.1.0 1.9ms 2007-09-11 23.1 DI 00 80 00 00 00 00 00 00 31 32 33 34 35 36 37 38 ........12345678 39.2.0 3us 2007-09-11 50 44 41 20 65 62 6f 6f 74 00 00 00 00 00 00 00 PDA eboot....... 39.2.16 31 2e 30 30 1.00 39.2.32 23.1 LEN 0d 00 00 00 13 40.1.0 1.9ms 2007-09-11 23.1 DI 55 53 42 53 08 80 e5 84 00 00 00 00 00 USBS......... 40.2.0 4us 2007-09-11 23.2 LEN 1f 00 00 00 31 41.1.0 2.0ms 2007-09-11 23.2 DO 55 53 42 43 08 80 e5 84 fc 00 00 00 80 00 0a 23 USBC...........# 41.2.0 4us 2007-09-11 00 00 00 00 00 00 00 fc 00 00 00 00 00 00 00 ............... 41.2.16 23.1 LEN 08 00 00 00 8 42.1.0 1.9ms 2007-09-11 23.1 DI 00 00 00 01 00 00 02 00 ........ 42.2.0 3us 2007-09-11 23.1 LEN 0d 00 00 00 13 43.1.0 1.0ms 2007-09-11 23.1 DI 55 53 42 53 08 80 e5 84 f4 00 00 00 00 USBS......... 43.2.0 4us 2007-09-11 24 CDB 12 00 00 00 24 00 INQUIRY 44.1.0 4.3ms 2007-09-11 24 LEN 24 00 00 00 36 44.2.0 4us 2007-09-11 24 DI 00 80 00 00 00 00 00 00 31 32 33 34 35 36 37 38 ........12345678 44.3.0 3us 2007-09-11 50 44 41 20 65 62 6f 6f 74 00 00 00 00 00 00 00 PDA eboot....... 44.3.16 31 2e 30 30 1.00 44.3.32 24 CDB 25 00 00 00 00 00 00 00 00 00 READ CAPACITY 45.1.0 1.2ms 2007-09-11 23.2 LEN 1f 00 00 00 31 46.1.0 1.4ms 2007-09-11 23.2 DO 55 53 42 43 08 80 e5 84 08 00 00 00 80 00 0a 25 USBC...........% 46.2.0 4us 2007-09-11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... 46.2.16 23.1 LEN 08 00 00 00 8 47.1.0 1.9ms 2007-09-11 23.1 DI 00 00 00 01 00 00 02 00 ........ 47.2.0 3us 2007-09-11 23.1 LEN 0d 00 00 00 13 48.1.0 1.9ms 2007-09-11 23.1 DI 55 53 42 53 08 80 e5 84 00 00 00 00 00 USBS......... 48.2.0 3us 2007-09-11 24 LEN 08 00 00 00 8 45.2.0 8us 2007-09-11 24 DI 00 00 00 01 00 00 02 00 ........ 45.3.0 2us 2007-09-11 24 CDB 28 00 00 00 00 00 00 00 01 00 READ 49.1.0 23us 2007-09-11 23.2 LEN 1f 00 00 00 31 50.1.0 1.9ms 2007-09-11 23.2 DO 55 53 42 43 08 80 e5 84 00 02 00 00 80 00 0a 28 USBC...........( 50.2.0 4us 2007-09-11 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ............... 50.2.16 23.1 LEN 00 02 00 00 512 51.1.0 1.9ms 2007-09-11 23.1 DI ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.0 3us 2007-09-11 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.16 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.32 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.48 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.64 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.80 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.96 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.112 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.128 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.144 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.160 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.176 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.192 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.208 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.224 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.240 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.256 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.272 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.288 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.304 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.320 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.336 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.352 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.368 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.384 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.400 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.416 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.432 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.448 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.464 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.480 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 51.2.496 24 SSTS 4e bus reset 49.2.0 1.9ms 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 52.1.0 21us 2007-09-11 12.0 LEN 04 00 00 00 4 52.2.0 37us 2007-09-11 12.0 DI 03 01 00 00 .... 52.3.0 3us 2007-09-11 23 RSET 53.1.0 24us 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 54.1.0(2) 15us 2007-09-11 12.0 LEN 04 00 00 00 4 54.2.0 27us 2007-09-11 12.0 DI 03 01 00 00 .... 54.3.0 3us 2007-09-11 12.0 CTL 23 03 04 00 01 00 00 00 SET FEATURE 56.1.0 71us 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 57.1.0 30ms 2007-09-11 12.0 LEN 04 00 00 00 4 57.2.0 40us 2007-09-11 12.0 DI 03 01 10 00 .... 57.3.0 3us 2007-09-11 12.0 CTL 23 01 14 00 01 00 00 00 CLEAR FEATURE 58.1.0 10us 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 59.1.0(2) 30ms 2007-09-11 12.0 LEN 04 00 00 00 4 59.2.0 50us 2007-09-11 12.0 DI 03 01 00 00 .... 59.3.0 4us 2007-09-11 12.0 CTL 23 03 04 00 01 00 00 00 SET FEATURE 61.1.0 35ms 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 62.1.0 26ms 2007-09-11 12.0 LEN 04 00 00 00 4 62.2.0 17us 2007-09-11 12.0 DI 03 01 10 00 .... 62.3.0 2us 2007-09-11 12.0 CTL 23 01 14 00 01 00 00 00 CLEAR FEATURE 63.1.0 6us 2007-09-11 23 NSTS 00 00 00 00 success 53.2.0 105ms 2007-09-11 24 CDB 28 00 00 00 00 00 00 00 01 00 READ 64.1.0 269ms 2007-09-11 23.2 LEN 1f 00 00 00 31 65.1.0 1.3ms 2007-09-11 23.2 DO 55 53 42 43 08 80 e5 84 00 02 00 00 80 00 0a 28 USBC...........( 65.2.0 3us 2007-09-11 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ............... 65.2.16 23.1 LEN 00 02 00 00 512 66.1.0 1.9ms 2007-09-11 23.1 DI ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.0 3us 2007-09-11 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.16 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.32 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.48 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.64 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.80 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.96 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.112 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.128 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.144 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.160 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.176 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.192 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.208 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.224 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.240 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.256 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.272 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.288 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.304 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.320 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.336 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.352 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.368 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.384 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.400 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.416 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.432 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.448 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.464 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.480 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 66.2.496 24 SSTS 4e bus reset 64.2.0 2.0ms 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 67.1.0 27us 2007-09-11 12.0 LEN 04 00 00 00 4 67.2.0 37us 2007-09-11 12.0 DI 03 01 00 00 .... 67.3.0 3us 2007-09-11 23 RSET 68.1.0 25us 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 69.1.0(2) 23us 2007-09-11 12.0 LEN 04 00 00 00 4 69.2.0 32us 2007-09-11 12.0 DI 03 01 00 00 .... 69.3.0 3us 2007-09-11 12.0 CTL 23 03 04 00 01 00 00 00 SET FEATURE 71.1.0 72us 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 72.1.0 25ms 2007-09-11 12.0 LEN 04 00 00 00 4 72.2.0 28us 2007-09-11 12.0 DI 03 01 10 00 .... 72.3.0 3us 2007-09-11 12.0 CTL 23 01 14 00 01 00 00 00 CLEAR FEATURE 73.1.0 8us 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 74.1.0(2) 31ms 2007-09-11 12.0 LEN 04 00 00 00 4 74.2.0 27us 2007-09-11 12.0 DI 03 01 00 00 .... 74.3.0 3us 2007-09-11 12.0 CTL 23 03 04 00 01 00 00 00 SET FEATURE 76.1.0 35ms 2007-09-11 12.0 CTL a3 00 00 00 01 00 04 00 GET STATUS 77.1.0 26ms 2007-09-11 12.0 LEN 04 00 00 00 4 77.2.0 26us 2007-09-11 12.0 DI 03 01 10 00 .... 77.3.0 3us 2007-09-11 12.0 CTL 23 01 14 00 01 00 00 00 CLEAR FEATURE 78.1.0 8us 2007-09-11 23 NSTS 00 00 00 00 success 68.2.0 105ms 2007-09-11 24 CDB 28 00 00 00 00 00 00 00 01 00 READ 79.1.0 269ms 2007-09-11 23.2 LEN 1f 00 00 00 31 80.1.0 1.3ms 2007-09-11 23.2 DO 55 53 42 43 08 80 e5 84 00 02 00 00 80 00 0a 28 USBC...........( 80.2.0 4us 2007-09-11 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ............... 80.2.16 23.1 LEN 00 02 00 00 512 81.1.0 1.9ms 2007-09-11 |
|
|
沙发#
发布于:2007-09-12 09:37
另外,我有pxa255使用USB下载的eboot,使用U盘协议,无需安装驱动,包括PC机器端的上位机程序.如能解决上述问题,或建议,一起奉送
|
|
板凳#
发布于:2007-09-12 12:47
这个想法不错,简单的说就是把USB serial和USB MASS STORAGE两个驱动的功能合二为一,在加个界面可以进行切换选择.不错,我试试,我现在是做了个应用程序来切换这两个驱动的,添加USB SERIAL和USB MASS STORAGE,默认是USB SERIAL,作为ACTIVE SYNC连接用,然后启动我的应用程序来完成二者之间的切换,每切换一下,把USB CABLE插拔一下就可以了.最终极的做法就是你提到的,把三者做到一块去.
|
|
地板#
发布于:2007-09-12 15:16
终于等到一位大侠了,我现在已经能实现三者的功能合在一起了,切换功能正如你所讲.现在有了新问题.我的Pxa255使用Truffs来管理Flash,我的想法是当做为U盘时,PDA和host都能访问flash里面的文件.可是host管理flash是fat文件系统,而Truffs有自己的管理方法,请问有什么方法能让他们都能识别,你是怎么做到的?
|
|
地下室#
发布于:2007-09-12 16:17
我的系统不使用TRUEFFS,我做U盘的不是终端上的FLASH,而是插在终端上的SD卡,所以不存在你那个问题,我是想ACTIVE SYNC只有调试开发时使用,出产的设备只具备访问SD卡的做U盘的功能,不期望用户能看到NAND FLASH上的内容,我用的S3C2440平台。
|
|
5楼#
发布于:2007-09-12 20:16
我用PXA255,但是我也不用TRUEFFS,故也不会有这样得问题,PB已经不直接支持TRUEFFS,故MASS STORAGE你可能得做些改动。我使用IPSM,这个比较方便 :)
|
|
6楼#
发布于:2007-09-12 21:08
我准备调用windows提供的api函数实现对flash的读写,由系统自己转换去,不过很谢谢你
|
|
7楼#
发布于:2007-09-14 12:31
所有的功能都实现了,现在wince运行后,PDA上显示是DiskOnChip,而USB连接到XP上后是个U盘,内容就是FLASH中的,
新问题是:如果wince修改了FLASH中的内容话,host这边显示的内容不变,必须插拔一下才可以看到更新的内容,而host修改了U盘内容的话,wince必须重新启动才能认识更改后的内容,谁又好办法解决这个问题.求高人指点 |
|
8楼#
发布于:2007-09-14 13:58
有什么办法让wince重新读一遍flash里面的文件,我发现如果直接读写物理扇区更新flash里面的文件的话,资源管理器怎么刷新都不能识别出FLASH里面更新的内容,除非重新启动才能识别,可是我想即时更新.
|
|
9楼#
发布于:2007-09-14 14:28
主机这边把这个分区DISMOUNT/MOUNT一下看看有没有作用.
我想请教一下你做这个的思路是怎样的,怎么着手去做,你把serial和U盘的驱动合二为一,增加一些冲突切换处理,最终也是生成一个驱动DLL文件,然后注册表里FunctionDrivers分别有Serial_Class和Mass_Storage_Class,只是它们的"Dll"键值都是这个新的驱动DLL文件.这个驱动文件导出函数里包括原来两个function的导出函数.是这样的吗? |
|
10楼#
发布于:2007-09-14 17:16
注册表里面的键值不用修改,增加一个模式设置键.将USB的驱动当作serial来用,在serial基础之上实现U盘协议,就是读串口,解析,发送,就完了.
使用Mount/UnMount的确能实现即时更新,代码如下: STOREINFO stinfo = {0}; PARTINFO partInfo = {0}; HANDLE hPart = INVALID_HANDLE_VALUE; BOOL CReadHardDiskDlg::MountUnmountFirstPart( BOOL fMount) { BOOL fRet = FALSE; if(INVALID_HANDLE_VALUE == hPart) { return FALSE; } if(fMount) { fRet = MountPartition(hPart); } else { fRet = DismountPartition(hPart); } return fRet; } BOOL CReadHardDiskDlg::InitStore() { HANDLE hstore; stinfo.cbSize = sizeof(STOREINFO); partInfo.cbSize = sizeof(PARTINFO); hstore = FindFirstStore(&stinfo); if (INVALID_HANDLE_VALUE == hstore) { return FALSE; } FindClose(hstore); hstore = OpenStore(stinfo.szDeviceName); if (INVALID_HANDLE_VALUE == hstore) { return FALSE; } if(FindFirstPartition(hstore, &partInfo) != INVALID_HANDLE_VALUE) { hPart = OpenPartition(hstore, partInfo.szPartitionName); } CloseHandle(hstore); return TRUE; } 只是这样一来,wince这边需要再运行一个小程序,我希望在U盘驱动里面调用这个函数,希望每个操作完毕的时候自动调用一下,这样就能自动即时更新了,可是如何知道更新动作完毕呢? 谢谢这位大侠,还望有更好的建议. |
|
11楼#
发布于:2007-09-14 17:51
谢谢你的答案,我先按照我自己的思路和方法去做一下.我觉得理论上也行的通,只不过会比你的实现复杂一些.
|
|
12楼#
发布于:2007-09-23 02:14
回复:mushan
是不是可以通知系统内容发生改变的标志呢 |
|
13楼#
发布于:2007-09-26 15:32
我是开了一个线程,U盘里写进新数据的时候,置一个跟新标志,拔下U盘的时候检测该更新标志,如果需要更新,就mount/unmount一下,您的方法应该更好一点,向系统发送什么样的消息,能让系统知道内容已经改变,谢谢,能不能说的明白点/
|
|
14楼#
发布于:2007-09-26 15:34
我修改了USB驱动,几乎能当作读卡器了,FLASH ,SD,CF都可以读写了
|
|