On Tue, 2003-09-09 at 03:51, Brad Hards wrote:

> OK, lets try this from the start.

Ok, how bout a completely new start. Not sure if I just was not paying
attention or performing the same tests once modules were loaded.

Either way I can now access the cash drawer via /dev/usb/hiddev0

dmesg shows the following

hiddev0: USB HID v1.00 Device [APG Cash Drawer 554 HID USBPro(tm)II Interface] on 
usb1:2.0

So now I need to write a program to open the cash drawer and/or tell me
the status of the cash drawer. In the Unix KISS way I assume I should
make two? One that opens the drawer and one that tells it's status.

I guess they could both be in the same one. It's a mood issue.

Most important is to get the drawer to open. It's a bonus if I can tell
status so the app can be frozen while the drawer is open.

I am working of your example's mainly the write one. I was searching for
docs on the hiddev_usage_ref struct. Mainly how I can use it to pass/set
values.

Which is seems like the code i need is this plus the opening and closing
stuff.

  usage_ref.report_type = HID_REPORT_TYPE_OUTPUT;
  usage_ref.report_id = 0;
  usage_ref.field_index = 2;
  usage_ref.usage_index = 1; /* which LED 0 is num lock, 1 is caps lock, 2 is scroll 
lock */
  usage_ref.usage_code = 0xf3; /* no one cares? */
  usage_ref.value = 1; /* binary on (1)  or off (0) */
  ioctl(fd, HIDIOCSUSAGE, &usage_ref);

  rep_info.report_type = HID_REPORT_TYPE_OUTPUT;
  rep_info.report_id = 0;
  rep_info.num_fields = 1;
  ioctl(fd, HIDIOCSREPORT, &rep_info);

I have been playing around a bit with those values, but have not had
much luck.

Any info on what values I should be using in the 

report_type
report_id
field_index
usage_index
usage_code
value

-- 
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios, Inc.
http://www.obsidian-studios.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to