The Source for Java Technology Collaboration

Home » java.net Forums » Mobile & Embedded » Blu-ray Disc Java

Thread: Network connection issues - again

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 23 - Last Post: Mar 30, 2009 12:56 PM by: mozste Threads: [ Previous | Next ]
vinaykagarwal

Posts: 122
Network connection issues - again
Posted: Jan 30, 2009 11:04 AM
  Click to reply to this thread Reply

Sorry to bring this topic up again. I am missing some magic needed to make the network connection work. The code below works just fine with TMT but it generates the following exception on Panasonic DMP BD-35K
access denied(java.net.SocketPermission www.google.com resolve)
This player has network permission to all setting and can access BD Live content in movies just fine. This code is signed using the NetBeans' built-in/trusted keystore. Also, the latest binary version of Bridgehead does not run (stop within seconds of playing) on this player either. My question are - thanks in advance.

1. Could it be that the code is not "properly" signed for this player?
2. Is there any working network access sample that I can try?

==== PRF ======
<?xml version="1.0" encoding="UTF-8"?>
<n:permissionrequestfile xmlns:n="urn:BDA:bdmv;PRF" orgid="56789abc" appid="00004001">
<file value="true"></file>
<applifecyclecontrol value="true"></applifecyclecontrol>
<servicesel value="true"></servicesel>
<userpreferences read="true" write="false"></userpreferences>
<bd-bindingunitarea value="true"></bd-bindingunitarea>
<bd-vfs value="true"></bd-vfs>
<network>
<host action="connect,listen,resolve,accept">*</host>
</network>
</n:permissionrequestfile>

==== Code ======
package netconnect;
import java.awt.*;
import java.io.*;
import java.net.*;
import javax.tv.xlet.*;
import org.havi.ui.*;

public class Main implements Xlet {
private static Font font;
private HScene scene;
private static HListGroup list;
HttpURLConnection server;

public void initXlet(XletContext context) throws XletStateChangeException {
try {
font = new Font(null, Font.PLAIN, 24);
scene = HSceneFactory.getInstance().getDefaultHScene();
list = new HListGroup(null, 40, 40, 1860, 1000);
list.setForeground(Color.white);
list.setTextLayoutManager(new HDefaultTextLayoutManager());
list.setFont(font);
list.setBordersEnabled(false);
list.setHorizontalAlignment(HVisible.HALIGN_LEFT);
list.setVerticalAlignment(HVisible.VALIGN_TOP);
scene.add(list);
scene.validate();
println("###########################");

InputStream in;
try {
URL url = new URL("http://www.google.com/");
server = (HttpURLConnection) url.openConnection();
server.setDoInput(true);
server.setDoOutput(true);
server.setRequestMethod("GET");
server.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
server.connect();
in = server.getInputStream();
byte readb[] = new byte[1000000];
int len = 0;
int pos = 0;
while (len != -1) {
len = in.read(readb, pos, 1000);
pos += len;
println("Number of bytes read: " + len);
}
println("Total number of bytes read: " + pos);
} catch (Exception e) {
println(e.getMessage());
}
server.disconnect();
} catch (Exception e) {
println(e.getMessage());
}
}

public static void println(String text) {
System.out.println(text);
if (list != null) {
list.addItem(new HListElement(text), 0);
}
}

public void startXlet() throws XletStateChangeException {
scene.setVisible(true);
}
public void pauseXlet() {
scene.setVisible(false);
}
public void destroyXlet(boolean unconditional)
throws XletStateChangeException {
scene = null;
}
}

Bill Foote
Re: [BD-J-DEV] Network connection issues - again
Posted: Jan 30, 2009 11:49 AM   in response to: vinaykagarwal
  Click to reply to this thread Reply

bd-j-dev@mobileandembedded.org wrote:

> 2. Is there any working network access sample that I can try?


Funny you should ask...

