Sony Device Pairing Enabled

Posted on
Mon Jan 12, 2015 1:31 pm
RogueProeliator offline
User avatar
Posts: 2418
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Sony Device Pairing Enabled

After quite a bit of decompilation, reverse engineering, packet capturing and a few silent curses at Sony, I have some updated information for those who have tried the plugin to find that they cannot control their devices.

First off, the device against which the plugin was originally developed required NO authentication -- this applies mostly to 2013 and later models. Most likely those will work out-of-the-box so to speak once you enable remote control. However, some models produced (even today) require that you pair your device to the television in order to get access to network control. This is the "official" access method - same as Sony's TV SideView application uses, so it should be stable once established - and far better than the "spoofing" methods out there that did not work on many TV models. All that is to say that there are several other access/token methods out there and I don't know which models support which features or if all models support this, but have other options available. We shall see...

For those of you who found they could not control their televisions before, give this plugin "Release Candidate" a try. Once you device your device in Indigo, go to the Plugin's menu and under Sony Bravia Network Remote Plugin choose the "Pair to Device" option.

I can work with anyone individually that has issues or for which this doesn't work; several new features are built into the plugin to allow us to debug and figure out what will and won't work on your particular TV model. I have no real delusions that this will work on all models without some further tweaks -- but it should enable a MUCH larger range.

