Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Bluetooth, J2ME Wireless Toolkit 2.2

807607Jan 24 2007 — edited Jan 24 2007
Hey all,

I want to be able to create a little device discovery program using the onboard bluetooth on my xp laptop to find my bluetooth mobile phone. I have downloaded the J2ME Wireless Toolkit and added jsr082.jar and midpapi10.jar to my project.

My question is how do you do the stack initialization for this SDK? I have found the following code for Atinav Java Bluetooth SDK (taken from http://today.java.net/lpt/a/112):
import javax.bluetooth.*;
import javax.microedition.io.*;
import com.atinav.BCC;

public class WirelessDevice implements DiscoveryListener {
    LocalDevice localDevice = null; 
    
    public WirelessDevice (){ 
        //setting the port number using Atinav's BCC
        BCC.setPortName("COM1"); 
        
        //setting the baud rate using Atinav's BCC
        BCC.setBaudRate(57600);
        
        //connectable mode using Atinav's BCC
        BCC.setConnectable(true);
        
        //Set discoverable mode using Atinav's BCC 
        BCC.setDiscoverable(DiscoveryAgent.GIAC); 
        
        try{
            localDevice = LocalDevice.getLoaclDevice(); 
        }
        catch (BluetoothStateException exp) {
        }
        
        // implementation of methods in DiscoveryListener class
        // of javax.bluetooth goes here
        
        // now do some work
    }
}
I can't find the quivalent of what the code does for my SDK. Does anyone know where I can find it or any more relevant tutorials?

Thanks in advance.

Comments

gimbal2
Put the name of the page in the action attribute of the form, just like you always would :s

Or perhaps you mean that you want to submit to a different frame or something? In that case you use the target attribute and give it the name of the frame you want to submit to.
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 21 2007
Added on Jan 24 2007
2 comments
315 views