JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

Odd issue with RMIR and SONY12 protocol

 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Software
View previous topic :: View next topic  
Author Message
Drmn



Joined: 14 Aug 2013
Posts: 5

                    
PostPosted: Wed Aug 14, 2013 9:16 pm    Post subject: Odd issue with RMIR and SONY12 protocol Reply with quote

Hi,
Bear with me, I'm a noob at this. I am trying to get an old Sony stereo amplifier/tuner deck (STR-D511) working with a JP1.x remote (URC-1067, i.e. "the red-button Comcast Remote"). The long-term plan is to control several devices (TV, DVD, stereo, from different vendors) from this remote, but I figured I should get the stereo working first since there are no known codes for it.

I have the original remote, but it is failing, and the usual fixes (conductive paint, tinfoil) don't hold for very long. I built a receiver for LIRC and grabbed the codes that I could from the original remote. It uses the SONY12 protocol, described at (http://www.sbprojects.com/knowledge/ir/sirc.php). Each code consists of a 5-bit device address and 7-bit command, sent LSB-first. It is mostly pretty straightforward, except for the multitude of addresses (the single "tuner" deck is expressed as multiple subsystems, e.g. the main volume, surround volume, channel presets, etc. all have separate addresses).

I bashed together a quick python script to display the LIRC captured codes in proper MSB-first (address, command) pairs. However, I can't seem to get these working with the JP1 remote. Mainly, I believe the deck is not responding to the addresses as captured by LIRC, or I am not entering them in RMIR correctly. Watching the output in (win)LIRC's IRGRAPH, the OEM remote sends many button codes with different addresses depending on the last input selected on the remote, and for some, sends a command with several addresses in sequence (LIRC's irrecord captures "a" code for these, but which one is anyone's guess.)

So, to find out which address(es) the deck responds to, I tried creating a device upgrade consisting of the command 0x00 (corresponding to "station preset 0") for addresses 0 ~ 15, mapped to the 0..9 buttons and a few others on the JP1 remote. However, none of them works. Pressing buttons on the reprogrammed JP1 remote and OEM remote side-by-side with IRGRAPH open, I notice a funny thing:

For a few of the addresses, the output looks correct compared to the OEM remote (but apparently they do not match any address the deck responds to). A proper code looks something like this. There is a long start pulse, the 7 command bits (0x00), followed by 5 address bits (this is address 0x01):



However, for others, I get a bizarre output that looks nothing like SONY12. An example:



The effect is repeatable and seems to key on the device address. Addresses 1, 2, 3, 5, 6, 11, 12, produce correct output; the rest produce the bizarre output.

