Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I am building a new htpc out of an old dvd player. I have connected the buttons on the front of the dvd player to an rs-232/serial port on the computer (using these schematics: http://www.modasylum.com/content.php...ERFACE&page=2). Basically what the the interface does is to connect the CD DSR CTS RI pins to the DTR pin in different combinations. Thus allowing 15 buttons to be connected to the serial port.
Does anyone of you guys know of any software able to handle this or any similar device?
Apparently lirc doesn't work. I have tried googling for a couple of hours but have found nothing.
You'll probably need to roll your own. It's not that difficult. For example:
Code:
#!/usr/bin/expect
global Port
global Serial
set Serial "/dev/ttyUSB2"
set last "off"
proc cleanup {} {
global Version
global Port
close $Port
exit
}
trap cleanup {SIGINT SIGHUP SIGQUIT SIGUSR1 SIGTERM}
proc monitor {} {
global Port
global last
set DCD [lindex [fconfigure $Port -ttystatus] 7]
set DCDstate "off"
if {$DCD == 1} {
set DCDstate "on"
}
if {$DCDstate != $last} {
catch {exec /usr/local/bin/someprogram &}
set last $DCDstate
}
after 5000 monitor
}
monitor
while {1} {
after 1000
}
The above will monitor the state of the DCD, and run a program when it changes.
Last edited by macemoneta; 10-13-2006 at 11:22 AM.
Hi!
Thanks for the reply!
I'm not trying to buy you here. But if i were to get you the hardware, could you consider writing the software?
Of course i would design the hardware according to your specifications. But i have no knowledge of programming. I'm not a master designer but i think i could come up with something that would look allright if your're interested. Hopefully other people might be interested in the software/hardware as well.
My brother knows how to write good code, but i have used him too much already. It feels like he has to program every stupid idea i can come up with...
Thanks for the reply!
/Peter
Last edited by pandersson61; 10-13-2006 at 08:46 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.