code updates

4 views
Skip to first unread message

Ray Lehtiniemi

unread,
Mar 16, 2010, 12:45:15 AM3/16/10
to Gabriel Fróes Franco, vfs101...@googlegroups.com, Dane Shea

hi gabriel

[resending from my gmail address so the cc to the list will hopefully
work, sorry for the duplicate message]

i've pushed up some new scripts to the repo. you should now be able to
do this:

$ cat UsbSnoop.log | ./scripts/UsbSnoop.pl > UsbSnoop.txt
$ cat UsbSnoop.txt | ./scripts/Snoop2Api.pl > UsbSnoop.c


in the first script, check stderr and make sure
"URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER" does not occur. it's okay if
we flush stuff like "URB_FUNCTION_CONTROL_TRANSFER", however.

you should now have a UsbSnoop.c file with a transcript of the
operations in your USB log, expressed in the VFS101 protocol API. the
comment after each one shows the results returned under windows. for
example:

_( Peek (dev, 0x00001fe8, 0x04)); //
expect: "12 00 00 00 00 00 00 00"
_( Peek (dev, 0x00001fec, 0x04)); //
expect: "12 00 00 00 00 00 57 21"
_( Peek (dev, 0x00001ff0, 0x04)); //
expect: "12 00 00 00 9f 29 01 00"
_( Peek (dev, 0x00001ff4, 0x04)); //
expect: "12 00 00 00 db db db db"
_( Peek (dev, 0x00001ff8, 0x04)); //
expect: "12 00 00 00 00 00 00 00"
_( Peek (dev, 0x00001ffc, 0x04)); //
expect: "12 00 00 00 20 49 fb d4"
_( GetParam (dev, 0x002e)); //
expect: "04 00 00 00 0a 00"
_( GetVersion (dev)); //
expect: "02 00 00 00 56 46 53 20 76 65 72 20 33 2e 37 32 44 20 76 63 33
2d 73 79 73 2e 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
_( GetParam (dev, 0x0028)); //
expect: "04 00 00 00 00 00"
_( GetParam (dev, 0x0014)); //
expect: "04 00 00 00 00 00"
_( GetParam (dev, 0x0011)); //
expect: "04 00 00 00 08 00"
_( GetParam (dev, 0x0054)); //
expect: "04 00 00 00 04 00"
_( GetParam (dev, 0x0001)); //
expect: "04 00 00 00 f4 01"
_( GetParam (dev, 0x0014)); //
expect: "04 00 00 00 00 00"
_( AbortPrint (dev)); //
expect: "0e 00 00 00"
_( LoadImage (dev));
_( GetPrint (dev, COUNT, type_X)); //
expect: "03 00 00 00"
_( LoadImage (dev));
_( AbortPrint (dev)); //
expect: "0e 00 00 00"
_( LoadImage (dev));
_( SetParam (dev, 0x0004, 0x0000)); //
expect: "05 00 03 00 00 00"
_( SetParam (dev, 0x0005, 0x0000)); //
expect: "05 00 03 00 00 00"
etc, etc....


some commands (GetPrint is one...) are not complete yet, so some editing
of UsbSnoop.c will be required. however, these scripts should get you
99% of the way to building a compilable cycle routine out of your usb
logfiles.


cheers
ray


Gabriel Franco

unread,
Mar 16, 2010, 8:29:09 AM3/16/10
to vfs101...@googlegroups.com
hey Ray,

Thank you for sharing this. I'll test this out with my logs after work
and will share my findings.

best,

Gabriel

2010/3/16 Ray Lehtiniemi <ray.leh...@gmail.com>:

--
Gabriel Fróes Franco
Software Architect
Zend Certified Engineer - PHP5
Sun Java Certified Programmer - Java 5
openSUSE Member
openSUSE Testing Core Team

Discover Freedom
===============
openSUSE Linux
http://www.opensuse.org

OpenOffice.org
http://www.openoffice.org

Netbeans IDE
http://www.netbeans.org

Please consider the environment before printing this e-mail.

Dane Shea

unread,
Mar 16, 2010, 12:52:50 PM3/16/10
to vfs101driver, Gabriel Franco
Ray I just added you as a committer on the google code page btw.

http://code.google.com/p/vfs101driver/

> Netbeans IDEhttp://www.netbeans.org

Ray Lehtiniemi

unread,
Mar 16, 2010, 5:36:11 PM3/16/10
to vfs101...@googlegroups.com, Gabriel Franco
Dane Shea wrote:
> Ray I just added you as a committer on the google code page btw.
>
> http://code.google.com/p/vfs101driver/
>

thanks dane. i have a question about the repo: are you wedded to svn,
or would you consider a switch to git? in other words, was svn a
conscious choice, or was it just what came with google? i ask because
my primary development will continue to be on github, and i've had mixed
results in the past using git-svn to sync repos.

thanks
ray

>> Gabriel Fr�es Franco

Dane Shea

unread,
Mar 16, 2010, 5:54:23 PM3/16/10
to vfs101...@googlegroups.com

I've just always used SVN but if you think we should use git then git it is.

Sent from my Open-Source Android phone.  Android.com

On Mar 16, 2010 10:36 PM, "Ray Lehtiniemi" <ray.leh...@gmail.com> wrote:

Dane Shea wrote:
>
> Ray I just added you as a committer on the google code page btw.
>

> http://cod...

thanks dane.  i have a question about the repo:  are you wedded to svn, or would you consider a switch to git?  in other words, was svn a conscious choice, or was it just what came with google?  i ask because my primary development will continue to be on github, and i've had mixed results in the past using git-svn to sync repos.

thanks
ray






> On Mar 16, 1:29 pm, Gabriel Franco <gffr...@gmail.com> wrote:
>  
>>
>> hey Ray,
>>

>> Thank...

Reply all
Reply to author
Forward
0 new messages