This occurs on both the Sony Combo (12/15/20) and Sony Combo (12/20) protocols as defined in RMIR. (The "Sony12/15" option only supports 2 device addresses; whereas I've encountered no less than 8 for the same deck.)

So... I don't quite know where to go from here. I suspect I am not inputting the address in the format RMIR expects. Some questions for the gurus:

What format does RMIR expect for the address/command in the Sony Combo protocols? I.e. does it expect canonical numeric (MSB-first) representation, or LSB-first as sent by the remote? Since the command portion (corresponding to the 'Device' byte in RMIR's upgrade editor 'Functions' tab) is only 5 bits, does it expect those bits left- or right-justified? Same goes for the command portion: I chose cmd=0x00 for test as it is pretty safe from these issues, but someday I will want more than 1 button to work Wink

Thanks in advance!
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Wed Aug 14, 2013 10:14 pm    Post subject: Reply with quote

why not start from the
Sony STR-D615 from our upgrades. This might help you.
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=5593

The second picture doesn't look to be Sony.
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
Drmn



Joined: 14 Aug 2013
Posts: 5

                    
PostPosted: Wed Aug 14, 2013 11:51 pm    Post subject: Reply with quote

Thanks! I wasn't sure I'd have better luck with random Sony files vs. trying all the known codes at random (which didn't work for me). I figured since I had the OEM remote, I could just suck known-good data from it and avoid the guesswork. I guess that was not quite true either Smile

I loaded the upgrade for the STR-D615 and... it works! Sort of. Now I can at least see the deck responding to codes from the remote! But... It turns out what I thought was an issue tied to the device address (i.e. the "weird codes" issue shown above) seems actually to be tied to something else, maybe specific buttons on the remote somehow. Even with this file and known-good device address (it's the same address for the 0..9 numeric buttons), the same thing: numeric buttons 1,2,3,5,6 work, and the rest produce a long gibberish IR pattern. (I didn't try the other buttons yet.)

I tried it on 2 different URC-1067 remotes, with the same result. Has anyone seen this before, or have insights on what could cause it?
Back to top
View user's profile Send private message Visit poster's website
Barf
Expert


Joined: 24 Oct 2008
Posts: 1415
Location: Munich, Germany

                    
PostPosted: Thu Aug 15, 2013 1:59 am    Post subject: Reply with quote

Please upload your lirc file to the diagnosic area, and I will have a look. Also tell which signals are "weird" and which are not.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Thu Aug 15, 2013 6:14 am    Post subject: Reply with quote

Drmn wrote:

I loaded the upgrade for the STR-D615 and... it works! Sort of. Now I can at least see the deck responding to codes from the remote! But... It turns out what I thought was an issue tied to the device address (i.e. the "weird codes" issue shown above) seems actually to be tied to something else, maybe specific buttons on the remote somehow. Even with this file and known-good device address (it's the same address for the 0..9 numeric buttons), the same thing: numeric buttons 1,2,3,5,6 work, and the rest produce a long gibberish IR pattern. (I didn't try the other buttons yet.)

I tried it on 2 different URC-1067 remotes, with the same result. Has anyone seen this before, or have insights on what could cause it?


I'm taking a wild leap here, but I think you may be selecting the wrong remote when you are doing some of your work. Although this shouldn't be an issue in RMIR, this is a problem that plagues me when I use RM and IR in concert.

Your Red OK Select button, requires you to select "Comcast DVR URC-1067BX3 JP1.3" from the remote list in RM/RMIR. Not Comcast URC-1067. Also, make sure your general tab in RMIR/IR doesn't have any punch through settings on your device. Cable punch through and volume punch through are not a problem.

If you are using an extender, make sure that the device selection macro is pointing at the correct device.

If you need more help, please post your files so we can take a look.
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Thu Aug 15, 2013 6:52 am    Post subject: Reply with quote

Quote:
I loaded the upgrade for the STR-D615 and... it works! Sort of. Now I can at least see the deck responding to codes from the remote! But... It turns out what I thought was an issue tied to the device address (i.e. the "weird codes" issue shown above) seems actually to be tied to something else, maybe specific buttons on the remote somehow. Even with this file and known-good device address (it's the same address for the 0..9 numeric buttons), the same thing: numeric buttons 1,2,3,5,6 work, and the rest produce a long gibberish IR pattern. (I didn't try the other buttons yet.

After thinking about it, I came up with a more likely reason for some of your keys sending odd signals. Old Keymoves! Make sure that any unused keymove has been removed, as these would certainly lead to the problem that you are seeing.

RMIR doesn't offer the summary that IR does, so its more difficult to see these conflicts, but definitely check this out.

And if you resolve this issue on your own, PLEASE post a followup to let us know what the problem was and how you resolved it.

If you need help, please post your files so we can take a look for ourselves.
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
Drmn



Joined: 14 Aug 2013
Posts: 5

                    
PostPosted: Sat Aug 17, 2013 2:48 pm    Post subject: Reply with quote

Thanks for the reply. Here is an updated version of the LIRC recorded codes from the remote, with the address codes hopefully fixed. (The remote sends some codes with different address bits depending on the last input selected.) They are prefixed with the corresponding input (function) selection.

http://www.hifi-remote.com/forums/dload.php?action=file&file_id=12026

At the end of this post I'll add the decoded version (displayed in proper endian order and split by address/cmd).

The remote is detected as "Comcast DVR URC-1067Bx3 JP1.3"
(Signature: 30393039)
(Processor: Samsung S3F8)
(Interface: JP1.3)

Volume punch-thrus were enabled for some devices. I tried disabling them all, but no change. (A couple of the "code lock" settings show enabled, if that matters.)

There were 3 keymoves showing in IR, which I believe came with the STR-D615 upgrade. They were:

Shift+Key85
Shift+Key117
ON_DEMAND

The remote was factory-fresh before I started. I tried deleting these and reuploading, but again, no change.

Is there anything else to try?

Here is the LIRC Sony12 decoder and output. It takes the code portion clipped from an LIRC file (the part between "begin codes" / "end codes"):

--- codeview.py ---

numbits = 12
buttons = []

with open("raw.txt", 'rt') as f:
for line in f:
#print line.split()
buttons.append(line.split())

for i in buttons:
i[1] = sum(1<<(numbits-1-b) for b in range(numbits) if int(i[1], 16)>>b&1)

buttons = sorted(buttons, key=lambda buttons: buttons[1])

for i in buttons:
print "name=%s, addr=0x%x, cmd=0x%x" % (i[0], (i[1] & 0xF80) >> 7, i[1] & 0x7f )

--- output ---

name=Video1-tv/video, addr=0x1, cmd=0x25
name=Video2-tv_video, addr=0x1, cmd=0x25
name=Video1-1, addr=0x2, cmd=0x0
name=Video1-2, addr=0x2, cmd=0x1
name=Video1-3, addr=0x2, cmd=0x2
name=Video1-4, addr=0x2, cmd=0x3
name=Video1-5, addr=0x2, cmd=0x4
name=Video1-6, addr=0x2, cmd=0x5
name=Video1-7, addr=0x2, cmd=0x6
name=Video1-8, addr=0x2, cmd=0x7
name=Video1-9, addr=0x2, cmd=0x8
name=Video1-0, addr=0x2, cmd=0x9
name=Video1-enter, addr=0x2, cmd=0xb
name=Video1-ch+, addr=0x2, cmd=0x10
name=Video1-ch-, addr=0x2, cmd=0x11
name=Video1-visual_power, addr=0x2, cmd=0x15
name=Video1-stop, addr=0x2, cmd=0x18
name=Video1-pause, addr=0x2, cmd=0x19
name=Video1-play_fwd, addr=0x2, cmd=0x1a
name=Video1-rew, addr=0x2, cmd=0x1b
name=Video1-ff, addr=0x2, cmd=0x1c
name=Video1-ant_tv/vtr, addr=0x2, cmd=0x2a
name=Video2-1, addr=0x6, cmd=0x0
name=Video2-2, addr=0x6, cmd=0x1
name=Video2-3, addr=0x6, cmd=0x2
name=Video2-4, addr=0x6, cmd=0x3
name=Video2-5, addr=0x6, cmd=0x4
name=Video2-6, addr=0x6, cmd=0x5
name=Video2-7, addr=0x6, cmd=0x6
name=Video2-8, addr=0x6, cmd=0x7
name=Video2-9, addr=0x6, cmd=0x8
name=Video2-0, addr=0x6, cmd=0x9
name=Video2-enter, addr=0x6, cmd=0xb
name=Video2-visual_power, addr=0x6, cmd=0x15
name=Video2-stop, addr=0x6, cmd=0x18
name=Video2-pause, addr=0x6, cmd=0x19
name=Video2-play_fwd, addr=0x6, cmd=0x1a
name=Video2-rew, addr=0x6, cmd=0x1b
name=Video2-ff, addr=0x6, cmd=0x1c
name=Video2-next, addr=0x6, cmd=0x34
name=Video2-prev, addr=0x6, cmd=0x35
name=Video2->10, addr=0x6, cmd=0x39
name=Function-system_off, addr=0x7, cmd=0x2f
name=Tuner-dbfb, addr=0xc, cmd=0x31
name=Tuner-surronoff, addr=0xc, cmd=0x3f
name=Tuner-rear+, addr=0xc, cmd=0x42
name=Tuner-rear-, addr=0xc, cmd=0x43
name=Tuner-delay, addr=0xc, cmd=0x44
name=Tuner-surmode, addr=0xc, cmd=0x46
name=Tuner-1, addr=0xd, cmd=0x0
name=Tuner-2, addr=0xd, cmd=0x1
name=Tuner-3, addr=0xd, cmd=0x2
name=Tuner-4, addr=0xd, cmd=0x3
name=Tuner-5, addr=0xd, cmd=0x4
name=Tuner-6, addr=0xd, cmd=0x5
name=Tuner-7, addr=0xd, cmd=0x6
name=Tuner-8, addr=0xd, cmd=0x7
name=Tuner-9, addr=0xd, cmd=0x8
name=Tuner-0, addr=0xd, cmd=0x9
name=Tuner-ch+, addr=0xd, cmd=0x10
name=Tuner-ch-, addr=0xd, cmd=0x11
name=Tuner-shift, addr=0xd, cmd=0x33
name=Tuner-vol+, addr=0x10, cmd=0x12
name=Tuner-muting, addr=0x10, cmd=0x14
name=Tuner-vol-, addr=0x10, cmd=0x14
name=Function-video2, addr=0x10, cmd=0x1e
name=Function-phono, addr=0x10, cmd=0x20
name=Function-tuner, addr=0x10, cmd=0x21
name=Function-video1, addr=0x10, cmd=0x22
name=Function-tape, addr=0x10, cmd=0x23
name=Function-cd, addr=0x10, cmd=0x25
name=Tape-play_fwd, addr=0x10, cmd=0x32
name=Tape-rew, addr=0x10, cmd=0x33
name=Tape-ff, addr=0x10, cmd=0x34
name=Tape-stop, addr=0x10, cmd=0x38
name=Tape-pause, addr=0x10, cmd=0x39
name=Function-dat, addr=0x10, cmd=0x46
name=CD-1, addr=0x11, cmd=0x0
name=CD-2, addr=0x11, cmd=0x1
name=CD-3, addr=0x11, cmd=0x2
name=CD-4, addr=0x11, cmd=0x3
name=CD-5, addr=0x11, cmd=0x4
name=CD-6, addr=0x11, cmd=0x5
name=CD-7, addr=0x11, cmd=0x6
name=CD-8, addr=0x11, cmd=0x7
name=CD-9, addr=0x11, cmd=0x8
name=CD-0, addr=0x11, cmd=0x20
name=CD->10, addr=0x11, cmd=0x27
name=CD-prev, addr=0x11, cmd=0x30
name=CD-next, addr=0x11, cmd=0x31
name=CD-play_fwd, addr=0x11, cmd=0x32
name=CD-rew, addr=0x11, cmd=0x33
name=CD-ff, addr=0x11, cmd=0x34
name=CD-stop, addr=0x11, cmd=0x38
name=CD-pause, addr=0x11, cmd=0x39
name=CD-d_skip, addr=0x11, cmd=0x3e
name=Tuner-t_tone, addr=0x12, cmd=0x4a
name=Tuner-center+, addr=0x12, cmd=0x54
name=Tuner-center-, addr=0x12, cmd=0x55
name=DAT-stop, addr=0x1c, cmd=0x38
name=DAT-pause, addr=0x1c, cmd=0x39
name=DAT-play_fwd, addr=0x1c, cmd=0x3a
name=DAT-rew, addr=0x1c, cmd=0x3b
name=DAT-ff, addr=0x1c, cmd=0x3c
name=DAT-prev, addr=0x1c, cmd=0x68
name=DAT-next, addr=0x1c, cmd=0x69
Back to top
View user's profile Send private message Visit poster's website
3FG
Expert


Joined: 19 May 2009
Posts: 3367

                    
PostPosted: Sun Aug 18, 2013 2:24 am    Post subject: Reply with quote

Most Sony codes are listed here, and you can use this list to clear up e.g. the confusion with the LIRC learns between tuner-muting and tuner-Vol-.

To make an upgrade for these signals, use the Sony 12/15/20 Combo executor. It can send all of these device numbers. If you're still having problems with the 1067BX3 sending incorrect signals, post your RMIR file here, and we can sort it out.
Back to top
View user's profile Send private message
Drmn



Joined: 14 Aug 2013
Posts: 5

                    
PostPosted: Sun Aug 18, 2013 1:14 pm    Post subject: Reply with quote

Here are the upgrade and RMIR files as written by RMIR.

http://www.hifi-remote.com/forums/dload.php?action=file&file_id=12027
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=12028

To hopefully make life simpler I cleared the Comcast preprogrammed devices to "Cable" code "0000" (no change to the bizarre behavior of course).

For anyone just tuning in, a brief summary of where I am right now: The device I want to control uses the SONY12 protocol, which comprises a 5-bit device address (there is a separate Sony-defined address for tuner, CDplayer, etc.) and a 7-bit command. The codes in the upgrade appear to be correct w.r.t. the device address and cmd, however, when I upload it to my remote, some buttons work correctly, but others generate a bizarre, unrecognizable IR stream.

I did some testing today and confirmed that the bizarre behavior is definitely tied to the *button*, and not the addess/cmd data entered (i.e. the 'Device' and 'OBC' fields of RMIR). For example, the 0 ~ 9 buttons on the remote all have the same address (device) and sequential cmd (OBC) code. The numeric buttons 1,2,3,5,6 produce correct output, the rest do something weird. If I swap the OBC codes around, the same *buttons* have the problem. Likewise if I leave the OBCs in correct order, but swap the Functions around in the 'Buttons' tab - the problem stays with the specific button on the remote.

I have 2 of the same model remote, and the problem occurs identically on both.

Could there be a bug in the .rdf/.map files for this particular remote?
Back to top
View user's profile Send private message Visit poster's website
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Sun Aug 18, 2013 3:09 pm    Post subject: Reply with quote

Really Cool problem.

Your remote is randomely shooting Zenith and Sony Codes.

At first I suspected a Remote Master problem, so I rebuilt your upgrade in KM and IR, but it still didn't work.

Then I thought there was a RDF problem in the protocols section, so I manually added the correct protocol. That didn't do it either.

Then I tried rebuilding it in Sony 20/12 protocol, that didn't work either....
Same random Zenith Codes.

So I suspect that you have stumbled on some Alternate Keyboard problem, that is not documented in the RDF. That would indicate that you started out with a File->New instead of a Download from the remote and somehow corrupted the setting in one of the undocumented bits of the ROM. Or it could be the RMIR doesn't like the Comcast 1067B.

I don't know how to fix the RDF, but I can start you off with a remote image that doesn't have the flag issue that is causing this bizare behavior.
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=12030



RDF exerts, 3FG or Binky or anyone else, what do you guys need from my 1067BX3 in order to fix an RDF?
_________________
Remember to provide feedback to let us know how the problem was solved and share your upgrades.

Tip: When creating an upgrade, always include ALL functions from the oem remote, even if you never plan on assigning them to a button. Complete function lists makes an upgrade more helpful to others.
Back to top
View user's profile Send private message Visit poster's website
3FG
Expert


Joined: 19 May 2009
Posts: 3367

                    
PostPosted: Sun Aug 18, 2013 6:37 pm    Post subject: Reply with quote

I've updated the RDF file to fix this problem, so File\New\RemoteImage will work.
Back to top
View user's profile Send private message
vickyg2003
Site Admin


Joined: 20 Mar 2004
Posts: 7073
Location: Florida

                    
PostPosted: Sun Aug 18, 2013 9:43 pm    Post subject: Reply with quote

3FG wrote:
I've updated the RDF file to fix this problem, so File\New\RemoteImage will work.


Thanks Dave.

I had a do-do-do-do moment there. In the early days of flash remotes, about 2006, we had this kind of problem surface about once a week. I haven't seen this kind of problem in almost 5 years. I thought all the popular flash remote RDF's had been corrected, but apparently not.

Thanks again for looking into this.
Back to top
View user's profile Send private message Visit poster's website
Drmn



Joined: 14 Aug 2013
Posts: 5

                    
PostPosted: Mon Aug 19, 2013 8:42 pm    Post subject: Reply with quote

Thanks, that worked!
I started over with a fresh config using File->New... and re-added the codes for the Sony device by hand... no more funky codes!

I had a couple lingering issues possibly related to the duplicated '0000' codes for the unused devices(?), and the type selected in the upgrade 'Device Type' setting, but after switching devices around a couple times it seems to have magically sorted itself. (At some point random buttons were punching through to non-selected device buttons, and I was somehow getting the TV and CABLE buttons lighting up simultaneously with every button press).

For some reason I can't assign anything to the 'A' (triangle/lock) button, unless I select something other than 'Cable' as the device type (regardless of the 'lock' settings in RMIR). Oddly, the button is apparently NOT defined for those devices' keymaps, and so generates a keymove (a * appears next to its name in the 'Buttons' tab) - this makes it work, somehow. This could totally be user error though - still a noob!

I added another Sony(20) DVD player and an Insignia TV set (uses NEC codes), and no further funkiness encountered. I'll post an upgrade with the learned codes from the DVD deck in a bit; I came across some codes that aren't in the list linked earlier or the upgrades for similar-sounding units.

Thanks again for all of your help!!
Back to top
View user's profile Send private message Visit poster's website
3FG
Expert


Joined: 19 May 2009
Posts: 3367

                    
PostPosted: Mon Aug 19, 2013 11:45 pm    Post subject: Reply with quote

Quote:
For some reason I can't assign anything to the 'A' (triangle/lock) button, unless I select something other than 'Cable' as the device type
You should be able to assign the A button for Cable device types, while other device types will generate a keymove.

But there's nothing to keep you from describing other device buttons as Cable type. For example, you can make the TV button a Cable type button, provided it is assigned an upgrade which is described as Cable type. The fact that the upgrade is shooting signals intended to control a TV won't bother the remote at all.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Software All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control