CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

USB HID IO + HID Keyboard

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
subhan.mohammed



Joined: 21 Nov 2014
Posts: 8

View user's profile Send private message

USB HID IO + HID Keyboard
PostPosted: Fri Nov 21, 2014 3:33 am     Reply with quote

Hi everyone,

I am developing a USB Composite device with HID Keyboard and HID mouse functionality using PIC18F4550.

The device works perfectly in one direction. That is, I can send data to PC. But I cannot receive any custom data from my PC Application to the device as Windows will hold the endpoints for HID keyboard and mouse.

To solve the above issue, I decided to add HID IO functionality to my device.
So, now my device contains three interfaces
1) HID Mouse
2) HID Keyboard
3) HID IO device

The code compiles without errors. But when I connect the device to PC, PC could not install the drivers to my device.

Please anybody can provide me an example how to add HID IO with HID keyboard?

Thanks in advance.
rksjbeck



Joined: 10 Sep 2009
Posts: 3
Location: Atlanta, GA

View user's profile Send private message

PostPosted: Sat Feb 14, 2015 10:22 am     Reply with quote

I'm just going with what I have done using composite devices here, but what I think you will need to do is get Windows to use its generic HID driver for the device end point, but without the seeing the source code, or having the device to look at the enumeration, I'm guessing.
Then you can use one of the simple HID terminals to see if your endpoint is reachable. Then you will need to use one of the HID libraries to open the endpoint for reading.
Ttelmah



Joined: 11 Mar 2010
Posts: 19436

View user's profile Send private message

PostPosted: Sun Feb 15, 2015 3:25 am     Reply with quote

Look at the HID descriptor in usb_desc_hid.c

This implements a custom HID I/O device.

CCS supply a demo program (hiddemo.exe), which demonstrates talking to this. Get this HID working "on it's own" first, then try adding the descriptor to your multiple device. I've done it with the CCS example ex_usb_hid_and_cdc, taking out the keyboard HID device that this implements, to give CDC+HID I/O. This worked fine.

If you haven't got hiddemo.exe, ask CCS for it and the sources. It used to come 'with' their USB demo kit, but as available 'on request', since the HID device source is supplied in the examples.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group