If I read the doc correctly, I feel the current bluetooth api is meant to
supporting end-to-end communication that you implements both client and
remote server.  In this case, you must know a UUID for the service record
you creating and publish in SDDB.

For your and my case, we are connecting to a "well-known" service record,
SPP.  For any stack support SPP, I always find that record in SDDB, and I
also find the UUID is defined as a constant values in two other SDK I am
using.

Nick is right, if you are implementing your own remote server, do not use
this well-know UUID.  It pretty much defaults to namespace collision to a
well-know value.


On Tue, Nov 24, 2009 at 5:16 PM, Paul <paules...@gmail.com> wrote:

> > try this one:  00001101-0000-1000-8000-00805F9B34FB
>
> This got me somewhere. That is, Android tried to connect to the
> Bluetooth device but was unable to. I know that this is the 16-bit
> UUID for the serial port profile (0x1101) promoted to a 128-bit UUID.
> This is what I had initially tried but incorrectly converted.
>
> > Instead of allowing applications to choose there own RFCOMM channel, we
> > allow apps to pick a UUID instead...
>
> In my case, I am trying to connect to a Bluetooth device which I
> cannot assign a UUID to. All I know is that the device has a serial
> port service. I also do not know how to find the UUID of the device.
>
> Am I wrong in trying to connect to this device using the existing
> Android 2.0 Bluetooth API? It does not require pairing and can only
> communicate uses a serial port service (profile).
>
> Thanks,
> Paul
>
> On Nov 24, 4:45 pm, Nick Pelly <npe...@google.com> wrote:
> > No no no no :)
> >
> > Go to a uuid generator, and generate your own unique UUID for your
> > application. For example:http://www.uuidgenerator.com
> >
> > It can be any valid UUID, so long as you use the same UUID on both the
> > server and the client of your application.
> >
> > Instead of allowing applications to choose there own RFCOMM channel, we
> > allow apps to pick a UUID instead, which has a much lower chance of
> > namespace collisions (there are only 30 RFCOMM channels). Android will
> > automatically connect to the correct RFCOMM channel by looking up the
> UUID
> > in the service discovery database on the remote device.
> >
> > Nick
> >
> >
> >
> > On Tue, Nov 24, 2009 at 4:39 PM, Sean Liao <wirelessw...@gmail.com>
> wrote:
> > > try this one:  00001101-0000-1000-8000-00805F9B34FB
> >
> > > WIDCOM SDK and a C# SDK actually define the above constant value for
> > > SPP/RFCOMM
> >
> > > It seems work for me although I am having problem use the inputStream
> and
> > > outSteam out of the connection.
> >
> > > Hope it works for you.
> >
> > > On Tue, Nov 24, 2009 at 4:20 PM, Paul <paules...@gmail.com> wrote:
> >
> > >> Can someone explain how to use createRfcommSocketToServiceRecord? How
> > >> do I find out the UUID of the device I want to connect to?
> >
> > >> Thanks,
> > >> Paul
> >
> > >> --
> > >> 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<android-developers%2bunsubscr...@googlegroups.com><android-developers%2Bunsubs
> cr...@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<android-developers%2bunsubscr...@googlegroups.com><android-developers%2Bunsubs
> cr...@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<android-developers%2bunsubscr...@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