×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    1

    java bluetooth service discovery with 6600

    Was anybody in this forum able to do a successful, general java bluetooth service discovery on a 6600?

    Device discovery works fine for me, but I am not able to discover any service with my midlets.
    I guess, my main problem is, that I try to discover available services in general. My midlet searches for any service I was able to find a UUID for; but although there are several devices with various services (a second mobile phone, a pc-bluetooth card, a gps-receiver, etc.) found by my 6600, there seems to be never any service ¡_

    Maybe anybody has a little advice for me concerning the service UUIDs to provide for service discovery!

    My discovery-code looks like this:
    local.setDiscoverable(DiscoveryAgent.GIAC)
    int attrbs[]={ 0x0100 }; // null should deliver default attributes ¡_
    UUID[] uuidSet= new UUID[75];
    // a list of UUIDs I found on the web:
    uuidSet[0]=new UUID( 0x0000);
    uuidSet[1]=new UUID( 0x0001);
    uuidSet[2]=new UUID( 0x0002);
    uuidSet[3]=new UUID( 0x0003);
    uuidSet[4]=new UUID( 0x0004);
    uuidSet[5]=new UUID( 0x0005);
    uidSet[6]=new UUID( 0x0006);
    uuidSet[7]=new UUID( 0x0007);
    uuidSet[8]=new UUID( 0x0008);
    uuidSet[9]=new UUID( 0x0009);
    uuidSet[10]=new UUID( 0x000A);
    uuidSet[11]=new UUID( 0x000B);
    uuidSet[12]=new UUID( 0x000C);
    uuidSet[13]=new UUID( 0x000D);
    uuidSet[14]=new UUID( 0x0200);
    uuidSet[15]=new UUID( 0x0201);
    uuidSet[16]=new UUID( 0x0300);
    uuidSet[17]=new UUID( 0x0301);
    uuidSet[18]=new UUID( 0x0302);
    uuidSet[19]=new UUID( 0x0303);
    ¡_ list of further UUIDs ¡_
    uuidSet[75]=new UUID( 0x1126);

    RemoteDevice d=(RemoteDevice)devices.nextElement(); // a single discovered device.
    disc_agent.searchServices( attrbs, uuidSet, d, serv_listener ); //serv_listener implements the Discovery_Listener Interface ¡_

    After waiting for the discovery to finish, there is never a service available.

    Every example I was able to find until now only employs the discovery of a ¡°proprietary¡± set service, a kind of client-server hello world.

    I appreciate every suggestion on what I am doing wrong!!!

    Thanx

    jdevmo

  2. #2
    Registered User
    Join Date
    Jan 2006
    Posts
    10

    Re: java bluetooth service discovery with 6600

    Hi,

    I too doing the same project. Can you please give me your project source code so that I can try.
    My email id is shengiv@myway.com


    Thanks in advance

  3. #3
    Registered User
    Join Date
    Nov 2005
    Location
    Toronto, Canada
    Posts
    6

    Re: java bluetooth service discovery with 6600

    I have been able to do a service discovery on Nokia 6230.

    Also FUY the good example of how to do this is here:
    http://www.benhui.net/modules.php?name=Bluetooth

    If you want to test your application on PC you need to get this:
    http://www.avetana-gmbh.de/avetana-g.../jsr82.eng.xml

  4. #4
    Registered User
    Join Date
    Mar 2006
    Posts
    1

    Re: java bluetooth service discovery with 6600

    hi every one iam also having the same problem my client is not able to find the services provided by my server.iam using my pc as server which uses avelink bluetooth stack and my client is running on 6600.i did every thing what benhui
    web site has given.but still it doesnot work

    any idea about this.

  5. #5
    Registered User
    Join Date
    Apr 2006
    Posts
    1

    Wink Re: java bluetooth service discovery with 6600

    hi every body! i have the same problem as vicky. I am using a bluetooth USB dongle and avelink (Atinav) bluetooth protocol stack. the problem lies in the service discovery. after service search is over i get SERVICE_SEARCH_ERROR. i can not figure out what is the problem.
    After divice discovery is over i used this code
    ------------------------------
    public void inquiryCompleted(int i) {
    if(ndevice==0)
    {
    remoteString.setText(remoteString.getText()+"No remote device found!\n");


    }
    else
    {

    remoteString.setText(remoteString.getText()+Integer.toString(ndevice)+" device(s) found!\n");
    try{Thread.sleep(2000);}
    catch(InterruptedException intex){}

    //look for services
    remoteString.setText(remoteString.getText()+"Searching for Services, please wait...\n");
    //UUID uuidList[]={new UUID("00112233445566778899AABBCCDDEEFF",false)};
    UUID uuid[]= {new UUID("00112233445566778899AABBCCDDEEFF",false)};
    for(int j=0;j<remoteDevices.size();j++)
    {
    try
    {
    RemoteDevice rtDevice=(RemoteDevice)remoteDevices.elementAt(j);
    agent.searchServices(null,uuid,rtDevice,this);
    }
    catch(BluetoothStateException btse)
    {
    remoteString.setText(remoteString.getText()+"BluetoothStateException in midlet: "+btse.getMessage()+"\n");
    }
    }

    }

    }

    ----------------------------
    when search is over i get service search error

    public void serviceSearchCompleted(int i, int respCode)
    {
    if(nservice==0)
    {
    remoteString.setText(remoteString.getText()+"No service found on remote device!\n");

    }
    else
    {
    remoteString.setText(remoteString.getText()+Integer.toString(nservice)+" service(s) found on remote device!\n");
    }
    String message="";
    if (respCode == DiscoveryListener.SERVICE_SEARCH_DEVICE_NOT_REACHABLE)
    {
    message = "Device not reachable";
    }
    else if(respCode == DiscoveryListener.SERVICE_SEARCH_NO_RECORDS)
    {
    message = "Service not available";
    }
    else if (respCode == DiscoveryListener.SERVICE_SEARCH_COMPLETED)
    {
    message = "Service search completed";
    }

    else if(respCode == DiscoveryListener.SERVICE_SEARCH_TERMINATED)
    {
    message = "Service search terminated";
    }
    else if (respCode == DiscoveryListener.SERVICE_SEARCH_ERROR)
    {
    message = "Service search error";
    }
    remoteString.setText(remoteString.getText()+"Service search status: "+message);

    //send data
    if(respCode == DiscoveryListener.SERVICE_SEARCH_COMPLETED)
    {
    try
    {
    remoteString.setText(remoteString.getText()+"Sending Data with discovered services.");
    int j=0;
    ServiceRecord record;
    while(serviceRecord.elementAt(j)==null&&j<serviceRecord.size())
    {
    j++;
    }
    record=(ServiceRecord)serviceRecord.elementAt(j);

    String url=record.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT,false);
    StreamConnection conn=(StreamConnection)Connector.open(url);
    DataOutputStream out=conn.openDataOutputStream();
    out.writeChars("This is the data sent by cleint. ID=718bt1128");
    out.flush();
    remoteString.setText(remoteString.getText()+"Data sent to server. ID=718bt1128");
    out.close();
    conn.close();
    conn=null;

    }
    catch(IOException ioex)
    {
    remoteString.setText(remoteString.getText()+"I/O Exception in Midlet: "+ioex.getMessage());
    ioex.printStackTrace();
    }

    }
    }


    if any body has anything to say please mail me bemnet4u@mail2developer.com

  6. #6
    Registered User
    Join Date
    Jan 2006
    Posts
    10

    Re: java bluetooth service discovery with 6600

    hello,

    i am having the program that discovers the services available in the mobile. but how to use that service. can any one help it?

    i need a program to communicate between pc and mobile(6600) ie a chat program between pc and mobile.

    can you please provide the program to me. it will be very helpful to me.
    my email id is shengiv@myway.com

    regards
    Vignesh

  7. #7
    Super Contributor
    Join Date
    Dec 2005
    Location
    England,UK
    Posts
    1,600

    Re: java bluetooth service discovery with 6600

    Hi All,
    The program you want about service discovery is at following thread in this forum



    http://discussion.forum.nokia.com/fo...ad.php?t=80727

    Jim

  8. #8
    Super Contributor
    Join Date
    Dec 2005
    Location
    England,UK
    Posts
    1,600

    Re: java bluetooth service discovery with 6600

    There are still some problems for MIDP 2.0 on the 6600. This link to document documents them

    Known issues with Nokia 6600 and MIDP 2.0

    Jim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×