<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/2926" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2009-06-28T16:28:03+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/2926</id>

		<entry>
		<author><name><![CDATA[bordi]]></name></author>
		<updated>2009-06-28T16:28:03+02:00</updated>

		<published>2009-06-28T16:28:03+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2926&amp;p=9933#p9933</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2926&amp;p=9933#p9933"/>
		<title type="html"><![CDATA[Re: 4 gamepads not recognized on LINUX]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2926&amp;p=9933#p9933"><![CDATA[
Yeah I used his code to learn how to do this, but the problem is when I use 2 controllers it worked, like this:<br /><br /><div class="codebox"><p>Code: </p><pre><code>PROGMEM char usbHidReportDescriptor&#91;USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH&#93; = {<br /><br />    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)<br />    0x09, 0x04,                    // USAGE (Joystick)<br />    0xa1, 0x01,                    // COLLECTION (Application)<br />    0x09, 0x01,                    //   USAGE (Pointer)<br />    0xa1, 0x00,                    //   COLLECTION (Physical)<br />    0x85, 0x01,                    //     REPORT_ID (1)<br />    0x09, 0x30,                    //     USAGE (X)<br />    0x09, 0x31,                    //     USAGE (Y)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x26, 0xFF, 0x00,              //     LOGICAL_MAXIMUM (255)<br />    0x75, 0x08,                    //     REPORT_SIZE (8)<br />    0x95, 0x02,                    //     REPORT_COUNT (2)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0x05, 0x09,                    //     USAGE_PAGE (Button)<br />    0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)<br />    0x29, 0x10,                    //     USAGE_MAXIMUM (Button 16)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)<br />    0x75, 0x01,                    //     REPORT_SIZE (1)<br />    0x95, 0x10,                    //     REPORT_COUNT (16)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0xc0,                          //     END_COLLECTION<br />    0xc0,                          // END_COLLECTION<br /><br />    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)<br />    0x09, 0x04,                    // USAGE (Joystick)<br />    0xa1, 0x01,                    // COLLECTION (Application)<br />    0x09, 0x01,                    //   USAGE (Pointer)<br />    0xa1, 0x00,                    //   COLLECTION (Physical)<br />    0x85, 0x02,                    //     REPORT_ID (2)<br />    0x09, 0x30,                    //     USAGE (X)<br />    0x09, 0x31,                    //     USAGE (Y)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x26, 0xFF, 0x00,              //     LOGICAL_MAXIMUM (255)<br />    0x75, 0x08,                    //     REPORT_SIZE (8)<br />    0x95, 0x02,                    //     REPORT_COUNT (2)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0x05, 0x09,                    //     USAGE_PAGE (Button)<br />    0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)<br />    0x29, 0x10,                    //     USAGE_MAXIMUM (Button 16)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)<br />    0x75, 0x01,                    //     REPORT_SIZE (1)<br />    0x95, 0x10,                    //     REPORT_COUNT (16)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0xc0,                          //     END_COLLECTION<br />    0xc0,                           // END_COLLECTION<br />};</code></pre></div><br /><br />But when I put all the 4 controllers (changing the USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH at the .h) it doesn't work on linux, just on windows...<br /><br />I didn't defined the device descriptor, I think I'm using the V-USB default... I don't know if it is something related to it.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2372">bordi</a> — Sun Jun 28, 2009 4:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2009-06-27T03:24:26+02:00</updated>

		<published>2009-06-27T03:24:26+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2926&amp;p=9925#p9925</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2926&amp;p=9925#p9925"/>
		<title type="html"><![CDATA[Re: 4 gamepads not recognized on LINUX]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2926&amp;p=9925#p9925"><![CDATA[
Yeap, from what I know that what you get with linux. <br /><br />Look here, <!-- m --><a class="postlink" href="http://www.raphnet.net/electronique/atari_usb/index_en.php">http://www.raphnet.net/electronique/ata ... dex_en.php</a><!-- m --><br /><br />under &quot;Sega multi-tap&quot;. Same deal. Ralh is a bit of a genius when it comes to this stuff. He works mainly with linux, so if there was a way I'd image he'd found it.  It would not hurt you to email him, and ask though...<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Sat Jun 27, 2009 3:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bordi]]></name></author>
		<updated>2009-06-26T23:55:33+02:00</updated>

		<published>2009-06-26T23:55:33+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2926&amp;p=9922#p9922</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2926&amp;p=9922#p9922"/>
		<title type="html"><![CDATA[4 gamepads not recognized on LINUX]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2926&amp;p=9922#p9922"><![CDATA[
Hi,<br />I'm working on a module to connect 4 Nintendo64 controllers to PC via USB.<br />I'm almost finishing it, but I have a problem, my hid descriptor has 4 identical devices identified by the report-ID. OK, on windows this works fine but on Linux they don't appear at the /dev/input as joysticks. They appeared as one single file called event6. When I take 2 controllers from the hid descriptor, leaving only 2 they work fine on both O.S.'s  . But on linux they appear just as one big controller with 4 axis and 32 buttons, but they have half of these each. On windows at all cases they appear as separate controller.<br /><br />Here is my descriptor:<br /><br /><div class="codebox"><p>Code: </p><pre><code>PROGMEM char usbHidReportDescriptor&#91;USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH&#93; = {<br /><br />    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)<br />    0x09, 0x04,                    // USAGE (Joystick)<br />    0xa1, 0x01,                    // COLLECTION (Application)<br />    0x09, 0x01,                    //   USAGE (Pointer)<br />    0xa1, 0x00,                    //   COLLECTION (Physical)<br />    0x85, 0x01,                    //     REPORT_ID (1)<br />    0x09, 0x30,                    //     USAGE (X)<br />    0x09, 0x31,                    //     USAGE (Y)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x26, 0xFF, 0x00,              //     LOGICAL_MAXIMUM (255)<br />    0x75, 0x08,                    //     REPORT_SIZE (8)<br />    0x95, 0x02,                    //     REPORT_COUNT (2)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0x05, 0x09,                    //     USAGE_PAGE (Button)<br />    0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)<br />    0x29, 0x10,                    //     USAGE_MAXIMUM (Button 16)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)<br />    0x75, 0x01,                    //     REPORT_SIZE (1)<br />    0x95, 0x10,                    //     REPORT_COUNT (16)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0xc0,                          //     END_COLLECTION<br />    0xc0,                          // END_COLLECTION<br /><br />    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)<br />    0x09, 0x04,                    // USAGE (Joystick)<br />    0xa1, 0x01,                    // COLLECTION (Application)<br />    0x09, 0x01,                    //   USAGE (Pointer)<br />    0xa1, 0x00,                    //   COLLECTION (Physical)<br />    0x85, 0x02,                    //     REPORT_ID (2)<br />    0x09, 0x30,                    //     USAGE (X)<br />    0x09, 0x31,                    //     USAGE (Y)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x26, 0xFF, 0x00,              //     LOGICAL_MAXIMUM (255)<br />    0x75, 0x08,                    //     REPORT_SIZE (8)<br />    0x95, 0x02,                    //     REPORT_COUNT (2)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0x05, 0x09,                    //     USAGE_PAGE (Button)<br />    0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)<br />    0x29, 0x10,                    //     USAGE_MAXIMUM (Button 16)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)<br />    0x75, 0x01,                    //     REPORT_SIZE (1)<br />    0x95, 0x10,                    //     REPORT_COUNT (16)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0xc0,                          //     END_COLLECTION<br />    0xc0,                           // END_COLLECTION<br /><br />    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)<br />    0x09, 0x04,                    // USAGE (Joystick)<br />    0xa1, 0x01,                    // COLLECTION (Application)<br />    0x09, 0x01,                    //   USAGE (Pointer)<br />    0xa1, 0x00,                    //   COLLECTION (Physical)<br />    0x85, 0x03,                    //     REPORT_ID (3)<br />    0x09, 0x30,                    //     USAGE (X)<br />    0x09, 0x31,                    //     USAGE (Y)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x26, 0xFF, 0x00,              //     LOGICAL_MAXIMUM (255)<br />    0x75, 0x08,                    //     REPORT_SIZE (8)<br />    0x95, 0x02,                    //     REPORT_COUNT (2)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0x05, 0x09,                    //     USAGE_PAGE (Button)<br />    0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)<br />    0x29, 0x10,                    //     USAGE_MAXIMUM (Button 16)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)<br />    0x75, 0x01,                    //     REPORT_SIZE (1)<br />    0x95, 0x10,                    //     REPORT_COUNT (16)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0xc0,                          //     END_COLLECTION<br />    0xc0,                           // END_COLLECTION<br /><br />    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)<br />    0x09, 0x04,                    // USAGE (Joystick)<br />    0xa1, 0x01,                    // COLLECTION (Application)<br />    0x09, 0x01,                    //   USAGE (Pointer)<br />    0xa1, 0x00,                    //   COLLECTION (Physical)<br />    0x85, 0x04,                    //     REPORT_ID (4)<br />    0x09, 0x30,                    //     USAGE (X)<br />    0x09, 0x31,                    //     USAGE (Y)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x26, 0xFF, 0x00,              //     LOGICAL_MAXIMUM (255)<br />    0x75, 0x08,                    //     REPORT_SIZE (8)<br />    0x95, 0x02,                    //     REPORT_COUNT (2)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0x05, 0x09,                    //     USAGE_PAGE (Button)<br />    0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)<br />    0x29, 0x10,                    //     USAGE_MAXIMUM (Button 16)<br />    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)<br />    0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)<br />    0x75, 0x01,                    //     REPORT_SIZE (1)<br />    0x95, 0x10,                    //     REPORT_COUNT (16)<br />    0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />    0xc0,                          //     END_COLLECTION<br />    0xc0                           // END_COLLECTION*/<br />};<br /></code></pre></div><br /><br />Anyone have ever done something like this to help me?<br />thanks, sorry for the bad english...<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=2372">bordi</a> — Fri Jun 26, 2009 11:55 pm</p><hr />
]]></content>
	</entry>
	</feed>
