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 =
UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");

     public ServerThread() {
      BluetoothServerSocket tmp = null;
      try {
       tmp = BTAdapter.listenUsingRfcommWithServiceRecord(ServiceName,
MY_UUID);
      } catch (IOException e) { }
          mmServerSocket = tmp;
      }

2011/6/15 Kristopher Micinski <krismicin...@gmail.com>

> 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 <androidmark2...@gmail.com>wrote:
>
>>   Dear Kris :
>>
>>    Thanks.
>>
>> The UUID is 00001101-0000-1000-8000-00805F9B34FB. Is it right?
>>
>> Best Regards,
>> Mark
>>
>>   2011/6/15 Kristopher Micinski <krismicin...@gmail.com>
>>
>>>  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 
>>> <androidmark2...@gmail.com>wrote:
>>>
>>>>  just io exception.
>>>>
>>>>   2011/6/15 Kristopher Micinski <krismicin...@gmail.com>
>>>>
>>>>>  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 
>>>>> <androidmark2...@gmail.com>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 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
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Android Developers" group.
>>>>>> To post to this group, send email to
>>>>>> android-developers@googlegroups.com
>>>>>> To unsubscribe from this group, send email to
>>>>>> android-developers+unsubscr...@googlegroups.com
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/android-developers?hl=en
>>>>>
>>>>>
>>>>>   --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Android Developers" group.
>>>>> To post to this group, send email to
>>>>> android-developers@googlegroups.com
>>>>> To unsubscribe from this group, send email to
>>>>> android-developers+unsubscr...@googlegroups.com
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/android-developers?hl=en
>>>>>
>>>>
>>>> --
>>>>   You received this message because you are subscribed to the Google
>>>> Groups "Android Developers" group.
>>>> To post to this group, send email to
>>>> android-developers@googlegroups.com
>>>> To unsubscribe from this group, send email to
>>>> android-developers+unsubscr...@googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/android-developers?hl=en
>>>>
>>>
>>>   --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>   --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to