Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to Virgin Media TiVo (even with v15) #16

Closed
swythan opened this issue Jun 8, 2012 · 10 comments
Closed

Unable to connect to Virgin Media TiVo (even with v15) #16

swythan opened this issue Jun 8, 2012 · 10 comments

Comments

@swythan
Copy link

swythan commented Jun 8, 2012

Virgin Media (in the UK) updated their firmware in January 2012 and made it difficult to connect to MindRPC. I was hopeful that your changes for #15 would make TiVo Commander work again, but apparently it doesn't.

I can confirm that the latest version (v0p8t) of kmttg DOES work.

I also used the cert & password from kmttg in my prototype Windows Phone 7 app, and got it working, too. That's using the C# version of BouncyCastle, and I did have to make a change to the sources to ignore a failure to validate the KeyUsage settings on the server certificate.

@arantius
Copy link
Owner

arantius commented Jun 8, 2012

As always, I don't have a Virgin Media device, so I can't test any fix, nor diagnose why anything isn't working.

@swythan
Copy link
Author

swythan commented Jun 8, 2012

I do realise you've got no access to a Virgin Media TiVo. I can do some limited debugging for you if you like, but I don't normally run Android any more and I've no real familiarity with Java, android development or crypto.

With a bit of luck we'll be able to recruit someone more "invested" in getting this working on Android from the Virgin Media forums in the UK.

@swythan
Copy link
Author

swythan commented Jun 10, 2012

FYI: Reports on Virgin Media's forums are mixed. It does seem to work for several people.

Perhaps the difference is the SSL implementation on the handset.

I've grabbed the source and I'm going to try & debug on my old Android handset.

@swythan
Copy link
Author

swythan commented Jun 11, 2012

I think the problem might be Android Issue #26542.

The TiVo client cert does appear to have involve a chain of authority (AFAICT; I'm no expert). All but one of the success reports on the above forum mention that they're running 2.3 or above, and I wouldn't be surprised if the one that mentions 2.2 is mistaken.

Have you had any reports of TiVo Commander failing on Android 2.2 or below?

@arantius
Copy link
Owner

Nothing besides this and #15 since that time frame.

@swythan
Copy link
Author

swythan commented Jun 11, 2012

Interesting. Having seen the failure I would have expected it to fail on a Premiere XL in the same way (on a <2.3 handset). Maybe everyone interested enough bother downloading and installing (within the last 14 days) has 2.3+. :-)

BTW: I'm an idiot. Here's the actual exception that I get:

02-17 03:30:29.207: E/NativeCrypto(3815): Unknown error 1 during connect
02-17 03:30:41.457: E/tivo_commander(3815): connect: io exception!
02-17 03:30:41.457: E/tivo_commander(3815): java.io.IOException: SSL handshake failure: Failure in SSL library, usually a protocol error
02-17 03:30:41.457: E/tivo_commander(3815): error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert bad certificate (external/openssl/ssl/s3_pkt.c:1139 0x23b9c8:0x00000003)
02-17 03:30:41.457: E/tivo_commander(3815):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativeconnect(Native Method)
02-17 03:30:41.457: E/tivo_commander(3815):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:316)
02-17 03:30:41.457: E/tivo_commander(3815):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.<init>(OpenSSLSocketImpl.java:520)
02-17 03:30:41.457: E/tivo_commander(3815):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:461)
02-17 03:30:41.457: E/tivo_commander(3815):     at com.arantius.tivocommander.rpc.MindRpc$3.call(MindRpc.java:295)
02-17 03:30:41.457: E/tivo_commander(3815):     at com.arantius.tivocommander.rpc.MindRpc$3.call(MindRpc.java:1)
02-17 03:30:41.457: E/tivo_commander(3815):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
02-17 03:30:41.457: E/tivo_commander(3815):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
02-17 03:30:41.457: E/tivo_commander(3815):     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:114)
02-17 03:30:41.457: E/tivo_commander(3815):     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:229)
02-17 03:30:41.457: E/tivo_commander(3815):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
02-17 03:30:41.457: E/tivo_commander(3815):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
02-17 03:30:41.457: E/tivo_commander(3815):     at java.lang.Thread.run(Thread.java:1096)

I'm going to see if I can manage to get BouncyCastle (well, SpongyCastle) working, instead.

@billytaylor
Copy link

Is this still an issue? Might it just be requiring an updated client cert? Someone might be able to help with that... :-)

@arantius
Copy link
Owner

I still have no idea because I'm in the US. If you have a Virgin Media TiVo and are willing and able to grant me access to it, contact me directly and I can try to spend some time figuring out what the problem is exactly.

@arantius
Copy link
Owner

@billytaylor gave me a port forward to attempt connecting. All I can get unfortunately is a single error:

{"code": "routingError", "text": "The active partner ID does not have access to the operation.", "type": "error"}

I can't act on that directly.

@arantius
Copy link
Owner

Unfortunately, closing this as WONTFIX. This is up to TiVo and/or Virgin Media. It's out of my control to affect this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants