LinuxQuestions.org
Help answer threads with 0 replies.
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-01-2010, 02:52 AM   #1
fafner
LQ Newbie
 
Registered: May 2010
Posts: 7

Rep: Reputation: 0
Reading raw codes from a remote control with a Tekram IR-210B serial dongle


Hello, I'm back with another weird question.

I need to read raw codes from various remote controls (for TVs, DVRs, etc). For that I use a Tekram IR-210B serial dongle. At least I try, since I can't put any meaning on the codes I get by reading /dev/ttyS0 . I tried various tricks, including reading /dev/ttyS0 as a stream, using the Linux irda stack, lirc, similar experiments with Windows 2000/XP too, but nothing seems to work (at least not as I am expecting). The technical documentation is non-existant, Tekram e-mail support doesn't answer (or returns non-existant user errors when it does), browsing the kernel file tekram.c didn't help either, so I'm kind of stuck.

Because I won't need this for more than a few days (or weeks at the very most), I don't need a rock-solid solution, what I need is nothing mode than read raw (presumably RC-5) codes from a few remote controls (2 of them being from mainstream brands, another one claiming to be universal). So if nothing else a dirty trick will perfectly do.

Ideally, a technical documention on how to get the raw codes from the remote controls is what I am looking for. Something that tells me what baud rate to use, which parity, number of stop bits, and how to decode the stream (as I suspect it doesn't contain the raw codes as-is). However, I will be happy with any advice you may have on where to look or what tricks I might try.

Thanks in advance
 
Old 10-04-2010, 02:36 PM   #2
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
Have you read the Linux Infrared HOWTO?
 
Old 10-05-2010, 07:12 AM   #3
fafner
LQ Newbie
 
Registered: May 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Yes, but it didn't help. At some point, I have the irda0 network device up and running. But when I send commands with a remote control all I get are errors (hundreds of them) in the Rx field. If I'm not mistaken, it means the incoming data are wrong. Wireshark doesn't get anything either (I'm not exactly surprised given that there is technically no correct frame). That's basically why I am going to the raw code.

Sorry, I forgot to mention this step.
 
Old 10-05-2010, 09:57 AM   #4
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
It would be difficult to help without access to the hardware myself, but according to several sources the baud rate should be 115200, although it should be able to support lower rates (57600, 38400, 19200, 9600, 4800 and 2400 are typical for IR). If you're just using it for remote control than it would probably be best to use a lower rate.

Just to be clear, what's your current configuration? Are you using the kernel module and the information that's provided for it (ie. use "irattach -d tekram" to initialize the device)? It would seem to me that it should be relatively easy to get it working, since all the pieces are already available.
 
Old 10-07-2010, 06:58 AM   #5
fafner
LQ Newbie
 
Registered: May 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Since yesterday, I got a computer from someone which has a built-in home-made infrared receptor. It has a working configuration, and I was able to write a small program that uses the lirc_client library and dumps codes and commands read from a remote controller. By digging deeper I found the mode2 and irrecord utilities which give me what I wanted. Well, not exactly it seems, but close enough. Looks like those utilies don't work on the previous computer, which leads me to believe there might be a problem there.

The mode2 utility dumps the delay between peaks of the signal, and the irrecord allows to create configurations for unsupported remote controls. The first one gives me the signal I wanted, which I successfully decoded, and I got the same values that end up in the configuration file created by the second one. I got a little more data from the signal too, which is what I was looking for from the beginning.

Thanks for your efforts
 
  


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
Reading (WordSAtar/WordPerfect 5.1) formatting codes? felixk Linux - Software 2 07-21-2010 07:20 PM
Device Name for the tty on a USB to Serial Dongle Russ Linux - Hardware 7 10-16-2009 12:40 PM
How can I use hexdump to display ASCII control codes? Akabaka Linux - Software 2 09-19-2009 06:52 PM
Reading the ip address from a packet raw sockets linuxtest Programming 2 12-10-2008 02:43 PM
reading raw data in to memory whizbit Programming 77 07-07-2005 10:20 AM

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

All times are GMT -5. The time now is 02:23 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