PlanetJava
Custom Search

java-sun-kvm
[Top] [All Lists]

Bluetooth j2me and hte nokia 6600

Subject: Bluetooth j2me and hte nokia 6600
Date: Fri, 9 Sep 2005 11:10:02 +0100
I am writing some code that when two phones running the software come into
range they exchange a personal profile, I am using a 6600 and a 6230 for
testing. I am having problems gettingthem to consistently exchange, it
happens 7 out of 10 times if the phones are started in a specific order. I
am often getting a bluetoothstateException:busy and/or it just not seeing
the device in device discovery or not detecting the service.
The software has both server and client sides to it running, the client
actively looking for devices the server waiting to receive connections.
With the 6600 I have been advised previously that it only allows 2
simultaneous connections. If the server code is as follows below, will that
use both the connections, one for the stream connection notifier and the
other pending on acceptandopen?
any advice would be great as have been banging my head against this one for
a few days now.
James
try
       {
  yourPhone.setDiscoverable(DiscoveryAgent.NOT_DISCOVERABLE);
  String url = "btspp://localhost:" + DATING_SERVICE_ID.toString() +
";name=Dating Service;authorize=false";
           // create notifier now
           incomingNotifier = (StreamConnectionNotifier)
Connector.open(url.toString());
           yourPhone.setDiscoverable(DiscoveryAgent.GIAC);
 }
       catch (Exception e)
       {
      parent.tempForm.append("Failed to initialize bluetooth:" + e);
       }
       StreamConnection theConnection = null;
       while (!closeDown)
       {
           theConnection = null;
           try
           {
                  theConnection = incomingNotifier.acceptAndOpen();
           }
           catch (IOException e)
           {
               continue;
           }
              if (theConnection != null)
               processRequest(theConnection);
       }
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff KVM-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".
msgmiddle
<Prev in Thread] Current Thread [Next in Thread>
  • Re: Handango - deleting products
    • Re: Handango - deleting products
    • Re: Handango - deleting products
      • Bluetooth j2me and hte nokia 6600,
      • Re: Handango - deleting products
Current Sitemap | © 2012 planetjava | Contact | Privacy Policy