Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bluetooth UUID and Service Creation J2ME

Status
Not open for further replies.

blundellp

Technical User
Apr 6, 2005
25
0
0
GB
Can I post J2ME questions here?

I was just wondering can someone help me with my problem.

I'm trying to create my own Bluetooth service, the code is:-


Code:
    public class createBluetoothService extends Thread
    {
       public void run()
       {
        try
        {
            StreamConnectionNotifier myNotifier = (StreamConnectionNotifier)
            Connector.open("btspp://localhost: 033BFE40DD46464eBDFC981D229E51CE;name=NightOutService; authorize=false; authenticate=false; encrypt=false");
            StreamConnection conn = myNotifier.acceptAndOpen();
        }
        catch(Exception e)
        {
            System.out.println("btspp error" +e);
        }
       } 
    }
I get the error,

"
btspp errorjava.lang.IllegalArgumentException: Malformed URL: btspp://localhost: 033BFE40DD46464eBDFC981D229E51CE;name=NightOutService; authorize=false; authenticate=false; encrypt=false
"

I think it's something to do with the UUID I'm using however i've tried various different ones, this one was created from the program
[link] [/url]

Although I've also tried it with this UUID generator [link] [/url]

and still get the same errors

Any help is much appreciated, and sorry if i've posted in the wrong place

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top