LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-12-2006, 12:00 PM   #1
pandersson61
Member
 
Registered: Jan 2004
Distribution: Ubuntu 9.10, 10.04
Posts: 40

Rep: Reputation: 15
linux rs-232 button interface


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.

Thanks

/Peter
 
Old 10-13-2006, 11:19 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
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.
 
Old 10-13-2006, 08:44 PM   #3
pandersson61
Member
 
Registered: Jan 2004
Distribution: Ubuntu 9.10, 10.04
Posts: 40

Original Poster
Rep: Reputation: 15
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.
 
Old 10-13-2006, 08:55 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
No thanks. I've retired from that career, after nearly 30 years of it.

This site does have sort of a help wanted section, so feel free to post there if you're looking for someone and are willing to compensate them.
 
  


Reply



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
RS 232 & Handshake Hugo Orlando Programming 1 08-03-2004 12:36 AM
minicom with a USB to RS-232 converter chozzie Linux - Software 0 11-12-2003 02:01 AM
RS-485 / RS-232 problem, how to solve?!? rkrijger Linux - Hardware 2 10-29-2003 02:37 AM
How to monitor RS-232 rkrijger Linux - Networking 2 10-21-2003 05:01 AM
Rs-232 yogotie Linux - Hardware 2 08-03-2003 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:52 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration