[APP] [IR] [IPCAMERA] [GESTURE] [SPEECH] Design your own remote control

tboss1995

Member
Nov 12, 2011
16
1
0
Sample code

Hi, I am currently looking for the code to use the infrared emmiter of my s4. It's rooted so I don't mind if the solution for this is to enable/disable the light using console commands. The only thing I need is a sample code to send a custom code via the light. And as here it seems that you found a solution to send that code, I'm asking here.
Thanks in advance !

Edit: Sorry, found ^^
https://github.com/rngtng/IrDude/blob/master/src/com/rngtng/irdude/MainActivity.java
 
Last edited:

tboss1995

Member
Nov 12, 2011
16
1
0
Hello,
In the sample code that you gave (yeah, double post, I couldnt post the link this time for an unknown reason, new user limitations...)

There are pre-made codes for remotes, for example.
hex2dec("0000 006d 0022 0002 0152 00aa 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0696 0152 0055 0015 0e23"));

But what does this corresponds to? I suppose I have to convert this to binary, so that means that the s4 will send :
0000 0000 0000 0000 0000 0000 0110 1101 0000 0000 0010 0010 when the code is the following : 0000 006d 0022
But what is the frequency of the signal? 40KHz? 36KHz ? And how much time will it keep sending that signal at 36/40/whatever KHz for each bit?

Thanks in advance.
 

sregnov

Senior Member
Mar 10, 2011
161
21
0
wow

thank you. i will give this a try. i have both Smart IR Remote and TouchSquid, but both aren't able to control one of my TVs which I use for my PS3.
 

questionmark

Senior Member
May 10, 2005
145
93
0
leiden
Hello,
In the sample code that you gave (yeah, double post, I couldnt post the link this time for an unknown reason, new user limitations...)

There are pre-made codes for remotes, for example.
hex2dec("0000 006d 0022 0002 0152 00aa 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0696 0152 0055 0015 0e23"));

But what does this corresponds to? I suppose I have to convert this to binary, so that means that the s4 will send :
0000 0000 0000 0000 0000 0000 0110 1101 0000 0000 0010 0010 when the code is the following : 0000 006d 0022
But what is the frequency of the signal? 40KHz? 36KHz ? And how much time will it keep sending that signal at 36/40/whatever KHz for each bit?

Thanks in advance.
Hi

My apologies for delay answering.
The code given there ( I did not post that one myself ) is a PRONTO code format I would believe
To be honest IR code, PRONTO, HEX RAW , frequency etc... is very complicated to me...
Here there is some explanation : http://www.remotecentral.com/features/irdisp1.htm
This is more for electronic engineer and I'm not one...
So sorry. All I know is that
If I have valid pronto code and I send it to the GS4 IR blater it works.
Getting the code is the pain here... If you have a learning device ( philips pronto remote very expensive) and better USB-UIRT very cheap you can learn code and convert to pronto code. At this point having the code from remotecentral internet lookup using my APP or learning it with USB-UIRT, I can just edit the XML or set directly the code in the APP...
At one point I will support learning via USB-UIRT through IP...

Cheers
JM
 

questionmark

Senior Member
May 10, 2005
145
93
0
leiden
Hello i have install your app correctly and it works but when i open the app it's showing (look at the screen shot) .Can you make it compatible with my screen resolution? PLEASE:confused::confused::rolleyes:
Hi

Apologies for the delay...
Duh...that is an odd screen... not sure why you have nothing there...
The APP is designed on GS4 ( I use omega ROM with a google kernel just fine ) but I'm sure it be OK with stock ROM.
The APP screen layout etc... only supports GS4 for the moment...Thinking doing for the NOTE2...

I have done major update ( well I believe ) please see the first post and try again if you like
If it still does not work, and you use GS4 then I like to understand / help you.

Cheers
 

questionmark

Senior Member
May 10, 2005
145
93
0
leiden
Well Done to the Dev for working on this

I dont know if this would be any use to you but you can use an arduino with IR Receiver to read IR pulses and its so easy as codes are already freely availiable to do it so you can just program and go! You can also using an IR LED to output IR Pulses.
The Arduino may be a helpfull tool for the development and testing of your project as it will show you the IR pulses a remote generates and enable you to make your own database.

Its cheap and works very well. If you can use the data it gives you it could be a very useful tool... You can even use the arduino on android as there are a lot of apps that support it now and you can connect it to the gs4 via usb otg if you need to.

The arduino if you can use it would be a way of getting a user generated code database too as there are many arduinos out there and i bet theres a fair few on xda that have one already and could help with providing codes. I have one and could start providing codes from remotes i have.

Heres a good tutorial on it - http://www.ladyada.net/learn/sensors/ir.html

Hey !

Many thanks for this information.
I use USB-UIRT for the momment via IP in the APP and the native IR blaster, but cannot learn from it.
I will check BIG time arduino and see if it helps me.
Thanks again.
This is the sort of post I like to receive; basically help / info on the IR topic, best hardware device ( mainly for learning)