The cookbook "bookmenu" project has a bonus feature that
downloads an image from somewhere off of http://hdcookbook.com ,
but knowing whether it's working or not can be a little
subtle (by design - long story).

However, I happen to have thrown together a Twitter reader
demo just the other day. The source will be put back to
the cookbook repository soon (in xlets/demos/twitterGRIN), and
the standard thing of creating user.vars.properties and calling
"ant" will build it. But, no need to wait... I just stuck compiled
images for Grinview and of the xlet on dropbox:

http://dl.getdropbox.com/u/542958/TwitterGRIN-discimage.zip
http://dl.getdropbox.com/u/542958/TwitterGRIN-grinview.jar

Let me know if it works or not on the Panasonic player. The
only BD-Live player I have handy is the PS/3, and confirmation
that everything's halal/kosher on other BD-Live players would be nice.

Cheers,

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net


vinaykagarwal

Posts: 122
Re: [BD-J-DEV] Network connection issues - again
Posted: Jan 30, 2009 12:05 PM   in response to: Bill Foote
  Click to reply to this thread Reply

Bill - it works! Can I have the code so that I can work on it through the weekend?

Bill Foote
Re: [BD-J-DEV] Network connection issues - again
Posted: Jan 30, 2009 12:16 PM   in response to: vinaykagarwal
  Click to reply to this thread Reply

bd-j-dev@mobileandembedded.org wrote:
> Bill - it works! Can I have the code so that I can work on it through the weekend?


Wow, that was quick! Out of curiousity, where are you?

Anyway, it'll be out on the repository as soon as I hear
back on the code review, but for now you can grab it from
http://dl.getdropbox.com/u/542958/twitterGRIN-src.zip

Cheers,

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net


vinaykagarwal

Posts: 122
Re: [BD-J-DEV] Network connection issues - again
Posted: Jan 30, 2009 12:20 PM   in response to: Bill Foote
  Click to reply to this thread Reply

I am in California - Cupertino to be precise.

vinaykagarwal

Posts: 122
Re: [BD-J-DEV] Network connection issues - again
Posted: Jan 30, 2009 1:27 PM   in response to: Bill Foote
  Click to reply to this thread Reply

Bill - I was able to build it successfully and my built version runs fine. Thanks again.

gjparson

Posts: 7
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 24, 2009 4:46 PM   in response to: Bill Foote
  Click to reply to this thread Reply

The Dropbox link is no longer valid. Is there another location to go to for this source code? Thanks.

billf

Posts: 107
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 24, 2009 4:51 PM   in response to: gjparson
  Click to reply to this thread Reply

Yes, as noted above, in the cookbook repository, under xlets/demos/twitterGRIN.

gjparson

Posts: 7
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 25, 2009 7:46 PM   in response to: billf
  Click to reply to this thread Reply

I have a PRF and test case virtually identical to the one submitted by vinaykagarwal, but I could not find anything in the TwitterGRIN source code that helped me to obtain a network connection.

My BD-Live app runs fine on my pc running TMT, but throws a socket permission exception on my Samsung BD-P1500 player that's cable connected to the Internet and to a Samsung HDTV. I have run player updates via the Internet with this hardware configuration, and the player itself is set to "Allow All" BD-Live content. So there doesn't appear to be any problem with the hardware setup.

I have researched this issue in your book and in various project, conference and online documents and even source code files. I have created a grantor keystore and used the BDCredentialSigner tool to sign the PRF, but so far nothing has worked. Accessing publicly available Web documents would seem to be a trivial task, but with the many BD-J security restrictions it has been a showstopper for me, and perhaps for a few others out there.

Is it possible then, to outline, in a simple, step-by-step fashion how one goes about signing the PRF and integrating it into the overall application, particularly the jars, so that network connectivity can be achieved? I think that would be most helpful.

Thanks in advance.

billf

Posts: 107
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 25, 2009 8:57 PM   in response to: gjparson
  Click to reply to this thread Reply

