USB tablet driver request

Greg KH greg at kroah.com
Thu Jun 11 03:43:00 UTC 2009


On Tue, Jun 09, 2009 at 07:49:22AM +0300, Felipe Balbi wrote:
> Hi Greg,
> 
> On Fri, Jun 5, 2009 at 12:57 AM, Greg KH<greg at kroah.com> wrote:
> > New request:
> >
> >  USB Tablet driver.  The device is HID-like, with some "magic" commands
> >  needed.  I have 2 of the devices, and can ship them anywhere in the
> >  world, and we also have specs for what needs to be done.
> >
> >  Note that this is a bit complex, and someone who knows the Input/HID
> >  layer would be best, as I have spent a bit of time with this device,
> >  and couldn't get it working properly very easily.  I also showed it to
> >  some xorg developers and they were confused as well.
> >
> > Anyone want to work on this?
> 
> I suppose my last mail didn't reach the list. So I'd be interested in
> dealing with this device but I'd like to take a look at the specs
> beforehand if it's possible.

Sorry for the delay, I'm currently at FreedomHEC Taiwan with a bad case
of jet lag...

I've attached some of the specs that I received, do they look
sufficient?

> Also, what's the schedule ? When should it be finished ?

We never guarantee any schedule for drivers written using this process,
but vendors usually like drivers "yesterday" :)

I have 2 samples here to test with, if you want to work on this, let me
know and I'll send you one.

thanks,

