Welcome to WiFi-Forum

Go Back   WiFi-Forum - Wi-Fi Discussion Forum > Bluetooth Discussion Forums > BlueTooth Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 05-27-2007, 08:33 AM
mihirdm mihirdm is offline
Junior Member
 
Join Date: May 2007
Location: MUMBAI
Posts: 2
Default Help with Nokia 6600 to computer communication

Hi,
i have developed a code for Nokia 6600 to talk to Computer. the only thing where it get's stuck is the UUID stuff. i am not sure what value to specify in for the UUID and the attribute set while opening the connection to the computer via the Nokia 6600 code.
Code:
public void connect(String s)throws IOException {

        String UUID = new UUID("1101",false).toString();//1101 00112233445566778899AABBCCDDEEFF
        System.out.println("UUID is....."+UUID);
        int discoveryMode = DiscoveryAgent.GIAC; 
        LocalDevice device = null;
        // no paring needed
    
        try {
            device = LocalDevice.getLocalDevice();
            device.setDiscoverable(DiscoveryAgent.GIAC);
            String url = "btspp://localhost:" + UUID + ";name=PCServerCOMM";
            System.out.println("URL is....."+url);
            synchronized (this) 
            {
                notifier = (StreamConnectionNotifier) Connector.open(url);
                servRecord = device.getRecord(notifier);
                System.out.println("SERVRECORD is....."+servRecord);
                StreamConnection conn= notifier.acceptAndOpen();
                DataOutputStream out = conn.openDataOutputStream();
                out.writeUTF(s);
                /*LocalDevice local =  LocalDevice.getLocalDevice();
                DiscoveryAgent agent = local.getDiscoveryAgent();
                String connString = agent.selectService(
                new UUID("1101", false),
                ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
                */
                /*try {
                    // Connect to the server and send 'Hello, World'
                   /* StreamConnection conn = (StreamConnection)
                        Connector.open(connString);

                    OutputStream out = conn.openOutputStream();
                    out.write("Hello, World".getBytes());
                    out.close();
                    conn.close();

                    System.out.println("Message sent correctly");
                } catch (IOException e) {
                    System.out.println("IOException: ");
                    System.out.println(e.getMessage());
                }
*/
                
               }

        }
        catch(IOException e) {
            System.out.println("IOException");
        }
        catch(Exception e)    {
            System.out.println("exception of url");
            e.printStackTrace();
        }
    }
}
u can clearly see that i've tried lot of stuff. pls help at the earliest. thanks a million.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Actual Firmware of ALL Nokia GSM's: OCT 05 Henk Loosbroek Nokia Forum 10 12-10-2006 03:01 AM
www.tipcell.com sell: nokia 9500 lcd tipcell alt.cellular.bluetooth 0 03-06-2006 10:44 PM
For Sell The Nokia 3310 $25usd, Nokia 1100 $30usd felixadebayo Nokia Forum 0 01-24-2006 02:10 AM
For Sell The Nokia N90 $180usd, N92 $220usd, N70 $140usd 8800 $140usd felixadebayo Nokia Forum 0 01-24-2006 02:05 AM




All times are GMT -7. The time now is 11:56 PM.

vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. All Contents Copyright © Wifi-Forum.com