hey, thanks for the response.
1) Yes HID is claiming my device. Which at this point
I think it is a good thing. Previously, I was planning
on writing my own driver!! Now I hope I can use HID to
control it.
2)Yes /dev/usb/hiddev0 along with hiddev1 - hiddev15
are in the same directory. But I know for a fact that
hiddev0 is my device. It is the only one that doesn't
return an error when I try to open it with my program.
It's also the only USB device plugged in so... :)
3)The specs on the device state that to initiate a
data transfer I must send it the 8-bit value '0x02'.
Then it will send back either and 'ack' or 'nack'
followed by a new line control byte. (note: all
commands are 8-bits long). Then I can proceed to send
more control bytes.
4)I'm going to answer a question with another question
but... I am actually using g++ to compile because I'm
going to need to use inherritance and classes and
stuff down the line. so I'm not actually using fd =
open( ... ), g++ won't compile it. I am using fd =
fopen( "/dev/...", r); fdout = fopen( "/dev..", w) and
it doesn't return an error; fopen returns: INT format:
134520664 Hex:0x8049f58 I check to make sure its open.
5) I'm not sure what you mean by EP.
Hope this helps.
Thanks
--- Shiva_Shankar <[EMAIL PROTECTED]> wrote:
> Hi,
> Let me get the problem right!! Please dont mind if
> you find my questions
> very annoying, just am trying to understand the
> problem.
>
> 1. Is the HID module claiming your device??
> 2. Are you able to see the file /dev/usb/hiddev0??
> 3. Can you let me know if there is any control word
> you need to send to
> initiate the transfer.
> 4. what is fd = open("/dev/usb/hiddev0") returning?
> 5. Are you performing the read on the right EP?
>
> -----Original Message-----
> From: Froilan A. Olivas [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 23, 2003 7:41 AM
> To: [EMAIL PROTECTED]
> Subject: [Linux-usb-users] New USB Device
>
>
> Hello all,
>
> I have a new device that lets me turn off and on an
> ac
> device. This device conects to my computer through
> (of course) USB interface. I am running linux
> 2.4.20-8. when I run /proc/bus/usb/devices it
> outputs:
>
> T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 18
> Spd=1.5 MxCh= 0
> D: Ver= 1.0a Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8
> #Cfgs= 2
> P: Vendor=05e1 ProdID=0003 Rev= 0.00
> S: Manufacturer=Wonderland
> S: Product=Wonderland USB
> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
> I: If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=00
> Prot=00
> Driver=hid
> E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
> E: Ad=01(O) Atr=03(Int.) MxPS= 8 Ivl=10ms
> C: #Ifs= 1 Cfg#= 2 Atr=80 MxPwr=500mA
> I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00
> Prot=00
> Driver=(none)
> E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
> E: Ad=01(O) Atr=03(Int.) MxPS= 8 Ivl=10ms
>
>
> Here is my question, please, please help me. I know
> that Cls=03( HID ) means it is using a human
> interface device driver, it is at
> /dev/usb/hiddev0.
> When I open it and try to write to it and read from
> it, it hangs i.e it waits forever for a read. (Note:
> I
> am trying to write my own program to send and
> receive
> commands to this device.) Does the 2nd "D" line
> Cls=ff(vend.) mean I need a vendor specific driver
> along with the hid driver?? If not then shouldn't a
> simple fd = open("/dev/usb/hiddev0") ... work.
> Maybe
> a simple explination on how hid driver works.
> Please
> help.
>
> Thanks
>
> __________________________________
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/
>
>
>
-------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux
> Tutorials.
> Become an expert in LINUX or just sharpen your
> skills. Sign up for IBM's
> Free Linux Tutorials. Learn everything from the
> bash shell to sys admin.
> Click now!
>
http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
>
https://lists.sourceforge.net/lists/listinfo/linux-usb-users
>
**************************************************************************
>
> This email (including any attachments) is intended
> for the sole use of the
> intended recipient/s and may contain material that
> is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance
> by others or copying or
> distribution or forwarding of any or all of the
> contents in this message is
> STRICTLY PROHIBITED. If you are not the intended
> recipient, please contact
> the sender by email and delete all copies; your
> cooperation in this regard
> is appreciated.
>
**************************************************************************
>
>
>
-------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux
> Tutorials.
> Become an expert in LINUX or just sharpen your
> skills. Sign up for IBM's
> Free Linux Tutorials. Learn everything from the
> bash shell to sys admin.
> Click now!
>
http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
>
https://lists.sourceforge.net/lists/listinfo/linux-usb-users
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users