greg k-h
-------------- next part --------------
    Device Descriptor   
        Descriptor Version Number:   0x0110
        Device Class:   0   (Composite)
        Device Subclass:   0
        Device Protocol:   0
        Device MaxPacketSize:   8
        Device VendorID/ProductID:   0x172F/0x0032   (unknown vendor)
        Device Version Number:   0x0101
        Number of Configurations:   1
        Manufacturer String:   1 "WALTOP International Corp."
        Product String:   2 "Slim Tablet"
        Serial Number String:   0 (none)
    Configuration Descriptor   
        Length (and contents):   34
            Raw Descriptor (hex)    0000: 09 02 00 22 01 01 00 A0  32 09 04 00 00 01 03 00  
            Raw Descriptor (hex)    0010: 00 00 09 21 10 01 1E 01  22 DE 00 07 05 81 03 08  
            Raw Descriptor (hex)    0020: 00 04 
        Number of Interfaces:   1
        Configuration Value:   1
        Attributes:   0xA0 (bus-powered, remote wakeup)
        MaxPower:   100 ma
        Interface #0 - HID   
            Alternate Setting   0
            Number of Endpoints   1
            Interface Class:   3   (HID)
            Interface Subclass;   0
            Interface Protocol:   0
            HID Descriptor   
                Descriptor Version Number:   0x0110
                Country Code:   30
                Descriptor Count:   1
                Descriptor 1   
                    Type:   0x22  (Report Descriptor)
                    Length (and contents):   222
                        Raw Descriptor (hex)    0000: 05 01 09 02 A1 01 85 01  09 01 A1 00 05 09 19 01  
                        Raw Descriptor (hex)    0010: 29 05 15 00 25 01 75 01  95 05 81 02 75 03 95 01  
                        Raw Descriptor (hex)    0020: 81 03 05 01 09 30 09 31  09 38 15 81 25 7F 75 08  
                        Raw Descriptor (hex)    0030: 95 03 81 06 C0 C0 05 0D  09 02 A1 01 85 02 09 20  
                        Raw Descriptor (hex)    0040: A1 00 09 00 15 00 26 FF  00 75 08 95 07 81 02 09  
                        Raw Descriptor (hex)    0050: 3F 09 40 15 00 26 FF 00  75 08 95 02 B1 02 C0 85  
                        Raw Descriptor (hex)    0060: 05 05 0D 09 20 A1 00 09  00 15 00 26 FF 00 75 08  
                        Raw Descriptor (hex)    0070: 95 07 81 02 C0 85 0A 05  0D 09 20 A1 00 09 00 15  
                        Raw Descriptor (hex)    0080: 00 26 FF 00 75 08 95 03  81 02 C0 85 10 09 20 A1  
                        Raw Descriptor (hex)    0090: 00 09 42 09 44 09 3C 09  45 09 32 15 00 25 01 75  
                        Raw Descriptor (hex)    00a0: 01 95 05 81 02 95 03 81  03 05 01 09 30 75 10 95  
                        Raw Descriptor (hex)    00b0: 01 A4 55 0D 65 33 15 00  26 10 27 35 00 46 10 27  
                        Raw Descriptor (hex)    00c0: 81 02 09 31 26 70 17 46  70 17 81 02 05 0D 09 30  
                        Raw Descriptor (hex)    00d0: 15 00 26 FF 03 35 00 46  FF 03 81 02 C0 C0 
                    Parsed Report Descriptor:   
                          Usage Page    (Generic Desktop) 
                          Usage (Mouse)    
                              Collection (Application)    
                                ReportID................    (1)  
                                Usage (Pointer)    
                                    Collection (Physical)    
                                      Usage Page    (Button) 
                                      Usage Minimum...........    (1)  
                                      Usage Maximum...........    (5)  
                                      Logical Minimum.........    (0)  
                                      Logical Maximum.........    (1)  
                                      Report Size.............    (1)  
                                      Report Count............    (5)  
                                      Input...................   (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                      Report Size.............    (3)  
                                      Report Count............    (1)  
                                      Input...................   (Constant, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                      Usage Page    (Generic Desktop) 
                                      Usage (X)    
                                      Usage (Y)    
                                      Usage (Wheel)    
                                      Logical Minimum.........    (-127)  
                                      Logical Maximum.........    (127)  
                                      Report Size.............    (8)  
                                      Report Count............    (3)  
                                      Input...................   (Data, Variable, Relative, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                    End Collection     
                              End Collection     
                          Usage Page    (Digitizer) 
                          Usage 2 (0x2)    
                              Collection (Application)    
                                ReportID................    (2)  
                                Usage 32 (0x20)    
                                    Collection (Physical)    
                                      Usage 0 (0x0)    
                                      Logical Minimum.........    (0)  
                                      Logical Maximum.........    (255)  
                                      Report Size.............    (8)  
                                      Report Count............    (7)  
                                      Input...................   (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                      Usage 63 (0x3f)    
                                      Usage 64 (0x40)    
                                      Logical Minimum.........    (0)  
                                      Logical Maximum.........    (255)  
                                      Report Size.............    (8)  
                                      Report Count............    (2)  
                                      Feature.................   (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) 
                                    End Collection     
                                ReportID................    (5)  
                                Usage Page    (Digitizer) 
                                Usage 32 (0x20)    
                                    Collection (Physical)    
                                      Usage 0 (0x0)    
                                      Logical Minimum.........    (0)  
                                      Logical Maximum.........    (255)  
                                      Report Size.............    (8)  
                                      Report Count............    (7)  
                                      Input...................   (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                    End Collection     
                                ReportID................    (10)  
                                Usage Page    (Digitizer) 
                                Usage 32 (0x20)    
                                    Collection (Physical)    
                                      Usage 0 (0x0)    
                                      Logical Minimum.........    (0)  
                                      Logical Maximum.........    (255)  
                                      Report Size.............    (8)  
                                      Report Count............    (3)  
                                      Input...................   (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                    End Collection     
                                ReportID................    (16)  
                                Usage 32 (0x20)    
                                    Collection (Physical)    
                                      Usage 66 (0x42)    
                                      Usage 68 (0x44)    
                                      Usage 60 (0x3c)    
                                      Usage 69 (0x45)    
                                      Usage 50 (0x32)    
                                      Logical Minimum.........    (0)  
                                      Logical Maximum.........    (1)  
                                      Report Size.............    (1)  
                                      Report Count............    (5)  
                                      Input...................   (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                      Report Count............    (3)  
                                      Input...................   (Constant, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                      Usage Page    (Generic Desktop) 
                                      Usage (X)    
                                      Report Size.............    (16)  
                                      Report Count............    (1)  
                                      Push....................     
                                      Unit Exponent...........    (13)  
                                      Unit....................    (51)  
                                      Logical Minimum.........    (0)  
                                      Logical Maximum.........    (10000)  
                                      Physical Minimum........    (0)  
                                      Physical Maximum........    (10000)  
                                      Input...................   (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                      Usage (Y)    
                                      Logical Maximum.........    (6000)  
                                      Physical Maximum........    (6000)  
                                      Input...................   (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                      Usage Page    (Digitizer) 
                                      Usage 48 (0x30)    
                                      Logical Minimum.........    (0)  
                                      Logical Maximum.........    (1023)  
                                      Physical Minimum........    (0)  
                                      Physical Maximum........    (1023)  
                                      Input...................   (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                    End Collection     
                              End Collection     
            Endpoint 0x81 - Interrupt Input   
                Address:   0x81  (IN)
                Attributes:   0x03  (Interrupt no synchronization data endpoint)
                Max Packet Size:   8
                Polling Interval:   4 ms
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Waltop Tablet Command Set Document.doc
Type: application/msword
Size: 203264 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20090610/7797dd74/attachment.doc>
-------------- next part --------------

//=====================================================================================================================
BOOL  My_SendCommand(PHID_DEVICE pTabletDevice, PCOMMAND pCommand, BOOL bGetBackData, DWORD delay_ms, PUCHAR Return_pData)
{
	UINT		i;
	BOOLEAN		FeatureStatus;
	PHID_DATA	pData = pTabletDevice -> FeatureData;

	pTabletDevice->FeatureReportBuffer[0] = (UCHAR) pData->ReportID;
	for (i=1;  i<pTabletDevice->Caps.FeatureReportByteLength;  i++)			//Auto Match to the length
	{
		pTabletDevice->FeatureReportBuffer[i] = pCommand->Data[i-1];
	}
	FeatureStatus = HidD_SetFeature (pTabletDevice->HidDevice, pTabletDevice->FeatureReportBuffer,  pTabletDevice->Caps.FeatureReportByteLength);		//The HidD_SetFeature routine sends a feature report to a top-level collection.
	Sleep(10);
	if (!FeatureStatus)
	{
		MessageBox(NULL,"-------Set_Report_Feature Fail.-------"," Re-plug dongle into USB Port again. ",MB_OK);
		return FALSE;
	}
	//--------------------------------------------------------------------------------
	if (bGetBackData)
	{
		if (pCommand->Delay)	Sleep(delay_ms);
		FeatureStatus = HidD_GetFeature(pTabletDevice->HidDevice,  pTabletDevice->FeatureReportBuffer,  pTabletDevice->Caps.FeatureReportByteLength);
		if (!FeatureStatus)
		{
			MessageBox(NULL,"-------Get_Report_Feature Fail ??!!-------","-----fail when return value-----",MB_OK);
			return FALSE;
		}
		memcpy(Return_pData, pTabletDevice->FeatureReportBuffer, pTabletDevice->Caps.FeatureReportByteLength);
		//memcpy(Return_pData,  pTabletDevice->FeatureReportBuffer+1,  pTabletDevice->Caps.FeatureReportByteLength-1);
	}
	return TRUE;
}
//==================================================================================================



More information about the devel mailing list