|
JP1 Remotes
|
View previous topic :: View next topic |
Author |
Message |
The Robman Site Owner
Joined: 01 Aug 2003 Posts: 21244 Location: Chicago, IL |
Posted: Tue Aug 09, 2005 12:51 pm Post subject: Adding Slingbox support to RM |
|
|
First, the background....
I've been messing with my new Slingbox and have been creating upgrades for it. To do this, I've been using RM with a fake RDF that I created.
Once the upgrade is created, I then use a spreadsheet that I wrote called UPGRADE-to-BIN.xls to format the data ready to be converted back to binary. (Just FYI, I'm using the binconvert program to convert the binary files to text, and vice versa).
So, how much work do you think it would be for RM to be able to import a Slingbox binary file as an upgrade so the user could edit it? Then, once the new upgrade has been formatted, would it be possible for the user to be able to export the upgrade as a pre-formatted binary file?
There's another twist though, there are 2 formats for the binary files, the "PL" version is encrypted whereas the "JU" version is not.
The format of the upgrade files is explained here, along with details of the encryption used in the "PL" files:
http://www.hifi-remote.com/forums/viewtopic.php?t=4899
You can download a bunch of these binary files from here:
http://www.hifi-remote.com/forums/dload.php?action=file&file_id=2036
Just FYI, I haven't determined which protocols are built into the Slingbox's UEI chip yet, so the [Protocols] section of the fake RDF that I created is still blank.
The Slingbox is still a very new product, but I can see it gaining popularity quite quickly, so it would be cool to be able to offer JP1 functionality to the Slingbox users as I know some of them are frustrated by the "remote control" functionality offered, as they don't have the ability to program keymoves or anything like that, so if a button is missing, or incorrectly programmed, they are SOL. _________________ Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Last edited by The Robman on Sat Aug 27, 2005 9:23 am; edited 1 time in total |
|
Back to top |
|
|
Capn Trips Expert
Joined: 03 Oct 2003 Posts: 3990
|
Posted: Wed Aug 10, 2005 12:44 am Post subject: |
|
|
In case anybody's interested as to what this cool gadget does, here's a cNet review (including a short video clip) of Slingbox.
I think it's even MORE cool (not mentioned in the review) that the Slingbox's IR blaster turns out to be a UEI JP1 remote! (and that needless to say, our very own Rob is all over hacking it .) |
|
Back to top |
|
|
gfb107 Expert
Joined: 03 Aug 2003 Posts: 3411 Location: Cary, NC |
Posted: Wed Aug 10, 2005 12:23 pm Post subject: |
|
|
Rob.
Let's take this a step at a time. Since I've already added code for importing raw upgrades, importing these files shouldn't be too hard. I can start with that. I can have something ready later today.
I noticed in the other thread that you've proviced a formula for encrypting, but not one for decrypting. Have you workd one out? _________________ -- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST) |
|
Back to top |
|
|
The Robman Site Owner
Joined: 01 Aug 2003 Posts: 21244 Location: Chicago, IL |
Posted: Wed Aug 10, 2005 3:30 pm Post subject: |
|
|
Sure, I can convert both ways. Using Excel, to go from JU to PL you would use the following formulae:
cell A2: contains the JU hex code
cell B2: =HEX2BIN(A2,8)
cell C2: =DEC2HEX(MOD((BIN2DEC(MID(B2,7,2)&MID(B2,1,6))+111)+(MID(B2,1,1)*MID(B2,8,1)*128),256),2)
(where cell C2 contains the result)
Then to convert the PL code back to a JU code, you would use the following formulae:
cell C2: contains the PL hex code
cell E2: =DEC2BIN(MOD(HEX2DEC(C2)+145,256),8)
cell F2: =DEC2BIN(MOD(BIN2DEC(E2)+(MID($E2,2,1)*MID($E2,3,1)*128),256),8)
cell G2: =BIN2HEX(MID($F2,3,6)&MID($F2,1,2),2)
(where cell G2 contains the result) _________________ Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help! |
|
Back to top |
|
|
gfb107 Expert
Joined: 03 Aug 2003 Posts: 3411 Location: Cary, NC |
Posted: Thu Aug 11, 2005 9:14 am Post subject: |
|
|
OK, Rob.
I've put up a test version of RemoteMaster.jar.
Under the advanced menu, there is an "Import Binary Upgrade..." item. It displays a File Open Dialog, allowing you to select the Binary upgrade you want to import. There are three allowed file types:- All binary upgrade files (*.bin)
- Unencrypted binary files (*_ju.bin)
- Encrytped binary upgrade files (*_pl.bin)
Note that it will use the currently selected remote when importing a binary upgrade, since the binary upgrade doesn't specify what remote it is for.
BTW, the fact that these binary upgrade files can include both the device upgrade and the protocol upgrade, got me thinking about how RM/KM and IR work together. One of the little things beginners sometimes get stuck on is that they forget to add the protocol upgrade along with the device upgrade. It occurs to me that we could maybe cut down on these problems if the protocol upgrade were included with the device upgrade, in much the same way that we currently bundle keymoves with the device upgrade. This would allow the user to transfer everything to IR in one step.
We could have something like: Code: | Upgrade code 0 = ac 98 (Tuner/1176) Yamaha 122 (RM v1.32)
41 00 d8 08 05 a1 5e ff 00 00 00
00 6c 00 d5 00 0f 00 7c 00 fc 00 37 00 97 00 55
00 57 00 ec 00 a7 00 27 00 c7 00 47 00 17 00 d7
00 e7
KeyMoves
30 f4 a4 98 00 15«sleep toggle»
Upgrade protocol 0 = 01 41 (S3C80) NEC1 2DEV Combo (RM v1.32)
43 8b 22 8b 12 cf 44 08 08 01 18 01 06 01 18 03
39 d2 dc 11 94 08 b6 20 01 76 05 80 eb 08 e6 04
fe e6 05 f1 8b 06 e6 04 be e6 05 b1 e4 06 07 60
07 20 10 46 29 0d 8d 01 49
End |
Thoughts? _________________ -- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST) |
|
Back to top |
|
|
Mark Pierson Expert
Joined: 03 Aug 2003 Posts: 3017 Location: Connecticut, USA |
Posted: Thu Aug 11, 2005 9:34 am Post subject: |
|
|
gfb107 wrote: | It occurs to me that we could maybe cut down on these problems if the protocol upgrade were included with the device upgrade, in much the same way that we currently bundle keymoves with the device upgrade. This would allow the user to transfer everything to IR in one step. | I actually suggested this to Mark Pauker back when we were working on the combined Key Moves. He said that IR would require some significant modifications to allow for the inclusion of protocol upgrade code in the same data block, so we let it die. _________________ Mark |
|
Back to top |
|
|
gfb107 Expert
Joined: 03 Aug 2003 Posts: 3411 Location: Cary, NC |
Posted: Thu Aug 11, 2005 9:53 am Post subject: |
|
|
Mark Pierson wrote: | I actually suggested this to Mark Pauker back when we were working on the combined Key Moves. He said that IR would require some significant modifications to allow for the inclusion of protocol upgrade code in the same data block, so we let it die. |
Oh, OK. Maybe this will get better when (if) RM expands to handle all IR functionality. _________________ -- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST) |
|
Back to top |
|
|
The Robman Site Owner
Joined: 01 Aug 2003 Posts: 21244 Location: Chicago, IL |
Posted: Thu Aug 11, 2005 10:01 am Post subject: |
|
|
Thanks Greg, I will try this as soon as I get home. Regarding the selected remote, I hate hard-coding, but since the Slingbox is the only "remote" that uses these binary files (at this time, at least) is there anyway to force RM to select the Slingbox RDF? Of course, if we discover other devices that have similar UEI chips on board (and therefore use similar binary files) we would need to come up with something morre elaborate down the road.
Regarding the protocol upgrades, I do see your point and pretty much agree with it, though if IR were to be modified to support this feature, it would also have to handle the fact that the protocol may already be installed.
My long term vision is to have one integrated application that will handle all the functionality of KM, RM and IR, so if and when that is ever realized, this will become a moot point. _________________ Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help! |
|
Back to top |
|
|
gfb107 Expert
Joined: 03 Aug 2003 Posts: 3411 Location: Cary, NC |
Posted: Thu Aug 11, 2005 10:51 am Post subject: |
|
|
The Robman wrote: | Regarding the selected remote, I hate hard-coding, but since the Slingbox is the only "remote" that uses these binary files (at this time, at least) is there anyway to force RM to select the Slingbox RDF? |
It would not be difficult to hard-code this. Probably not even 5 lines of code.
Quote: | Of course, if we discover other devices that have similar UEI chips on board (and therefore use similar binary files) we would need to come up with something more elaborate down the road. |
It seems reasonable to me that the user should select the correct remote before importing the binary upgrade. If, however, you really think that we need something more elaborate, I have an idea that might work and be reasonable easy to code.
What I'm thinking about doing is merging the binary import and raw import into a single dialog. I would add a "Load binary file" button to the current raw import dialog, which would simply fill in the fields from the file. The raw import dialog already has a drop down box for selecting the remote. _________________ -- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST) |
|
Back to top |
|
|
Mark Pierson Expert
Joined: 03 Aug 2003 Posts: 3017 Location: Connecticut, USA |
Posted: Thu Aug 11, 2005 11:52 am Post subject: |
|
|
The Robman wrote: | Regarding the selected remote, I hate hard-coding, but since the Slingbox is the only "remote" that uses these binary files (at this time, at least) is there anyway to force RM to select the Slingbox RDF? Of course, if we discover other devices that have similar UEI chips on board (and therefore use similar binary files) we would need to come up with something morre elaborate down the road. | Sounds like a new RDF entry might be best. It could be something in the General section like "UseBinary=Yes|No". _________________ Mark |
|
Back to top |
|
|
The Robman Site Owner
Joined: 01 Aug 2003 Posts: 21244 Location: Chicago, IL |
Posted: Thu Aug 11, 2005 1:14 pm Post subject: |
|
|
gfb107 wrote: | It seems reasonable to me that the user should select the correct remote before importing the binary upgrade. If, however, you really think that we need something more elaborate, I have an idea that might work and be reasonable easy to code. |
I'm concerned about how RM would import the code if anything other than the Slingbox remote was selected. There will be way too many button codes than there are buttons to associate them with if any other remote was selected.
In the short term, I am going to be the only user, so it's no problem for me to pre-select the Slingbox remote, but once we open this up to Slingbox users, I'd like to have something in place where the Slingbox RDF is automatically selected. _________________ Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help! |
|
Back to top |
|
|
gfb107 Expert
Joined: 03 Aug 2003 Posts: 3411 Location: Cary, NC |
Posted: Thu Aug 11, 2005 2:00 pm Post subject: |
|
|
The Robman wrote: | I'm concerned about how RM would import the code if anything other than the Slingbox remote was selected. There will be way too many button codes than there are buttons to associate them with if any other remote was selected. | Of course the upgrade will be imported incorrectly (meaning functions will have the wrong names, and be assigned to the wrong keys, and some functions and buttons won't be imported), but it won't cause any serious problems.
RM retrieves the keymap from the remote definition based on the device type index. The it uses that keymap definition to parse the bitmap and builds a list of keys from that keymap are present in the upgrade, in order. RM determins where the bitmap ends by looking for a byte with the right-most bit cleared. That means that if the bitmap is too long for the keymap, RM won't use part of the bitmap for the hex cmds.
Then it cycles through that list of keys. For each key, it- creates a function with the same name as the key.
- Sets the hex command ( using the size of the hex cmd from the protocol)
- Assigns the new function to the key
As soon as it reaches the end of the key list, it stops, even if there are more commands in the upgrade. _________________ -- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST) |
|
Back to top |
|
|
The Robman Site Owner
Joined: 01 Aug 2003 Posts: 21244 Location: Chicago, IL |
Posted: Thu Aug 11, 2005 2:27 pm Post subject: |
|
|
But would I be right in saying that if the user just happens to have the wrong remote selected when they import the binary file, selecting the right remote after the fact won't do them any good?
I've just had a thought. Maybe the "JU" and "PL" tags are unique to Slingbox? So, if we come across some other device that has a chip similar to the Slingbox's chip installed, maybe their binary files would have a different tag in their names?
With that in mind, what would it take to have RM use the tag to select the RDF? Maybe we could add an entry into the RDF that would tie the RDF to the right tag. _________________ Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help! |
|
Back to top |
|
|
gfb107 Expert
Joined: 03 Aug 2003 Posts: 3411 Location: Cary, NC |
|
Back to top |
|
|
The Robman Site Owner
Joined: 01 Aug 2003 Posts: 21244 Location: Chicago, IL |
Posted: Thu Aug 11, 2005 3:03 pm Post subject: |
|
|
I have a message into UEI asking them about the JU/PL tags, but I'm totally OK with hard coding this for now, it's certainly better than risking having the wrong remote selected.
I don't recall what the format of WAV files is, but it's probably similar. _________________ Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help! |
|
Back to top |
|
|
|
|
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
|