I have usb cash drawer. I can get status of the
device with usb_get_report function. It works fine.

In docs of the device I can read:
-------
... to open a cash drawer till, your application must send
a pulse of a minimum duration to the cash drawer ... the pulse time
is 80 milliseconds.
-------

The question is how to open the cash drawer till with
linux usb interface? I tried with code:
-----
purb=usb_alloc_urb(0);
buff[0]='1';
buff[1]='0';
buff[2]='1';
buff[3]='O';
FILL_INT_URB(purb, drawer_data.dev, usb_sndintpipe(drawer_data.dev, 0),
    buff, 4, drawer_complete, &drawer_data, 32*HZ);
usb_submit_urb(purb);
usb_free_urb(purb);
-----

but I get -EINVAL (-22) from usb_submit_urb function. Why?


This is output from usbview utility:
---------------
Speed: 12Mb/s
USB Version:  1.10
Device Class: 00(>ifc )
Device Subclass: 00
Device Protocol: 00
Maximum Default Endpoint Size: 16
Number of Configurations: 1
Vendor Id: 04b3
Product Id: 4554
Revision Number:  1.06

Config Number: 1
  Number of Interfaces: 2
  Attributes: c0
  MaxPower Needed:   2mA

  Interface Number: 0
    Name: sp750_cash_drawer
    Alternate Number: 0
    Class: 03(HID  ) 
    Sub Class: 0
    Protocol: 0
    Number of Endpoints: 1

      Endpoint Address: 81
      Direction: in
      Attribute: 3
      Type: Int.
      Max Packet Size: 8
      Interval:  32ms

  Interface Number: 2
    Name: sp750_cash_drawer
    Alternate Number: 0
    Class: 03(HID  ) 
    Sub Class: 0
    Protocol: 0
    Number of Endpoints: 1

      Endpoint Address: 83
      Direction: in
      Attribute: 3
      Type: Int.
      Max Packet Size: 8
      Interval:  16ms
---------------



  wrobell <[EMAIL PROTECTED]>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to