LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-18-2008, 01:22 PM   #1
Piquant77
LQ Newbie
 
Registered: May 2006
Distribution: Ubuntu 7.10
Posts: 5

Rep: Reputation: 0
Question What is my USB Keyboard port address?


Hi guys, I've been trying to use a program that refers to my keyboard port.


Code:
#define KEYBOARD_PORT 0x60
#define KEYBOARD_STATUS_PORT 0x64
This is standard and it works perfectly. It listens to the /dev/input/event1 device node, which is my laptop keyboard.

Now I would like to make it listen to /dev/input/event3, which is my external USB keyboard device node. The problem is, I have no clue what port it is and I don't know how to find out. I tried stuff like lsusb -v but I don't know where to look. Can anyone give me a hint? It would be much appreciated. Thanks.
 
Old 01-18-2008, 02:55 PM   #2
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Code:
Bus 005 Device 002: ID 413c:2003 Dell Computer Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x413c Dell Computer Corp.
  idProduct          0x2003
  bcdDevice            3.01
  iManufacturer           1
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               70mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      65
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN  <-- is this what you are looking to find ?
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              24
cannot read device status, Operation not permitted (1)



Bus 003 Device 003: ID 413c:2003 Dell Computer Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x413c Dell Computer Corp.
  idProduct          0x2003
  bcdDevice            3.01
  iManufacturer           1
  iProduct                2
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               70mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      65
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              24
cannot read device status, Operation not permitted (1)
I have 2 usb keyboards attached to this system and they both share the same endpoint address.. the Bus and device ID's are the only difference showing. I would have expected the addresses to be different.. hrm..

Last edited by farslayer; 01-18-2008 at 03:00 PM.
 
Old 01-19-2008, 01:17 AM   #3
Piquant77
LQ Newbie
 
Registered: May 2006
Distribution: Ubuntu 7.10
Posts: 5

Original Poster
Rep: Reputation: 0
I already went through reading this and I don't think the 0x81 means anything very revealing since all my USB ports share it.

I also looked in /proc/ioports

Code:
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-006f : keyboard
0070-0077 : rtc
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : 0000:00:1f.2
  0170-0177 : libata
01f0-01f7 : 0000:00:1f.2
  01f0-01f7 : libata
0376-0376 : 0000:00:1f.2
  0376-0376 : libata
03c0-03df : vga+
03f6-03f6 : 0000:00:1f.2
  03f6-03f6 : libata
04d0-04d1 : pnp 00:02
0910-091f : pnp 00:08
0920-092f : pnp 00:08
0930-097f : pnp 00:08
0cb0-0cbf : pnp 00:08
0cf8-0cff : PCI conf1
1000-107f : 0000:00:1f.0
  1000-1005 : pnp 00:02
    1000-1003 : ACPI PM1a_EVT_BLK
    1004-1005 : ACPI PM1a_CNT_BLK
  1006-1007 : pnp 00:03
  1008-100f : pnp 00:02
    1008-100b : ACPI PM_TMR
  1010-1015 : ACPI CPU throttle
  1020-1020 : ACPI PM2_CNT_BLK
  1028-102f : ACPI GPE0_BLK
  1060-107f : pnp 00:03
    1060-107f : iTCO_wdt
1080-10bf : 0000:00:1f.0
  1080-10bf : pnp 00:03
10c0-10df : 0000:00:1f.3
  10c0-10df : pnp 00:03
bf20-bf3f : 0000:00:1d.3
  bf20-bf3f : uhci_hcd
bf40-bf5f : 0000:00:1d.2
  bf40-bf5f : uhci_hcd
bf60-bf7f : 0000:00:1d.1
  bf60-bf7f : uhci_hcd
bf80-bf9f : 0000:00:1d.0
  bf80-bf9f : uhci_hcd
bfa0-bfaf : 0000:00:1f.2
  bfa0-bfaf : libata
e000-efff : PCI Bus #0d
f400-f4fe : pnp 00:03
I can see there's the standard 0x60 keyboard address and I can also see the four universal serial bus addresses. I tried them but it didn't work. Anyway, the port range isn't the same length than 0x60 - 0x6f so I guess it's interpreted differently when it goes through USB.

After doing some research (I'm not an expert by any means) I don't think I can just replace the port address in my code. The solution could be a layer higher... maybe I should just find a way to connect /dev/input/event3 (USB keyboard) to /dev/input/event1 (standard 0x60 laptop keyboard).

Anyway, thanks for you interest.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ACPI power off works with PS/2 keyboard but not with USB keyboard mrwaters Linux - Hardware 5 10-05-2006 05:06 PM
usb keyboard and soundcard conflict (sound set to keyboard?) netsurf Linux - Hardware 2 04-09-2005 07:08 AM
USB keyboard and mouse through serial port (old computer) meiqur Linux - Hardware 9 01-22-2005 06:22 PM
base address and port address Nodren Linux - Hardware 0 08-30-2004 02:54 PM
Installed new kernel 2.6.2: Keyboard only works on USB port and scroll doesn't work objorkum Linux - General 2 02-11-2004 09:59 AM


All times are GMT -5. The time now is 11:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration