Git Product home page Git Product logo

libusb_scsi_command's Introduction


Just for demo How to use libusb for send SCSI Vendor command with Mass storage device

** limition: only vaild Bulk only device the result like the below

----------------------------------------------------------------------------
Opening device 1B3F:30FE...

Reading device descriptor:
            length: 18
      device class: 0
               S/N: 0
           VID:PID: 1B3F:30FE
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

Reading first configuration descriptor:
             nb interfaces: 1
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 08.06.50
       endpoint[0].address: 81
           max packet size: 0040
          polling interval: 00
       endpoint[1].address: 02
           max packet size: 0040
          polling interval: 00

Claiming interface 0...

Reading string descriptors:
   String (0x01): "UltraNET "
   String (0x02): "USB-WATCH"
   sent 6 CDB bytes
   received 36 bytes
   Vendor:Product:Revision "UltraNet":" USB-Wat":" 3.0"
   Mode: W5S
   Mass Storage Status: 00 (Success)
Read Settings:
   sent 2 CDB bytes
   Name:PedoWatch W5S V2, Received size: 256
   Year:2018, Month: 1, Day:18
   Hour:12, Minute: 40, Second:0
   Display mode:12Hrs
   Control:00
   Sleep monitor start: 23h:20
   Sleep monitor stop: 07h:00
   Alram: 07h:00
   Smart LED: disabled
   Height:170cm, Weight 65.00Kg, Stride: 70cm
   Mass Storage Status: 00 (Success)
--------------------------------------------------------
    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
--------------------------------------------------------
00| 50 65 64 6F 57 61 74 63 68 20 57 35 53 20 56 32
10| 12 01 12 0C 28 00 00 00 12 01 12 0C 26 0F 24 00
20| 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
A0| 00 17 14 07 00 07 00 00 00 00 00 00 00 00 00 00
B0| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
C0| 00 00 04 00 AA 19 64 00 46 00 00 00 00 00 00 00
D0| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
E0| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
F0| 00 00 00 00 00 00 00 00 00 00 00 00 22 6A 72 AD
write Settings:
   sent 2 CDB bytes
   Mass Storage Status: 00 (Success)
Read Settings:
   sent 2 CDB bytes
   Name:PedoWatch W5S V2, Received size: 256
   Year:2018, Month: 1, Day:18
   Hour:12, Minute: 40, Second:0
   Display mode:12Hrs
   Control:00
   Sleep monitor start: 23h:00
   Sleep monitor stop: 07h:00
   Alram: 07h:00
   Smart LED: disabled
   Height:170cm, Weight 65.00Kg, Stride: 70cm
   Mass Storage Status: 00 (Success)
--------------------------------------------------------
    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
--------------------------------------------------------
00| 50 65 64 6F 57 61 74 63 68 20 57 35 53 20 56 32
10| 12 01 12 0C 28 00 00 00 12 01 12 0C 28 00 24 00
20| 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
60| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
A0| 00 17 00 07 00 07 00 00 00 00 00 00 00 00 00 00
B0| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
C0| 00 00 04 00 AA 19 64 00 46 00 00 00 00 00 00 00
D0| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
E0| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
F0| 00 00 00 00 00 00 00 00 00 00 00 00 13 6C 72 A0
Read Steps: 96
   sent 6 CDB bytes
   Received size: 512
   Year:2000, Month: 0, Day:0, Hour:0

libusb_scsi_command's People

Contributors

kunyi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.