![]() ![]() While this sounds complicated, JABWT's connection APIs hide the details. Static String SERVICEUUIDSTRING = 'C25DEA986354FCD69FC6A4' static UUID SERVICEUUID = new UUID( SERVICEUUIDSTRING, false ) static String SERVICENAME = 'Battlecruiser' // human-readable static String SERVICEURL = 'btspp://localhost:' + SERVICEUUID + ' name=' + SERVICENAME To advertise its availability, a client must create a service record with this specific service UUID. The UUIDGEN program on my MacBook does exactly that, and I've determined that Battlecruiser's service UUID shall be 'C25D5973-8B78-48EA-9863-54FCD69FC6A4'. Applying some simple algorithms to the generation of the UUID, incorporating the current time and the network address of your computer, for instance, practically guarantees that the UUID is truly unique. ![]() A UUID is basically an arbitrary number, and because they can be very large, just picking one at random gives a very good chance of getting a number no other Bluetooth developer in the galaxy is using.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |