bquanhuang / bluecove

Automatically exported from code.google.com/p/bluecove
0 stars 0 forks source link

: The requested protocol does not exist btspp #130

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Define the URL which includes:
Device address, usually localhost
a UUID, the ID number of the service
name of the service 

2. Open the URL.
3. Wait for a client connection

What is the expected output? What do you see instead?
I'll expected to receive: Hello world

but:
The requested protocol does not exist 
btspp://localhost:b10c0be1111111111111111111110001;name=bluecovesrv_rf;authentic
ate=false;encrypt=false;authorize=false

What BlueCove version are you using (include build number for SNAPSHOT)? On 
what operating system and jvm? Is this 64-bit or 32-bit OS and jvm?
I use Bluecove 2-1.1 Snapshot, win7 64-bit and eclipse.

This is my code:

public class MonAppli{

     public static void main( String args[] ) {
           try {

            StreamConnectionNotifier service = (StreamConnectionNotifier) 
                   Connector.open( "btspp://localhost:" + new UUID( 0x1101 ).toString() +";name=helloService");

            StreamConnection conn = (StreamConnection)service.acceptAndOpen();
            InputStream is = conn.openInputStream();

            byte buffer[] = new byte[80];
            int bytes_read = is.read( buffer );
            String received = new String(buffer, 0, bytes_read);
            System.out.println("received: " + received);

            conn.close();
           } catch ( IOException e ) {   System.err.print(e.toString());    }
         }
}

Original issue reported on code.google.com by mvivieng...@gmail.com on 10 Apr 2012 at 2:55