# [Irda] Kingsun KS-959

## Sparkster

I have bought this unknown-and-cheap-chinese irda and now I am having some trouble to work with it. First of all, I tried it in windows with it's windows drivers, and it works ok.

I am using a kernel 2.6.26-gentoo-r4 and the driver is compiled:

```

  │ Symbol: KS959_DONGLE [=y]                                               │

  │ Prompt: KingSun KS-959 IrDA-USB dongle (EXPERIMENTAL)                   │

  │   Defined at drivers/net/irda/Kconfig:179                               │

  │   Depends on: NET && IRDA && USB && EXPERIMENTAL                        │

  │   Location:                                                             │

  │     -> Networking                                                       │

  │       -> Networking support (NET [=y])                                  │

  │         -> IrDA (infrared) subsystem support (IRDA [=y])                │

  │           -> Infrared-port device drivers

  │ │    <*> KingSun KS-959 IrDA-USB dongle (EXPERIMENTAL) 

```

dmesg says this:

```

usb 4-2: new low speed USB device using ohci_hcd and address 8

usb 4-2: configuration #1 chosen from 1 choice

KingSun KS-959 IRDA/USB found at address 8, Vendor: 7d0, Product: 4959

ks959_sir: IrDA: Registered KingSun KS-959 device irda0

```

(I can't find irda0)

```

fenix linux # locate irda0

fenix linux # 

```

When I plug it, it creates the device /dev/usbdev4.X_ep00 and /dev/usbdev4.X_ep81 (X goes up from 1 as I plug and unplug it)

lsusb says this:

```

Bus 004 Device 008: ID 07d0:4959 Dazzle

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               1.10

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0

  bDeviceProtocol         0

  bMaxPacketSize0         8

  idVendor           0x07d0 Dazzle

  idProduct          0x4959

  bcdDevice            1.00

  iManufacturer           1 Kingsun CO.

  iProduct                2 USB to IRDA

  iSerial                 0

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           25

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          0

    bmAttributes         0x80

      (Bus Powered)

    MaxPower              100mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           1

      bInterfaceClass       255 Vendor Specific Class

      bInterfaceSubClass      0

      bInterfaceProtocol      0

      iInterface              0

      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               1

Device Status:     0x0000

  (Bus Powered)

```

/proc/bus/usb/devices says this:

```

T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  8 Spd=1.5 MxCh= 0

D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=07d0 ProdID=4959 Rev= 1.00

S:  Manufacturer=Kingsun CO.

S:  Product=USB to IRDA

C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA

I:* If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=00 Driver=ks959-sir

E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=1ms

```

I would like to use lirc, but I don't know if it's possible. First of all I would like to simply work with this device. I emerged irda-utils, but I can't run it because in /etc/conf.d/irda I must specify the device, and as I said, I can't find irda0. 

I also tried to run irdadump, but there is no output:

```

fenix linux # irdadump

```

Any idea?

----------

## Sparkster

I have just discovered that the directory /sys/bus/usb/devices/usb1/1-2/1-2.1/1-2.1.4/1-2.1.4:1.0/net/irda0 exists. There is this inside:

```

sparkster@fenix ~ $ ls /sys/bus/usb/devices/usb1/1-2/1-2.1/1-2.1.4/1-2.1.4\:1.0/net/irda0/

address    carrier  dormant   ifindex    mtu        statistics    type

addr_len   device   features  iflink     operstate  subsystem     uevent

broadcast  dev_id   flags     link_mode  power      tx_queue_len

```

----------

