Why I got the same reslults whether the Bluetooth adaptor plug or not?

I am trying to make communication from USB Bluetooth adaptor on my laptop to other Bluetooth device on J2ME environment, but after I finished the java code, and there is a problem, the laptop cannot detect any Bluetooth device. I am not sure which part I should change.
1) When I install the Bluetooth adaptor, I select com 4 as service port, but I did nothing with this in my Java code.
2) My developing environment is: Eclipse 3.2, JDK 1.5, WTK 2.5, J2ME , and my main program is Midlet program.
The following is my code; anybody can give me some suggestions.
And the running result is :
Running with storage root temp.MediaControlSkin21
Running with locale: English_United States.1252
Device Bluetooth Address: 0000000DECAF
Starting device inquiry...
no device found
and the big question is whether I plug the Bluetooth adaptor or not, the program always get the same result?!! And I never made any code to get the �Device Bluetooth Address: 0000000DECAF�, what is this address? I even did not plug the Bluetooth adaptor~~!!!
import javax.bluetooth.*;
import java.util.*;
public class BTConnector implements Runnable, DiscoveryListener {
private javax.bluetooth.UUID uuidSet[] = {new javax.bluetooth.UUID(0x1101)};
RemoteDevice remoteDevice;
try {
// create/get a local device and discovery agent
LocalDevice localDevice = LocalDevice.getLocalDevice();
discoveryAgent = localDevice.getDiscoveryAgent();
System.out.println("Starting device inquiry...");
discoveryAgent.startInquiry(DiscoveryAgent.GIAC, this);
transactionID = discoveryAgent.searchServices(null, uuidSet, remoteDevice,this);
// Searsh for services on the remote bt device.
catch(BluetoothStateException exp){}
public void doDiscoverService (RemoteDevice remote){
// Called if a remote btDevice is found
public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) {
try{
deviceNames[index] = btDevice.getFriendlyName(false); System.out.println(index + " : " + deviceNames[index]);
index++;
devices.addElement(btDevice); //
}catch(Exception e){
public void inquiryCompleted(int discType){
     if (devices.size()==0) {System.out.println("no device found");}
     else {
          System.out.println("inquiryCompleted");
public void servicesDiscovered(int transID, ServiceRecord[] servRecord) {
     if (servRecord.length==0);      
public void serviceSearchCompleted(int transID, int respCode) {
System.out.println("serviceSearchCompleted");
}

{color:#000080}Dean
Can you read dates? Take a look at when this thread was started.
Make sure that javax.bluetooth is on your computer, and is included in the Classpath.
And please don't resurrect any more long dead threads. You are welcome to start one of your own.
db{color}

Similar Messages

Maybe you are looking for

  • Oracle ODBC driver 8.1.6.2.0

    Hi I want know where can I download the Oracle ODBC driver version 8.1.6.2.0?I read in the Oracle support that the access violation error due to network problems is fixed out in this driver version.Please guide me where to download it. Thanking in ad

  • Regarding Out put screen

    Hi All, When I am tryig to print this in a line, its printing upto 109 chars only,after that nothing  I am able to get, May I know, is there any thing to do for horizontall scrollers. or, it has to come by default.    write:/ 'orderrno',14 '|',      

  • Does anyone know if their servers are down?

    I am hearing rumors that apples servers are down and thats why original iphone users cant reactivate their phone so if you know for sure then please reply and tell me

  • T code for a menu path

    Hi I know the menu path and when I check  for T -code , I did not find one. How do I get tcode . that really helps me to go directly to transaction rather than going menth path every time regards Kumar

  • Griffin imic interference

    I've been trying to get a more "live" sound into garageband. I've been using a griffin imic as my way to capture sound. Weather it's drums running thru a mixer or simply using a pod line-6, there is a very audible interference heard once the signal h