Re: [android-developers] UUID in Bluetootht sample

2011-06-16 Thread wu mark
Dear Kris : I don't see any error message from Eclipse console. So I add display instruction to trace, so I know it fail in the below command : BluetoothSocket socket = device.createRfcommSocketToServiceRecord(MY_UUID); But I don't know why. Thanks for your patience & kindly teaching. Best

Re: [android-developers] UUID in Bluetootht sample

2011-06-16 Thread Kristopher Micinski
Hrrm... and what did the exception tell you? The exception has a .text field that will tell you why it fails. What did that say? On Jun 16, 2011 5:46 AM, "wu mark" wrote: Dear Kris : Thanks. I use a Viewpad & Acer A500 to communicate through the bluetooth. Mark 2011/6/15 Kristopher Micin

Re: [android-developers] UUID in Bluetootht sample

2011-06-16 Thread wu mark
Dear Kris : Thanks. I use a Viewpad & Acer A500 to communicate through the bluetooth. Mark 2011/6/15 Kristopher Micinski > Looks like you have the code right, if you took it from the sample it > should work. > > Just go through with eclipse, set a breakpoint on the line that catches the

Re: [android-developers] UUID in Bluetootht sample

2011-06-15 Thread Kristopher Micinski
Looks like you have the code right, if you took it from the sample it should work. Just go through with eclipse, set a breakpoint on the line that catches the exception, and run your code. Again, what two phones are you running? Kris On Wed, Jun 15, 2011 at 3:23 AM, wu mark wrote: > Dear Kri

Re: [android-developers] UUID in Bluetootht sample

2011-06-15 Thread wu mark
Dear Kris : Sorry, I'm a newer from android. Could you tell me how to see the text in the exception? What do you mean about the permission? Is it enough to add BLUETOOTH & BLUETOOTH_ADMIN in the AndroidMenifest.xml? Thanks. Best Regards, Mark PS. Could you give me an example code that can r

Re: [android-developers] UUID in Bluetootht sample

2011-06-14 Thread Kristopher Micinski
Debug through and see what the text in the exception is. Maybe you didn't get ther right permission, that's a glaring reason On Jun 14, 2011 11:28 PM, "wu mark" wrote: Dear Kris: I found it failed on the below step. Could you find anything wrong? Thanks. // 連線等候執行緒 private class Serv

Re: [android-developers] UUID in Bluetootht sample

2011-06-14 Thread wu mark
Dear Kris: I found it failed on the below step. Could you find anything wrong? Thanks. // 連線等候執行緒 private class ServerThread extends Thread { private final BluetoothServerSocket mmServerSocket; private final String ServiceName = "BTServer"; private final UUID MY_UUID = UU

Re: [android-developers] UUID in Bluetootht sample

2011-06-14 Thread wu mark
Dear Kris : Thanks. The UUID is 1101--1000-8000-00805F9B34FB. Is it right? Best Regards, Mark 2011/6/15 Kristopher Micinski > It should give you some description with the exception, (I think there was > an invalid port number the other day someone had.) > > Kris > > On Tue, Jun 1

Re: [android-developers] UUID in Bluetootht sample

2011-06-14 Thread Kristopher Micinski
The UUIDs don't matter, they just have to be the same between your applications. If you copy and paste it it should work. Kris On Tue, Jun 14, 2011 at 10:26 PM, wu mark wrote: > Dear Kris : > >Thanks. > > The UUID is 1101--1000-8000-00805F9B34FB. Is it right? > > Best Regards, > Ma

Re: [android-developers] UUID in Bluetootht sample

2011-06-14 Thread wu mark
just io exception. 2011/6/15 Kristopher Micinski > What error did you get? > > Can you check it in the logcat? What phones are you using, also. > > Kris > > > On Tue, Jun 14, 2011 at 9:16 PM, mark2011 wrote: > >> Dear All : >> >> I'm trying to communicate through the bluetooth now. I see the

Re: [android-developers] UUID in Bluetootht sample

2011-06-14 Thread Kristopher Micinski
It should give you some description with the exception, (I think there was an invalid port number the other day someone had.) Kris On Tue, Jun 14, 2011 at 10:06 PM, wu mark wrote: > just io exception. > > 2011/6/15 Kristopher Micinski > >> What error did you get? >> >> Can you check it in the

Re: [android-developers] UUID in Bluetootht sample

2011-06-14 Thread Kristopher Micinski
What error did you get? Can you check it in the logcat? What phones are you using, also. Kris On Tue, Jun 14, 2011 at 9:16 PM, mark2011 wrote: > Dear All : > > I'm trying to communicate through the bluetooth now. I see the > sample code in the book that said the BTServer & BTClient had set

[android-developers] UUID in Bluetootht sample

2011-06-14 Thread mark2011
Dear All : I'm trying to communicate through the bluetooth now. I see the sample code in the book that said the BTServer & BTClient had set the UUID. Is the UUID the same in these 2 Java program? I had paired & discoverered it, but fail to build RfComm connection. How can I do ? Thanks. Mark