What happens when you run the twitterGRIN disc image? Does it successfully connect out through the network? Here, I'll save you building it - there's a disc image temporarily at http://dl.getdropbox.com/u/542958/TwitterGRIN-discimage.zip

gjparson

Posts: 7
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 26, 2009 2:33 PM   in response to: billf
  Click to reply to this thread Reply

Your Twitter app runs ok with TMT on my pc. However, you get the same or equivalent error when I try to run it on my Samsung BD-P1500 Blu-ray player. Your debug messages run off screen, but here is what I have been able to piece together:

*** Twitter message fails to load: com.sugree.twitter.TwitterException: request java.lang.RuntimeException: java.security.AccessControlException: access denied (java.net.SocketPermission twitter.com resolve)

As your scene keeps refreshing, this same error appears multiple times, and no Twitter messages or images are displayed.

I checked your PRF, and it was unsigned. Isn't it supposed to be?

I also checked the network settings on my Samsung player, as follows:

(1) TCP/IP: DHCP=On, DNS=Automatic
(2) Proxy: Proxy=Off, Port=8080
(3) NTP Server: Off
(4) MAC Address:
(5) BD-LIVE Internet Connection: Allow(All)

which looks ok.

This Samsung model is Profile 2.0 via a firmware update, so maybe there is a problem there. I'll check.

billf

Posts: 107
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 26, 2009 2:57 PM   in response to: gjparson
  Click to reply to this thread Reply

Hmmm, this is odd. We have run disc images built through this process through various verifiers before, though not this particular xlet. Still, my first suspicion doesn't fall on the disc image.

Maybe it's system configuration on the Samsung? I know you said "Allow(All)", but are there any other permission-related settings, anywhere in the setup menu at all? For xlets that aren't signed with an official BDA certificate, the player is required to be settable into a mode where the disc will play and the permissions will be granted, but that's not to say that the option to put it in that mode is easy to find.

Why do you say the PRF isn't signed? I looked inside MANIFEST.MF, and saw this:
Name: bluray.TwitterXlet.perm
SHA1-Digest: jy0GCLS0RJD7g93/+Vwv6Fm7huo=

About the debug messages going off the screen - when the debug screen is up, use the arrow keys, or the number keys, as described at the top of the screen.

Anyway, after you check the firmware, and check the setup screens thoroughly, let us know - if there's still a problem, I can do some more checking, including with Samsung directly.

Cheers,

Bill

sunayo

Posts: 2
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 27, 2009 12:50 AM   in response to: billf
  Click to reply to this thread Reply

I have exactly the same problem with the same player. My own network tests fail as well as the Twitter demo. Must be something specific to this player or? I think I have gone through all menu options in search of anything useful, but I could take another look.

gunnar_adler

Posts: 2
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 27, 2009 1:27 AM   in response to: sunayo
  Click to reply to this thread Reply

Samsung might not allow network access in general from unencrypted or BD-R(E) discs.
Does anyone get networking on Samsung players with other than replicated discs at all?

Joe Rice
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 27, 2009 1:27 AM   in response to: sunayo
  Click to reply to this thread Reply

In our experience, some Samsung models disallow network connections
when content is run from BD-R, although this may also be firmware-
dependent. Latest Samsung FW is at: http://pages.samsung.com/us/bluraysupport/support.html

Cheers,
Joe

On Mar 27, 2009, at 4:50 PM, bd-j-dev@mobileandembedded.org wrote:

> I have exactly the same problem with the same player. My own network
> tests fail as well as the Twitter demo. Must be something specific
> to this player or? I think I have gone through all menu options in
> search of anything useful, but I could take another look.
> [Message sent by forum member 'sunayo' (sunayo)]
>
> http://forums.java.net/jive/thread.jspa?messageID=339280

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net


gjparson

Posts: 7
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 27, 2009 5:05 AM   in response to: billf
  Click to reply to this thread Reply

