I am trying to write a blue chat application and the program works perfectly with two Sony Ericsson k600. However, when I try to connect Nokia 6680 to k600, I have found that when k600 is acted as a server, the function - getConnectionURL() - on the client side(6680) always returns NULL. As a result, I can't connect 6680 to k600.
But, if 6680 is acted as a server instead of k600, k600(client) can use getConnectionURL() to get the "connection URL" successfully. And, k600 connect to 6680 without causing any problem.
I have also tried to replace the "null" URL value in 6680 by "btspp://k600_address:4;authenticate=false;encrypt=false ;master=false" and start the connection manually. The result indicated that k600 can identify the existence of 6680 but connection stream can not be established. (At that moment, k600 asked for authentication of connection of 6680 and both devices need to enter same pin code for unknown reason. But, after these strange procedures have finished, devices still do not create succesful connection)
I feel dizzy and my project deadline is approching. Can someone offer me some help? Is it impossible to connect two brand phones by bluetooth? Provided herewith is my codes for service search and is started from function - mySearch.
Thank you very much!
Code:public void servicesDiscovered(int arg0, ServiceRecord[] arg1) { servicefound++ statusForm.append("Services : " + arg0); for(int i=0;i<arg1.length;i++){ true; statusForm.append("ServiceRecord: " + i); statusForm.append("connURL : " + arg1[i].getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCR YPT,false)); serviceRecord = arg1[i]; } } public void serviceSearchCompleted(int arg0, int arg1) { servicegroup2find--; if(servicegroup2find == 0) { connectNow(); } else { this.mySearch((RemoteDevice)deviceList.elementAt(de viceList.size()-servicegroup2find)); } } public void inquiryCompleted(int arg0) { if(servicegroup2find==0)servicegroup2find = deviceList.size(); if(deviceList.size()>0){ statusForm.append("DEVICE FOUND - " + deviceList.size()); if(servicegroup2find>0) this.mySearch((RemoteDevice)deviceList.elementAt(de viceList.size()-servicegroup2find)); } else { statusForm.append("DEVICE FOUND - " + deviceList.size()); connectNow(); } } private void mySearch(RemoteDevice dev) { UUID[] searchList = new UUID[1]; //searchList[0] = new UUID(0x0003); searchList[0] = new UUID(serviceUUID, false); try { int trans; if(!deviceToConnectFound)deviceToConnect = dev; trans = myda.searchServices(null, searchList, dev, this); } catch (BluetoothStateException e) { } }

Reply With Quote
Perhaps you'd like to download the application from this document:
) phones. 