Cheers
 

questionmark

Senior Member
May 10, 2005
145
93
0
leiden
thank you. i will give this a try. i have both Smart IR Remote and TouchSquid, but both aren't able to control one of my TVs which I use for my PS3.
Hi

I've posted new version with VIDEO see first post.
IMO I improved it massively especially thanks to SIMONVT menudrawer for the look and feel. Also put in couple feature.
I also started to manage exception :) and tight the stuff much more.
As well as adding some features alignments mainly...
Yet still it is alpha and lot work needs to be done.
1)need to support TextView and other objects as only ImageView are implemented in activity design
2)Lot of work in the BINDING (edit action screen) object to DEVICE DB or jump to activity ( currently not showing binding that was previously set)
-implement timer
-implement hard key trapping and binding action to volume up/down/menu/back key ( HOME seems to be a pain in android)
-delete bindings
3)support LONG / REPEAT sending of IR


Thanks for your support
JM
 
  • Like
Reactions: sregnov

sregnov

Senior Member
Mar 10, 2011
161
21
0
Hi

I've posted new version with VIDEO see first post.
IMO I improved it massively especially thanks to SIMONVT menudrawer for the look and feel. Also put in couple feature.
I also started to manage exception :) and tight the stuff much more.
As well as adding some features alignments mainly...
Yet still it is alpha and lot work needs to be done.
1)need to support TextView and other objects as only ImageView are implemented in activity design
2)Lot of work in the BINDING (edit action screen) object to DEVICE DB or jump to activity ( currently not showing binding that was previously set)
-implement timer
-implement hard key trapping and binding action to volume up/down/menu/back key ( HOME seems to be a pain in android)
-delete bindings
3)support LONG / REPEAT sending of IR


Thanks for your support
JM
thank you. will give try this new version. i'll let you know what i think about it in a few days. cheers.
 

daihung1

Senior Member
Jan 30, 2012
199
29
0
Hi,

I'm a noob here so bare with me with questions that may seem dumb.

To my understanding, this app let you design your own ir remote layout with custom buttons. It also let you enter your own IR codes associate to the buttons to control whatever device that receive ir. Am I correct so far?

I have an old split-unit air conditioner which I have no idea what brand it is. I want to use my S4 to program this thing. I'd first have to find out what the IR code it uses from sites like remotecentral.com and then program it in the app? What if I can't find the codes then would I have to to use some device to learn/extract it? The remote is kind old but still works. I'm afraid that one day the remote will get lost or broken then I'd have no way to turn on this thing. If this app can help me do this, it's going to be wonderful.

Also, would I be able to setup this app to control ir toys, etc?

Thanks in advance.
 

questionmark

Senior Member
May 10, 2005
145
93
0
leiden
Hi,

There is NEW version posted today. See first page of this thread.

To my understanding, this app let you design your own ir remote layout with custom buttons. It also let you enter your own IR codes associate to the buttons to control whatever device that receive ir. Am I correct so far?
YES your are correct. The design screen aspect is what is the most important to me. As well of course the IR code(s) bound to buttons or ACTIVITY objects.
You can see the video of the previous version ( will post some new videos as I improved the binding screen and other stuff since...)


I have an old split-unit air conditioner which I have no idea what brand it is.
Surely you will have to get the BRAND somewhere so to maximize the chance to find the IR CODE for that device

I want to use my S4 to program this thing. I'd first have to find out what the IR code it uses from sites like remotecentral.com and then program it in the app?
Assuming you KNOW the BRAND and assuming the code is on REMOTECENTRAL
http://www.remotecentral.com/cgi-bin/codes
You can directly import it from the application...
If the DEVICE isn't there you will have to get the codes from somewhere... IF you find it on other places than remotecentral...then you can
in the APP DEVICE DATABASE add an entry and copy and past the code ( PRONTO FORMAT)
At this point the rest is easy...just create your screen with a button and bind the button the found code...


What if I can't find the codes then would I have to to use some device to learn/extract it?
CORRECT. I have a Philips pronto remote, so I have no problem, as well as this cheap USB-UIRT IR blaster and receiver that can learn remote control code.
For the moment for devices not on remotecentral I uses either the philips pronto remote or USB-UIRT to learn the device...at this point either I use the APP or edit directly the DEVICE.XML file...
I *WILL* soon or later add support for learning from USB-UIRT or the MS IR BLASTER (you will need a PC though that act as a learning server).... any other solution like using the camera to learn IR is not really feasible...it is possible...but would be quite complex. There are some other phone that supports learning... well I don't have it but it is a shame Samsun did not put that in CAUSE then it truly would have been nice....

