napsyeK question

Questions, comments and general discussion about Ribsu
Locked
macmastah
Posts: 1
Joined: Fri Aug 04, 2006 1:52 pm
Contact:

napsyeK question

Post by macmastah » Fri Aug 04, 2006 1:57 pm

I wasn't sure where to post this, so I apologize if its in the wrong area.

I'm trying to set up a remote control. It's recognized by napsyeK, and when I press its button, its REM code shows up in the Terminal. However, when I press the same button twice, I get different codes. How can I configure the BIT time so that this doesn't happen. Is there a way to find the optimal BIT time for a given remote?

Thanks for your time.

xyster
Site Admin
Posts: 605
Joined: Thu May 19, 2005 10:15 pm
Contact:

Post by xyster » Sat Aug 05, 2006 9:30 am

macmastah, there may not be anything wrong with the bit rate. Different remotes use different code mechanisms. For instance, when you press and hold a key, some remotes issue the command code initially and then follow that by a short 'repeat' code. In your case, it appears the remote is issuing alternating codes for the same command.
Are the codes you see always the same or are they continually different? If they are always the same, your remote is using differing codes for the same command. If it is continually different it could be a bit rate issue - the best way to find the correct bit rate is to play with the bit setting and see where the codes stabilize.

Stewie70
Posts: 4
Joined: Thu Aug 17, 2006 10:01 pm
Contact:

How do I specify the repeat code in the REM file?

Post by Stewie70 » Thu Aug 17, 2006 10:06 pm

I must be dumb :roll: I can't figure out how to specify the repeat code.
I'm setting up an Apple IR with the Keyspan 17A receiver.

This is the output I see:
1b0d 0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0205 0205 0202 0202 0202 0202 0202 0202 0205 0202 0205 0205 0202 0205 0202 0205 026f 1b07 02ff
1b07 02ff
1b07 02ff

How do I write this in the REM file?

bdimitrov
Posts: 1
Joined: Thu Sep 14, 2006 9:49 pm
Contact:

what you see are bit errors in the codes

Post by bdimitrov » Thu Sep 14, 2006 10:05 pm

Turns out the keyspan IR receiver is very sensitive to power noise. When plugged into a USB hub, the error rate can be very high. Try plugging it directly into your mac's USB port, or into an apple display hub.

Errors occur most commonly at the end of the code, and less frequently at the beginning. Perhaps that is why the first and last 16 bits emitted by the apple remote are simply markers that do not really distinguish the keys.

Other REM files on the web contain these begin/end markers where noise naturally occurs - so they won't match every time. Getting rid of the markers, and leaving the parts of the code that are less prone to noise, results in the codes below, which work very well for me.

Code: Select all

FRQ 38000

BIT 342

CMD MENU  0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0202 0205 0202 0202 0202 0202 0202 0202 0205 0205 0205 0205 0202 0202 0205 0205

CMD PLAY  0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0202 0202 0205 0202 0202 0202 0202 0202 0205 0205 0205 0205 0202 0202 0205 0205

CMD RIGHT 0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0205 0205 0205 0202 0202 0202 0202 0202 0205 0205 0205 0205 0202 0202 0205 0205

CMD LEFT  0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0202 0202 0202 0205 0202 0202 0202 0202 0205 0205 0205 0205 0202 0202 0205 0205

CMD UP    0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0205 0205 0202 0205 0202 0202 0202 0202 0205 0205 0205 0205 0202 0202 0205 0205

CMD DOWN  0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0205 0202 0205 0205 0202 0202 0202 0202 0205 0205 0205 0205 0202 0202 0205 0205

Stewie70
Posts: 4
Joined: Thu Aug 17, 2006 10:01 pm
Contact:

Post by Stewie70 » Fri Sep 15, 2006 9:31 pm

I have the following mapping that works fine. I just don't know how to handle the repeat codes.

I tried your codes, but didn't work for me - the receiver is plugged into my Apple keyboard hub.

Code: Select all

FRQ 38000

BIT 342

CMD MENU 1b0d 0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0205 0205 0202 0202 0202 0202 0202 0202 0205 0202 0205 0205 0202 0205 0202 0205 026f 1b07 02ff

CMD PLAY 1b0d 0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0205 0202 0205 0202 0202 0202 0202 0202 0205 0202 0205 0205 0202 0205 0202 0205 026f 1b07 02ff

CMD RIGHT 1b0d 0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0202 0205 0205 0202 0202 0202 0202 0202 0205 0202 0205 0205 0202 0205 0202 0205 026f 1b07 02ff

CMD LEFT 1b0d 0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0205 0202 0202 0205 0202 0202 0202 0202 0205 0202 0205 0205 0202 0205 0202 0205 026f 1b07 02ff

CMD UP 1b0d 0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0202 0205 0202 0205 0202 0202 0202 0202 0205 0202 0205 0205 0202 0205 0202 0205 026f 1b07 02ff

CMD DOWN 1b0d 0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0202 0202 0205 0205 0202 0202 0202 0202 0205 0202 0205 0205 0202 0205 0202 0205 026f 1b07 02ff

xyster
Site Admin
Posts: 605
Joined: Thu May 19, 2005 10:15 pm
Contact:

Post by xyster » Sat Sep 16, 2006 6:47 pm

Stewie,

There may be a way to do this. Duplicate the command you want to specify with the repeat code. Do this for every command. For example:

Code: Select all

CMD MENU 1b0d 0202 0205 0205 0205 0202 0205 0205 0205 0205 0205 0205 0202 0202 0202 0202 0205 0205 0205 0202 0202 0202 0202 0202 0202 0205 0202 0205 0205 0202 0205 0202 0205 026f 1b07 02ff
CMD_MENU 1b07 02ff

Stewie70
Posts: 4
Joined: Thu Aug 17, 2006 10:01 pm
Contact:

Post by Stewie70 » Sat Sep 16, 2006 9:27 pm

Xyster,

The problem is that the repeat code is the same for all keys. So it's not quite that simple since it's essentially 'context-sensitive' in that the repeat is for the key originally pressed.

There needs to be a way to specify that in the REM file. If not, then I don't see how repeat codes can be supported.

xyster
Site Admin
Posts: 605
Joined: Thu May 19, 2005 10:15 pm
Contact:

Post by xyster » Sun Sep 17, 2006 8:32 am

I understand that. However, I still believe this is worth trying because of the KeySpan software logic. It may just work. As far as I can tell (I did some string snooping in DMRMapper), there is no way to specify a global repeat code in the REM file.

Stewie70
Posts: 4
Joined: Thu Aug 17, 2006 10:01 pm
Contact:

Post by Stewie70 » Sun Sep 17, 2006 9:02 am

I tried it before posting - should've mentioned that.

Seems to default to the first definition of the mapping - in my case it was CMD MENU. So if I keep the key pressed on any key, it effectively interprets that as the menu key.

Locked