What I meant to say was that your PRF did not contain signed credentials (via the BDCredentialSigner tool), which I thought was a requirement for accessing the network, but perhaps this is only for granting access to a player's system or local storage. In situations like this it would be nice to have the BDA specs available as a reference, although I believe these are very expensive.

The Samsung BD-P1500 player has three BD-LIVE settings: Allow(All), Allow(Valid Only) and Prohibit. The "Valid Only" setting allows a connection only if the application contains a valid certificate. I've been through the settings numerous times, so I'm not hopeful that this is it.

Another possibility may be that the player does not like BD-RE discs, which is what I have been using, since burning a BD-R disc for each test would be prohibitively expensive. In fact, TMT won't play my BD-RE disc, and issues the message: "Please insert a valid disc and try again". However, it will play the app if I select the BDMV directory on the BD-RE disc. That leads me to think that perhaps the hardware player expects a read-only, BD-ROM disc and may balk at permitting network access to a writable disc. If you think that sounds plausible, I could try this again with a BD-R disc.

Also, I have checked out the Samsung url that Joe Rice mentioned, and it appears that the BD-P1500 model requires that at least a 1GB USB2 flash drive be attached to the player in order to enable BD-LIVE. I will give this a try to see what happens.

billf

Posts: 107
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 30, 2009 11:38 AM   in response to: gjparson
  Click to reply to this thread Reply

> What I meant to say was that your PRF did not contain
> signed credentials (via the BDCredentialSigner tool),
> which I thought was a requirement for accessing the
> network, but perhaps this is only for granting access
> to a player's system or local storage.

I think you mean the persistentfilecredential element in the PRF? No, that's a file credential for sharing a file between two different discs. It's built from the MHP file credential mechanism, which is documented in MHP, e.g. in clause 11.10.2.2 and 12.6.2.6.

It is true that you have to pay for the BD-ROM spec and there is a license around it, which can be a bummer. However, a lot of what the Java developer cares about is specified in GEM and MHP, and those specs can be had for free, and are a couple of mouse clicks away. I just updated the wiki entry with some links; see http://wiki.java.net/bin/view/Mobileandembedded/BDJPlatformDefinition under "What about the full written specifications?".

Cheers,

Bill

gjparson

Posts: 7
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 27, 2009 2:49 PM   in response to: billf
  Click to reply to this thread Reply

Here is what Samsung says about BD-Live on their BD-P1500 player:

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

You must have a USB Flash Drive connected to access BD-Live content. Initially released as a Profile 1.1 player, the BD-P1500 has only the required 256MB of persistent storage. Profile 2.0 (BD-Live) requires a minimum of 1GB of persistent storage for downloaded content and other information. A USB flash drive provides the additional storage space required.
It is recommended that you use a USB Flash Drive which supports the following:
Minimum 1GB Maximum 4GB â—� USB 2.0 protocol â—� FAT32 format â—� 4MB or more read/write speed.
(1) With the power turned off, connect the USB device to the USB Host Jack on the back of the player.

(2) Turn the power on. "USB" should appear in red on the players front display.
-----------------

I had a spare SanDisk "SDCZ2-1024 Cruzer Mini 1.0 GB" flash drive available. So I first checked the flash drive and found that it was formatted as FAT. I reformatted it as FAT32 with 1024 byte cluster size.

I connected it to the player and the word "USB" did show up on the front panel, but it was in displayed in white, not in red.

I ran the Twitter app again and the player wrote the following info to the flash drive:

dir: 5e0df6691e7b563997b44137e59abc36a067ad95
dir: 7fff0001
dir: 1

So, the player did recognize and write to the flash drive, leaving plenty of space for any BD-Live content, but I got the same permission error as before. I checked the firmware version again, and it was up-to-date. Finally, I burned the Twitter app to a BD-R disc, played it on the Samsung player and got the same permission error as before with the BD-RE disc. I had a few Blu-ray movies available, but neither one has BD-Live content with which to test the player. So, I think that about does it for now.