The remote is kind old but still works. I'm afraid that one day the remote will get lost or broken then I'd have no way to turn on this thing. If this app can help me do this, it's going to be wonderful.
Yes this APP can do this. As a matter of fact I have a very expensive philips pronto remote that might die...I have also older phones... and think using them as universal remote control.. As an example I have an old samsung ace I no longer use... I can design screen with the S4 no problem and could downscale or provide an option to create REMOTE ACTIVITIES for the ACE screen dimension and then provide the "launcher" for the ACE. Since the ACE does not have IR it will off course go against a gatevway (hence remoteGate); a little server that just listen on IP socket and when receive a command i.e.: a IR CODE just blast it from USB-UIRT or the MS USB BLASTER.


Also, would I be able to setup this app to control ir toys, etc?
Probably, toys as helicopter and so... well might work...but the S4 blaster is quite weak .. also these remote for toys would probably send some sequences of codes on certain frequencies not compatible with S4... So in principle it could be possible but there could be limitation...would not surprise me
CURRENTLY the APP does NOT allow LONG PRESS and blast code in sequence IE VOLUME UP/DOWN... I will work on this..

Good luck


Cheers
 
Last edited:
  • Like
Reactions: daihung1

daihung1

Senior Member
Jan 30, 2012
199
29
0
I downloaded this application today and when I get a chance I'll play with it. Thanks again for your effort.

Sent from my SGH-M919 using Tapatalk 2
 

questionmark

Senior Member
May 10, 2005
145
93
0
leiden
New download:
Added TextView ( LABEL for remote screen in design ACTIVITY). This is not complete for the moment; i.e.: Label will not show when launching the remote.
This will be soon implemented as well as the need to re-organizing design activity menu.

Here an example
 

Attachments

Last edited:

questionmark

Senior Member
May 10, 2005
145
93
0
leiden
05/08/2013: More features demo... IPCAM view in remote activity. Only rtsp stream ( mjpgeg lib out there very unstable.) For the moment only a VIDEO shows the feature.
I need to stabilize all these new things ( especially labels). I'm just toying for the moment
What is better than showing the remote working while having on the remote screen an RTSP feed of my webcam...
https://www.dropbox.com/s/1xl7pxa80a2wuqt/SCR_20130805_191821.mp4

Of course this makes sense only if you control your device remotely ( via GATE part or remoteGate).

Next not sure when I will need to stabilize all what I have. Menu need re-organizing, icons for the menu bug fixes and as soon labels in remote are fully featured I guess it will become V1.

Cheers
Jean-Marc
 
Last edited:
  • Like
Reactions: daihung1

questionmark

Senior Member
May 10, 2005
145
93
0
leiden
Hi

Again an update. Previous update was quite buggy, I sent it just before leaving on Holiday...
So my apologies to the one that downloaded it. Also thanking the people that downloaded my app. You can rest assured it will become better and better in the future.

I still investigate on feature mainly how can we maximize chances to find IR code for our device
I came across this
http://www.bengt-martensson.de/harc/lirc2xml.html

This allows to convert with little limitation ( repeat code) LIRC remote to pronto code ( this is what I use in remoteGate)
Using IRDROID ( I bought the audio blaster just to thank people on there effort) I noticed that it has a JNI LIRC interface to LIRC .
So I use that interface now in remoteGate, not to send IR since we have a build in blaster but just the open source LIRC interface..
I will also later support other hardware using there audio blaster.
Then with the JNI LIRC interface in remoteGate I added an interface to lirc2xml.

This allows me for example from the OPENELEC provided LIRC remote to convert it to pronto code and the resulting XBOX generated code worked for my Asus eebox. LIRC2XML for that openelec LIRC conf file generated an invalid XML file ( as there is some fail code) but the one that are decoded are usable. So open the generated XML using a text editor if using a browser detects a bad XML. I tested couple other LIRC just fine though.

I believe with REMOTECENTRAL + LIRC remote support there is much more chance for one to find working code to there device.

Of course for the moment this is a prototype: from the main menu you can convert a LIRC.CONF file that you first download manually from
http://lirc.sourceforge.net/remotes/
and then convert it to pronto code as an XML fine generated in REMOTEGATE/LIRC.CONF folder... (see snapshots)
From there using the device DB of remoteGate you can copy and paste your code..

Surely this is quite some work: I need to work in automating testing/validating codes as other APP does out there, as well as generate remote template from that...
Well that is my future goal.

In the mean time I fixed couple of nasty issues form previous version improved slightly TextView.
I will not be able to work much on this till end of November ( I will have lot of other work).

Attached some screen shot.
The new version can be downloaded in the first post

Cheers
Jean-Marc
 
Last edited:

smfbradshaw

Member
May 31, 2011
8
2
0
Excellent work in progress here

I have been following this thread right from the beginning and you now have an excellent app developing that
has been very well thought out.
If people are prepared to put some effort in at the beginning it is well worth it.
With the latest version I have just put together a remote to control my Humax PVR9200T freeview box.
I am now using this from my Galaxy S4 I9505 and all buttons work perfectly.
One thing I found a little lacking were the icons to use on the remote so
I created some of my own for use with the remote I developed.
I am now just finishing off another remote for my Philips 36PW9618 television.
Please continue with this excellent program when you get time and if you need me to test anything then I will be glad to.