Welcome, Guest. Please login or register.

Login with username, password and session length
September 07, 2010, 04:14:38 AM
Pages: [1]
  Print  
Topic: Fail to search services  (Read 455 times)
« on: July 31, 2009, 07:57:47 AM »
siddiqov
Newbie

View Profile
*
Karma: +0/-0
Posts: 3



plz help me
my code is given below. and i am stuck at that point to search the services of a bluetooth device.
i dont know y it is going fail to search the services.
here is my code and after this u can see the console output
                                  .
                                  .
                                  .
String param ="";
      if(encrypt) param = "encrypt=true;";
       else if(authorize) param="authorize=true;";
      else if(authenticate) param="authenticate=true;";
      param += "name=BlueTooth Bench";
            if(master) param +=";master=true";
            connectionURL = "btspp://localhost:66ca80886d1f11d88526000bdb544cb1;" + param;
      System.out.println("going into Stream connecton notifyer....."+ connectionURL);
      try {
      System.out.println("before Stream connecton notifyer.....");
      server = (StreamConnectionNotifier) Connector.open(connectionURL);
      System.out.println("after Stream connecton notifyer.....");
            }
         catch (IOException e1)
            {
            System.out.println("Stream IOexception.....");   
            return false;
            }

Console out put
start Application
Command Action
start command button is clicked
Create Service method
Device Bluetooth Address: 0000000DECAF
going into Stream connecton notifyer.....btspp://localhost:66ca80886d1f11d88526000bdb544cb1;name=BlueTooth Bench
before Stream connecton notifyer.....
Warning: To avoid potential deadlock, operations that may block, such as
 networking, should be performed in a different thread than the
 commandAction() handler.

« Last Edit: August 01, 2009, 05:39:11 PM by siddiqov » Logged
 
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC