The digi* scripts here are used with writepp to control a Philips DTX6371 (OnDigital) digital TV receiver with an elaborate (and rather silly) hardware hack. While the digibox has a serial port, it doesn't appear possible to use it to change channels (OnDigital sold a serial-attached keyboard that included a separate IR transmitter for the regular remote control functions) -- so I need to generate appropriate IR signals for it. It uses the RC6 protocol, but I don't have any idea what the ID numbers for it are, and I don't have the appropriate hardware to find out; I thus need to use the existing remote control to generate the signal. The relevant bit of keyboard matrix is as follows -- pin numbers are on the chip inside the remote: p1 p3 p4 p6 p9 6 7 p10 3 p11 2 p14 5 1 p15 9 8 0 4 The chip is very picky about what it's got connected in the matrix; using analogue switch chips or transistors doesn't work, so I ended up with 10 miniature relays, one for each button. The circuit is approximately: 5V | PC parallel = o--- port relay = .. / to key 0 = o--- Gnd o--GND __________ | | 74HC154 | | | | ___ |/ D0 o--------|A0 /Y0|------|>o----[___]--| BC108 D1 o--------|A1 /Y1|--... 33k |\, D2 o--------|A2 to | | D3 o--------|A3 /Y9|--... GND | | D4 o-+-|>o--|/E0 | | ,-|/E1 | | GND|_________| All inverters |>o 1/6 CD4069 | ___ `-[___]--GND 33k The idea behind inverting the enable input is that having the input be all ones or all zeroes will not result in any of the relays turning on (and thus won't run down the remote control's batteries); the pull-down resistor on the enable input does the same job for if the parallel port's set to be inputs. The relays I used have internal back EMF protection diodes; if yours don't then you'll need to add them. Types of components (and values of resistors) aren't critical; they just happened to be what I had around. The digibox unfortunately has a habit of ignoring keypresses for no obvious reason (it was noticable when I was using the remote by hand -- examining the remote's IR LED with a webcam shows that it is firing quite happily). The scripts work around this by sending each channel number several times, but this obviously doesn't work for multi-digit channel numbers (since you don't know if it's ignored one of the digits); the workaround is to set all the channels you want to record from to have single-digit numbers. If there are more than ten, you're out of luck, I'm afraid. I could probably have done this rather more simply by buying an IR transmitter/receiver unit and building one of the designs from lirc.org, but if I were actually spending money on this project then I'd just buy a PCI DVB-T card instead of messing around with an external digibox.