Consumer IR (TV remote control) implementation
| Mon, 2005-09-26 19:17 | |
|
I am trying to use Consumer Infra Red protocol over Serial Infra Red. I must pulse every 1 and 0s at 38 khz as I read at these pages.
http://www.tuxmobil.org/Infrared-HOWTO/infrared-howto-c-lirc-irda.html http://www.codeproject.com/ce/TVRemote.asp Quote Most IR remote controls use 38 KHz sub-carrier. 3 times 38 is 114, very close to 115.2. You can set the UART to operate at 115.2 Kbps, 7 data bits, no parity, and 1 stop bit - a total of 9 bits. Each 3 cycles of the 38 KHz sub-carrier can be received or transmitted as a byte of 0x5B. But I get 43.5 khz instead of 38.5 khz. Code: RCommServ server; RComm commPort; TCommConfig portSettings; _LIT(PDD_NAME,"EUART1"); _LIT(LDD_NAME,"ECOMM"); User::LoadPhysicalDevice (PDD_NAME); User::LoadLogicalDevice (LDD_NAME); StartC32 (); server.Connect(); server.LoadCommModule (_L ("ECUART")); commPort.Open(server, _L("COMM::0"), ECommExclusive); TCommCaps commCaps; commPort.Caps(commCaps); portSettings().iHandshake = 0; portSettings().iDataBits = EData8; portSettings().iStopBits = EStop2; portSettings().iParity = EParityEven; portSettings().iSIREnable = ESIREnable; portSettings().iSIRSettings = KConfigSIRPulseWidthMaximum; portSettings().iRate = EBps115200; commPort.SetConfig (portSettings); TUint8 bPulseStream; bPulseStream = 0x5b; TBuf8<256> buffer; TRequestStatus status; buffer.Append(bPulseStream); commPort.Write(status,buffer); User::WaitForRequest(status); |
|






Forum posts: 1
Forum posts: 5
http://vitotechnology.com/en/products/oscilloscope.html
This program reads 38.5 khz at symbian remote programs(Psiloc Tv Remote,Novii Tv) and tv remotes. So there must be no problem at my calculations.
Forum posts: 5
i am also working on the project for series60 platform... i am stuck in the infrared writing step... i really appreciate any help i can get..
thank you.
Forum posts: 53
Hi all
what status are your projects?
any comments?
Forum posts: 5
It is an open source project with GPL license for a long time "http://sourceforge.net/projects/legorc" .But I stop working on this project.
Forum posts: 53
I searched another aritical on CodeProject.
[url=http://www.codeproject.com/KB/miscctrl/UniversalRemoteControlPDA.aspx?msg=2064706#xx2064706xx]
But I can not understand the function, BurstOut. would you like to give some comments?
Forum posts: 5
At this article they have generated 38khz infra red beam with the same technique that I have tried. This technique is not working at my code. I dont have any clue about it.
static int baudRate = 115200;public static Parity parity = Parity.None;
static int dataBits = 7;
public static StopBits stopBits = StopBits.One;
SerialPort IR_COM = new SerialPort(portName, baudRate, parity, dataBits, stopBits);
After that they have implemented a coding which is called manchester code. (http://en.wikipedia.org/wiki/Manchester_code)
At digital communications there are lots of data loss. To make a reliable connections you must use some coding techniques. Thats why they use manchester coding. Manchester coding simply says that; replace all "0"s with "0 1" and replace all "1"s with "1 0". By this technique, receiver part of the hardware can parse data correctly. Otherwise if receiver gets more than two "0"s or "1"s, it can behave them like only one "0" or only one "1".
if (c == '1')
{ // 1 -> 10
manchesterData[ index] = '1';
manchesterData[++index] = '0';
}
if (c == '0')
{ // 0 -> 01
manchesterData[ index] = '0';
manchesterData[++index] = '1';
}
I hope it helps.
Forum posts: 1
Hello,
I search a web suite with all rc modulation http://www.sbprojects.com/knowledge/ir/ir.htm
And on forum Nokia have a post about Raw IR Packet no Obex http://discussion.forum.nokia.com/forum/showthread.php?t=116167&highlight=remote+control
Forum posts: 278
In case anybody is interested, there's no actual need for IrDA port to be able to use a phone as a remote control: just connect an IR led to the headset!
http://jumpjack.wordpress.com/2008/06/10/turn-your-phone-into-an-universal-remote-control/
Just play the proper WAV file and you're done!
Of course an application which creates needed WAV files on board, rather than playing WAV files created by PC, would be cool!
What I still miss is a method to use the phone itself to sample the remote: I can't understand well how the mic in the headset work: what are all those components for?!? Can't I just connect a microphopone to MIC-IN??
Once we get also the sampling working, we could "emulate" IrDA just by recording and playing audio!
-- JumpJack --
Forum posts: 5
Yes it is a good idea. You cant just plug ir leds to the mic output. You must use resistor to protect ir leds unless they will burn. As you see there are only 3 components. 2 of them are ir leds and one of them is 10 ohm resistor. They use 2 ir leds to increase the power of infrared light.
By the way generating WAV file is not an easy task. You still must know the Consumer Infra Red protocol.
Forum posts: 278
I successfully wrote a PC couple of programs which can generate proper WAV files to be used for IR emitting:
http://code.google.com/p/ledrem/downloads/list
But that's not why I'm here again
, but unfortunately it can't play WAV files. But it has a standard IrDA port.
I bought an old s40 phone for 15 bucks
So, did anybody eventually figure out the needed algorithm to convert CIR data to IrDA data?
For example, I need to "play" a 200 us pulse followed by 4800 us silence: which bytes should I send over com port?!?
I think an IrDA pulse is 8.68 us long (1,000,000/115,200): does it mean I should produce 200/8.68 = 23 "1-bits" and 4800/8.68=553 "0-bits"?
-- JumpJack --