|
Slink-e / CDJ Discussion Archive #2 Re: VB IR ReceivePosted By: Colby Boles <cboles@s...> In Response To: VB IR Receive (Mike Miller)
>>> I am a little confused about how IR Receive in VB is supposed to work. IR Send works well. I pared down the sample app tvremote, and used the device file I had created using E-Z Learn. I was expecting the method: Private Sub Slinkx1_SlinkeDeviceEvent(Device As String, Message As String) ... to give me back something like Device="Kenwood" and Message="channelup", but instead I get nothing (method isn't invoked) unless I add: x = Slinkx1.AddDeviceText("lowlevel", "type=lowlevel", devID, slinkenum, 0) Then I see low level data about the IR code. Am I doing something wrong?
You're basically doing everything right in VB, but the problem lies in your device file. Currently, E-Z Learn only generates a transmit-only type device file labeled "IRTXONLY". For general-purpose tx and rx use, you need to generate a different type of device file called "IR". E-Z Learn will eventually generate these for you, but right now it does not. These files contain additional timing information regarding the coding scheme used so that they may be decoded in a robust fashion. Fortunately, I have already made device files with this information - the kenwood timing is contained in the file common1.cde which looks like this: -------------------------
type=IR
this defines the timing - all you need to do is define the codes for your particular kenwood device. Take the following steps to do this: 1) Create a new device file, let's say foo.cde - and include the following text: include=common1.cde 2) Now, load this device in either CDJ or your own VB app. If in VB, be sure to set Slinkx.ReportNoMatch = 1 3) Hit a key on the remote, you should get an event with the following (hypothetical) data device = nomatch
4) What this means is that the decoding system didn't have a name for what it just saw, but it can tell that it matches up with the common1.cde group of coding schemes, and the data which follows is the binary decoded data. 5) take this data and add it to the foo.cde device file along with a command name. e.g. power:1010101011010 6) repeat the process for the other keys 7) now you should have a device file which can be both received and transmitted Colby
Slink-e / CDJ Discussion Archive #2 is maintained by slinke-bbs-owner@nirvis.com with WebBBS 3.21. |