This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java Micro Edition and the fly likes Bluetooth connection not working on US Nokia phones from J2ME Midlet (MIDP 2.0) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Bluetooth connection not working on US Nokia phones from J2ME Midlet (MIDP 2.0)" Watch "Bluetooth connection not working on US Nokia phones from J2ME Midlet (MIDP 2.0)" New topic
Author

Bluetooth connection not working on US Nokia phones from J2ME Midlet (MIDP 2.0)

mari raja
Greenhorn

Joined: Jul 14, 2009
Posts: 1
Hi All,

We are developing a J2ME midlet (MIDP 2.0 ,CLDC 1.1)which makes bluetooth connection to other devices.The bluetooth connection is working perfectly on indian nokia phones with Airtel as carrier.But when we deploy the same midlet on Nokia E71 US phone with carrier as AT&T ,the bluetooth connection is not working.The sample code is as follows:

public void run(){

try{
StreamConnection connection = (StreamConnection)Connector.open(btConnectionURL);

//
// open an input stream to get some data
//

InputStream in = connection.openInputStream();

byte[] serialData;
readData = true;
while(readData == true){
int lengthavai=0;
lengthavai = in.available();

if(lengthavai > 0){

serialData = new byte[lengthavai];
int length = in.read(serialData);

System.out.println("data read: " + new String(serialData));

dataViewForm.append(new String(serialData));
}
}

in.close();
connection.close();

}catch(IOException ioe){
ioe.printStackTrace();
}


when we try to connect on US Phones,the execution hangs at the following line of code:
StreamConnection connection = (StreamConnection)Connector.open(btConnectionURL);

No exception is caught.

Our midlet is not signed.

In the Forums it is said that the problem is with the unsigned midlet.AS some of the US carriers block the secure API usage on Unsigned midlet.

But our question is, if we buy a code signing certificate from Verisign or Thawte and sign the midlet, will this problem be solved.

Any other alternative solutions for this ???

Immediate help will be appreciated.


Thanks,
Mari Raja
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Bluetooth connection not working on US Nokia phones from J2ME Midlet (MIDP 2.0)