gjparson

Posts: 7
Re: [BD-J-DEV] Network connection issues - again
Posted: Mar 29, 2009 1:30 AM   in response to: billf
  Click to reply to this thread Reply

Yesterday I purchased a Blu-ray movie with BD-Live content that functioned properly in my Samsung BD-P1500 player. So, perhaps the problem is not with the player afterall.

Jeff Kinzer
RE: [BD-J-DEV] Network connection issues - again
Posted: Mar 29, 2009 11:23 AM   in response to: gjparson
  Click to reply to this thread Reply

I have found that the Samsung 1500 will not allow network access from a BD-RE. This sounds like the issue you are running into.

________________________________

From: bd-j-dev@mobileandembedded.org [mailto:bd-j-dev@mobileandembedded.org]
Sent: Sun 3/29/2009 1:30 AM
To: bd-j-dev@hdcookbook.dev.java.net
Subject: Re: [BD-J-DEV] Network connection issues - again



Yesterday I purchased a Blu-ray movie with BD-Live content that functioned properly in my Samsung BD-P1500 player. So, perhaps the problem is not with the player afterall.
[Message sent by forum member 'gjparson' (gjparson)]

http://forums.java.net/jive/thread.jspa?messageID=339485



---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net


gjparson

Posts: 7
Re: RE: [BD-J-DEV] Network connection issues - again
Posted: Mar 29, 2009 12:03 PM   in response to: Jeff Kinzer
  Click to reply to this thread Reply

I have tried the Twitter app on both a BD-RE and a BD-R disc, and both resulted in the same network permission error. However, the commercial BD-Live disc that I ran yesterday did work on the Samsung BD-P1500. Not sure why. Will be looking at the latter for clues, if any. Thanks.

sunayo

Posts: 2
Re: RE: [BD-J-DEV] Network connection issues - again
Posted: Mar 30, 2009 9:50 AM   in response to: gjparson
  Click to reply to this thread Reply

I have also tried a commercial BD-Live Blu-ray title and it worked fine. Probably a problem related to BD-R and BD-RE discs not being allowed to use the network as stated above. Must say I am a bit disappointed at not being able to do testing of network applications on this player :-(

billf

Posts: 107
Re: RE: [BD-J-DEV] Network connection issues - again
Posted: Mar 30, 2009 10:33 AM   in response to: sunayo
  Click to reply to this thread Reply

It's certainly not impossible that it's a player bug. If it is, it might be corrected with new firmware, either now or in the future.

Unfortunately, anyone who would be able to get a definitive answer probably would have gotten it through a support agreement that would put them under NDA, so you're unlikely to get a 100% confirmation of where the issue is on a public forum.

I will say that the spec does require players to offer a configuration option where these permissions are granted to signed BD-R and BD-RE discs (provided that the player plays BD-R and RE discs at all, which is the case here). I'll also say that we have a high degree of confidence in the twitter demo xlet image, and have seen a BD-RE of it run on the players we checked, which are at least the PS/3, a Panasonic BD-50, and probably the Sony 350 as well.

In the little Sun cookbook team, we have been known to make a disc image and try it out on a freind's player, like my brother-in-law's BD-35, or even to make a BD-RE and go into a Best Buy on a slow day. YMMV.

mozste

Posts: 12
Re: RE: [BD-J-DEV] Network connection issues - again
Posted: Mar 30, 2009 12:56 PM   in response to: billf
  Click to reply to this thread Reply

Hi all,

While I don't have a definitive answer either, I can confirm that this player doesn't allow Internet connection on burned discs.

At my company we have many 2.0 BD players and Samsung 1500 is the only one that works online only with purchased discs.

Now, if this is out-of-spec, i think it could/should be notified to Samsung, right?

Cheers,
Stefano




 XML java.net RSS