×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    4

    best bluetooth dongle+ bluetooth programming

    best bluetooth dongle+ bluetooth programming
    hello ther.e.

    can anyone suggest which bluetooth dongle to use with windows xp service pack 2 .. so that i could develop an on my pc...

    my problem..
    um designing an applicatoin which works over bluetooth but the dongle i stated with was MSI dongle which had overwritten windows bluetooth stack and my midlet couldnt detect the third party stack.. now um using trendnet dongle ..its working fine with windows.. but my applicaiton still dont detect it.. wats the problem.

    im posting the code for bluetooth discovery .. tell me if it needs modificaiton..

    plz reply..

    thanx
    ------------------------------------------------------------------------------------------
    import java.lang.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    import javax.bluetooth.*;

    public class DiscoveryMIDlet extends MIDlet implements CommandListener,DiscoveryListener
    {

    private List deviceList;
    private DiscoveryAgent agent;

    public DiscoveryMIDlet()
    {
    }

    public void pauseApp()
    {
    }

    public void destroyApp(boolean unconditional)
    {
    }

    public void startApp() throws MIDletStateChangeException
    {
    deviceList = new List("List of Devices",List.IMPLICIT);
    deviceList.addCommand(new Command("Exit",Command.EXIT,1));
    deviceList.setCommandListener(this);

    Display.getDisplay(this).setCurrent(deviceList);

    try
    {
    LocalDevice local = LocalDevice.getLocalDevice();
    agent = local.getDiscoveryAgent();
    }
    catch(BluetoothStateException e)
    {
    throw new MIDletStateChangeException("Unable to retrieve local bluetooth device 1");
    }

    try
    {
    agent.startInquiry(DiscoveryAgent.GIAC,this);
    }
    catch(BluetoothStateException e)
    {
    throw new MIDletStateChangeException("Unable to start inquiry");
    }
    }

    public void commandAction(Command c, Displayable d)
    {
    notifyDestroyed();
    }

    public void deviceDiscovered(RemoteDevice device, DeviceClass cod)
    {
    String address = device.getBluetoothAddress();
    deviceList.insert(0,address + "-I", null);
    }

    public void inquiryCompleted(int type)
    {
    Alert dialog = null;

    if(type != DiscoveryListener.INQUIRY_COMPLETED)
    {
    dialog = new Alert("Bluetooth Error",
    "The inquiry failed to complete normally",
    null,AlertType.ERROR);
    }
    else
    {
    dialog = new Alert("Inquiry Completed","the inquiry completed normally",
    null,AlertType.INFO);
    }

    dialog.setTimeout(Alert.FOREVER);
    Display.getDisplay(this).setCurrent(dialog);

    }

    public void servicesDiscovered(int transID, ServiceRecord[] record)
    {
    }

    public void serviceSearchCompleted(int transID, int type)
    {
    }
    }

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

    Re: best bluetooth dongle+ bluetooth programming

    If you have a Windows SP2 compatible dongle then you will need the Bluecove XP project see http://sourceforge.net/projects/bluecove/
    this needs the intelbth.dll copied into your windows area as per instructions in kit.

    See also the website for examples of connection
    http://www.benhui.net/modules.php?na...ne_Part_1.html
    Good Luck
    Jim

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    77

    Re: best bluetooth dongle+ bluetooth programming

    I have used bluesock and bluecove standalone ok, but I see don't see how to get the WTK emulator to use them as default.

    I would imagine I need to overlay some stuff in the WTK, with parts(s) from the sock/cove packagaes, so WTK picked them up first? No sure how.

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

    Re: best bluetooth dongle+ bluetooth programming

    but I see don't see how to get the WTK emulator to use them as default.
    You cannot do on-device runtime/debug with WTK.
    You need Netbeans I use version 4.1. from the Sun website.
    This does need (J2SE) Java 2 Standard edition.

    You cannot link into WTK. You can run BT code. You run two copies of the program and they link via BT emulator code in WTK

    Bluecove is the only way to talk BT USB and that means you needs a MS XP XP2 BT USB.

    Oh I did try hacking in overlaying the JSR82 code drivers but it does not work!

    Jim

Similar Threads

  1. best bluetooth dongle+ bluetooth programming
    By ali_hammad in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2006-05-24, 18:18
  2. Connecting RS232 Bluetooth Dongle to Nokia 6230
    By rbhogu in forum Bluetooth Technology
    Replies: 3
    Last Post: 2005-03-14, 11:54
  3. Nokia 6230 and RS232 Bluetooth dongle
    By rbhogu in forum General Development Questions
    Replies: 0
    Last Post: 2005-03-02, 18:19
  4. Nokia 6600 and Bluetooth USB dongle
    By alkazoid2 in forum Bluetooth Technology
    Replies: 0
    Last Post: 2004-03-04, 22:59
  5. bluetooth programming alternatives
    By ja_calulot in forum Bluetooth Technology
    Replies: 2
    Last Post: 2003-08-20, 08:46

Posting Permissions

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