Thus far this has only been tested on TVs and one receiver (which didn't support this method for authentication). I am waiting to see if that user is able to get me some further details. However, if you have a receiver or Bluray for which this is not working, let me know and we can see if there is any way to add support (note this is MUCH easier if you have an Android device which can control your devices. Go Android! ;-))

Release Candidate Download

Adam

Posted on
Tue Jan 13, 2015 4:32 pm
rvarela offline
Posts: 81
Joined: Oct 16, 2012

Re: Sony Device Pairing Enabled

Hi Adam,

After installing the new plugin I obtained this when trying to pair. Debug was turned on at the highest level.
Thanks for your help,

Ramiro

-----------------------

13/01/2015 23:18:53
Sony Bravia Network Remote Plugin Debug set to True by user

13/01/2015 23:19:21
Sony Bravia Network Remote Plugin Debug Received an authentication command, attempting connection
Sony Bravia Network Remote Plugin Debug Sending Auth Request: {"id":13, "method":"actRegister", "version":"1.0", "params": [{"clientid":"DuncanwareRemote:34c43339-af3d-40e7-b1b2-743331375368c", "nickname":"DuncanwareRemote (IndigoPlugin)"}, [{"clientid":"DuncanwareRemote:34c43339-af3d-40e7-b1b2-743331375368c", "value":"yes", "nickname":"DuncanwareRemote (IndigoPlugin)", "function":"WOL"}]]}
Sony Bravia Network Remote Plugin Debug Response to Auth Request: [404] [('date', 'Tue, 13 Jan 2015 22:19:21 GMT'), ('content-length', '72')]

<html><head><title>not found</title></head><body>not found</body></html>
Sony Bravia Network Remote Plugin Error Error authenticating device: 335624086 - the plugin is not able to act as a remote until this is corrected; turn on debug for more details.
-----------------

Posted on
Tue Jan 13, 2015 5:02 pm
RogueProeliator offline
User avatar
Posts: 2418
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Device Pairing Enabled

It isn't finding your service - we need to identify where exactly we need to connect (could be a different URL or port). Try going to the menu option "Perform UPnP Search" (in the Plugins -> Sony Bravia Network Remote menu). This will produce and HTML report on your server.

Please capture that and we can go from there -- hopefully we can get a UPnP descriptor file for your device, which tells us the port and URL to use.

Adam

Posted on
Wed Jan 14, 2015 7:15 am
rvarela offline
Posts: 81
Joined: Oct 16, 2012

Re: Sony Device Pairing Enabled

Here are the results of the UPnP query: I thought that the Sony was on 10.0.1.26 (actually it was) but now I recall that I performed a sort IP in the fingscan plugin that maybe have altered this, since I only see a 10.0.1.27 (the .100 is the Synology). Should I maybe start to reconfigure the plugin IP before trying to pair the device again?

Thanks,

Ramiro

-----
RogueProeliator's RPFramework UPnP Discovery Report
Requesting Plugin:Sony Bravia Network Remote Plugin
Service Query:ssdp:all
Date Run:1421240730.37
Location:http://10.0.1.100:32469/DeviceDescription.xml
USN:uuid:2c081ef9-d355-a187-4e52-7a556691e654::urn:schemas-upnp-org:service:ConnectionManager:1
ST:urn:schemas-upnp-org:service:ConnectionManager:1
Cache Time:1800s
server:UPnP/1.0 DLNADOC/1.50 Platinum/1.0.4.11

date:Wed, 14 Jan 2015 13:05:30 GMT
Location:http://10.0.1.100:50001/desc/device.xml
USN:uuid:00113222-7ebd-0011-bd7e-bd7e22321100::urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1
ST:urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1
Cache Time:1900s
opt:"http://schemas.upnp.org/upnp/1/0/"; ns=01
x-user-agent:redsonic
server:Linux/3.2.40, UPnP/1.0, Portable SDK for UPnP devices/1.6.18
01-nls:ed311f50-1dd1-11b2-83c8-eb3fb51fedef

date:Wed, 14 Jan 2015 13:05:30 GMT
Location:http://10.0.1.27:80/description.xml
USN:uuid:2f402f80-da50-11e1-9b23-001788102020
ST:urn:schemas-upnp-org:device:basic:1
Cache Time:100s
server:FreeRTOS/6.0.5, UPnP/1.0, IpBridge/0.1

--------------

Posted on
Wed Jan 14, 2015 8:21 am
RogueProeliator offline
User avatar
Posts: 2418
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Device Pairing Enabled

Hmm, I don't see any Sony device on there broadcasting like they normally do when external control is turned on -- so far all of the Sony's that I've seen have an "x-av-physical-unit-info" header that displays the model number. SO, may need a bit more info - can you try clicking on the link associated with it in that report (the http://10.0.1.27:80/description.xml link).

SOMETHING was responding on 10.0.1.26 from your previous since you got a 404 response and not a timeout. You might also make sure the Sony unit is on, wait about 1 minute for it to fully power up and run the UPnP discovery report again to see if it will response with more info or on another IP address.

Adam

Posted on
Wed Jan 14, 2015 3:22 pm
rvarela offline
Posts: 81
Joined: Oct 16, 2012

Re: Sony Device Pairing Enabled

Hi Adam,

I'm sorry. I now found what was wrong. Please find the new output:
--------------
RogueProeliator's RPFramework UPnP Discovery Report
Requesting Plugin:Sony Bravia Network Remote Plugin
Service Query:ssdp:all
Date Run:1421270239.89
Location:http://10.0.1.26:52323/dmr.xml
USN:uuid:00000000-0000-1010-8000-00A096AED002::urn:schemas-sony-com:service:IRCC:1
ST:urn:schemas-sony-com:service:IRCC:1
Cache Time:1800s
x-av-physical-unit-info:pa="BRAVIA KDL-40EX721";
server:Linux/2.6 UPnP/1.0 KDL-40EX721/1.7
x-av-server-info:av=5.0; cn="Sony Corporation"; mn="BRAVIA KDL-40EX721"; mv="1.7";
Location:http://10.0.1.27:80/description.xml
USN:uuid:2f402f80-da50-11e1-9b23-001788102020
ST:urn:schemas-upnp-org:device:basic:1
Cache Time:100s
server:FreeRTOS/6.0.5, UPnP/1.0, IpBridge/0.1
Location:http://10.0.1.100:50001/desc/device.xml
USN:uuid:00113222-7ebd-0011-bd7e-bd7e22321100::urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1
ST:urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1
Cache Time:1900s
opt:"http://schemas.upnp.org/upnp/1/0/"; ns=01
x-user-agent:redsonic
server:Linux/3.2.40, UPnP/1.0, Portable SDK for UPnP devices/1.6.18
01-nls:ed311f50-1dd1-11b2-83c8-eb3fb51fedef
date:Wed, 14 Jan 2015 21:17:20 GMT
Location:http://10.0.1.100:32469/DeviceDescription.xml
USN:uuid:2c081ef9-d355-a187-4e52-7a556691e654::urn:schemas-upnp-org:service:ConnectionManager:1
ST:urn:schemas-upnp-org:service:ConnectionManager:1
Cache Time:1800s
server:UPnP/1.0 DLNADOC/1.50 Platinum/1.0.4.11
date:Wed, 14 Jan 2015 21:17:19 GMT
----

Posted on
Wed Jan 14, 2015 3:26 pm
rvarela offline
Posts: 81
Joined: Oct 16, 2012

Re: Sony Device Pairing Enabled

In case you also need it, clicking on the description link gives me:

1 0 urn:schemas-upnp-org:device:MediaRenderer:1 BRAVIA KDL-40EX721 Sony Corporation http://www.sony.net/ KDL-40EX721 uuid:00000000-0000-1010-8000-00A096AED002 DMR-1.50 image/png 32 32 24 /MediaRenderer_32x32.png image/png 48 48 24 /MediaRenderer_48x48.png image/png 60 60 24 /MediaRenderer_60x60.png image/png 120 120 24 /MediaRenderer_120x120.png image/jpeg 32 32 24 /MediaRenderer_32x32.jpg image/jpeg 48 48 24 /MediaRenderer_48x48.jpg image/jpeg 60 60 24 /MediaRenderer_60x60.jpg image/jpeg 120 120 24 /MediaRenderer_120x120.jpg urn:schemas-upnp-org:service:RenderingControl:1 urn:upnp-org:serviceId:RenderingControl /RenderingControlSCPD.xml /upnp/control/RenderingControl /upnp/event/RenderingControl urn:schemas-upnp-org:service:ConnectionManager:1 urn:upnp-org:serviceId:ConnectionManager /ConnectionManagerSCPD.xml /upnp/control/ConnectionManager /upnp/event/ConnectionManager urn:schemas-upnp-org:service:AVTransport:1 urn:upnp-org:serviceId:AVTransport /AVTransportSCPD.xml /upnp/control/AVTransport /upnp/event/AVTransport urn:schemas-sony-com:service:IRCC:1 urn:schemas-sony-com:serviceId:IRCC http://10.0.1.26:80/IRCC/IRCCSCPD.xml http://10.0.1.26:80/IRCC 64 1.1 AAAAAQAAAAEAAAAVAw== AAAAAQAAAAEAAAAuAw== AAAAAQAAAAEAAAAvAw== MS_DigitalMediaDeviceClass_DMR_V001 MediaDevices VEN_0033&DEV_0006&REV_01 Display.TV Multimedia.DMR 1.0 AAEAAAAB AAIAAACX AAIAAAAa AAIAAACk 1.2 http://10.0.1.26:80/cers/ActionList.xml 1.0 http://10.0.1.26:80/s2mtv

Thanks,

Ramiro

Posted on
Wed Jan 14, 2015 5:09 pm
RogueProeliator offline
User avatar
Posts: 2418
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Device Pairing Enabled

The forum software strips out most of the XML formatting for security reasons... would you mind sending me the documents via email? adam.d.ashe at gmail.com. For best information, include the UPnP report, and the description you sent (from http://10.0.1.26:52323/dmr.xml).

You can take a wild shot and change your Port in the device settings to 52323 and see if it works without pairing. Changing the port should reload the device, but maybe be doubly-sure and restart the plugin after saving the device dialog. Then just try sending a command via action and see what result you get (no pairing).

Adam

Posted on
Thu Jan 15, 2015 4:32 pm
rvarela offline
Posts: 81
Joined: Oct 16, 2012

Re: Sony Device Pairing Enabled

Just sent the files via email. Thanks again,

Ramiro

Posted on
Thu Jan 15, 2015 10:32 pm
RogueProeliator offline
User avatar
Posts: 2418
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Device Pairing Enabled

Got it, thank you... Looking at those files, It looks like your device is using a different path for the web service -- I have added a property to the device which allow customizing this as well as have it reading that value when you select it from the list and choose Use Selected Device.

Go ahead and download and install the latest release candidate. Once you have that in place, edit your Indigo device -- if it is found in the UPnP search, choose it and click the Use Selected Device button. If NOT then edit the Path to read /IRCC (the default is /sony/IRCC). Save that and then give the control a try with a normal key -- such as volume or channel up/down.

NOTE: Make sure the physical device is turned on before you edit the Indigo device... also make sure you turn on debugging before attempting to send the commands. If it doesn't work, post the debug logs for me to look at.

Adam

Posted on
Fri Jan 16, 2015 12:46 pm
rvarela offline
Posts: 81
Joined: Oct 16, 2012

Re: Sony Device Pairing Enabled

Hi Adam,
Yeah!! I'm glad to tell you that now it is working, at least the few channel UP/Down and Volume commands I tried. :lol: Please tell me whether you want me to do some more research here. From my side, I will continue to try some more commands and keep you updated. Many, many thanks for your interest, work and empathy on my particular case.

Ramiro

Posted on
Fri Jan 16, 2015 1:50 pm
RogueProeliator offline
User avatar
Posts: 2418
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Device Pairing Enabled

Yeah!! I'm glad to tell you that now it is working, at least the few channel UP/Down and Volume commands I tried. :lol: Please tell me whether you want me to do some more research here. From my side, I will continue to try some more commands and keep you updated. Many, many thanks for your interest, work and empathy on my particular case.

No problem, glad we got it working - that may enable some others to utilize the plugin as well. Now that we are this far along, yours did not take all that much time to debug, so hopefully others will be encouraged to give it a try as well.

Let me know if you are missing and commands or something doesn't work that DOES work on the SideView app and we can look into it.

Adam

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest