Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
Then I don't understand why it's failing to connect. Most of the error exception log messages point to either UUID is wrong or I'm not cancelling BluetoothAdapter discovery. I had looked back at the BluetoothChat SDK Sample, compared it with my codes, and see no significant differences other than that BluetoothChat has a Handler and I/O streams implemented. If BluetoothDevice is connected to the BluetoothServerSocket, BluetoothServerSocket has accepted the connection, I have to immediately close both the server socket and the socket, just like what BluetoothChat SDK Sample did? -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
Re-reading Android Reference, it said the UUID needs to be the same for both the server-side and the client-side. UUID.randomUUID() and BluetoothDevice.getUuids() are sure to fail. I hate it, but it looks like I need to set up to 7 constant (final) UUIDs without generating them at compile-time. Will report back once I have some results. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
Why is generating them and sticking them in your code bad? Why do you hate it? This is standard practice in many situations, so much that IDEs do it for you sometimes. Kris On Fri, Feb 15, 2013 at 5:28 AM, tom_mai78101 tom.mai78...@gmail.com wrote: Re-reading Android Reference, it said the UUID needs to be the same for both the server-side and the client-side. UUID.randomUUID() and BluetoothDevice.getUuids() are sure to fail. I hate it, but it looks like I need to set up to 7 constant (final) UUIDs without generating them at compile-time. Will report back once I have some results. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
Why is generating them and sticking them in your code bad? Why do you hate it? This is standard practice in many situations, so much that IDEs do it for you sometimes. I disliked having to generate them and stick them into my code, for fear of security. And I never recalled my IDE having to auto-generate UUIDs for me. Now that you mentioned this being a standard practice, I don't know what to say about it. I probably didn't know about it in the first place. As promised, the results are in. Yes, they work flawlessly. Yes, I hate to rewrite lots of code, including scrapping away a few files. And yes, I'm an idiot. :( -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
Bluetooth isn't really all that secure of a protocol... You have to instead implement that at the application layer. (Although you can read about Bluetooth encryption..) Generating UUIDs is standard practice used all over the place in more than Bluetooth: it's also used in many IDLs to identify interfaces uniquely. Your UUID is basically your app's signature (wrt Bluetooth), if it doesn't match you won't be able to connect. Kris On Fri, Feb 15, 2013 at 11:50 AM, tom_mai78101 tom.mai78...@gmail.com wrote: Why is generating them and sticking them in your code bad? Why do you hate it? This is standard practice in many situations, so much that IDEs do it for you sometimes. I disliked having to generate them and stick them into my code, for fear of security. And I never recalled my IDE having to auto-generate UUIDs for me. Now that you mentioned this being a standard practice, I don't know what to say about it. I probably didn't know about it in the first place. As promised, the results are in. Yes, they work flawlessly. Yes, I hate to rewrite lots of code, including scrapping away a few files. And yes, I'm an idiot. :( -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
Thanks for the info. I have now fully grasped the usage of UUIDs in an app. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
The UUID just says what port the Bluetooth Server is on. I could have a server running on Bluetooth port 1. Does this imply there's a way to specify different Bluetooth ports, if the port(s) exists? I have never heard of Bluetooth using ports like TCP. If you're just making an example, then please disregard this and above. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
That's not how it works: Bluetooth is built on top of RFCOMM, so it's more like a serial channel. It's merely presented with a socket like interface to wrap the behavior. Kris On Thu, Feb 14, 2013 at 4:56 AM, tom lee tom.mai78...@gmail.com wrote: The UUID just says what port the Bluetooth Server is on. I could have a server running on Bluetooth port 1. Does this imply there's a way to specify different Bluetooth ports, if the port(s) exists? I have never heard of Bluetooth using ports like TCP. If you're just making an example, then please disregard this and above. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
Yes, you can specify ports, but I think you may have to use Reflection on Android. This will give you a connection to port 17: *BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();* * * *BluetoothDevice device = adapter.getRemoteDevice(address);* * * *M**ethod m = device.getClass().getMethod(createInsecureRfcommSocket, new Class[] { int.class }); * * * *socket = (BluetoothSocket) m.invoke(device,Integer.valueOf(17));* * * *socket.connect();* On a Windows server, you would change BT_PORT_ANY to a number between 1 and 30. There is more info here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa362899(v=vs.85).aspx The valid range for requesting a specific RFCOMM port is 1 through 30. On Thursday, February 14, 2013 3:56:41 AM UTC-6, tom_mai78101 wrote: The UUID just says what port the Bluetooth Server is on. I could have a server running on Bluetooth port 1. Does this imply there's a way to specify different Bluetooth ports, if the port(s) exists? I have never heard of Bluetooth using ports like TCP. If you're just making an example, then please disregard this and above. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
So there is port emulation you can use if you use reflection, but it's kind of wacky and doesn't really work like vanilla TCP: so it's helpful not to think of it that way. You can read about it here: http://www.palowireless.com/infotooth/tutorial/rfcomm.asp#Port%20Emulation%20Entity%20:%20Serial%20Flow%20Control But still, in this example, I'm not sure why you'd want it? kris On Thu, Feb 14, 2013 at 10:10 AM, bob b...@coolfone.comze.com wrote: Yes, you can specify ports, but I think you may have to use Reflection on Android. This will give you a connection to port 17: BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); BluetoothDevice device = adapter.getRemoteDevice(address); Method m = device.getClass().getMethod(createInsecureRfcommSocket, new Class[] { int.class }); socket = (BluetoothSocket) m.invoke(device,Integer.valueOf(17)); socket.connect(); On a Windows server, you would change BT_PORT_ANY to a number between 1 and 30. There is more info here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa362899(v=vs.85).aspx The valid range for requesting a specific RFCOMM port is 1 through 30. On Thursday, February 14, 2013 3:56:41 AM UTC-6, tom_mai78101 wrote: The UUID just says what port the Bluetooth Server is on. I could have a server running on Bluetooth port 1. Does this imply there's a way to specify different Bluetooth ports, if the port(s) exists? I have never heard of Bluetooth using ports like TCP. If you're just making an example, then please disregard this and above. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
I don't think ports matter in this case. In fact, I don't need ports. Thanks anyway. *BEWARE: Wall of text* I have now narrowed down my problem, hopefully reaching a conclusion soon. I'm having trouble with fetching one single UUID for two devices to use. Here's a picture of what I have logged by using android.util.Log. http://i.imgur.com/t1QhdSk.png Here I have two devices, namely HTC #1 and HTC #2, both of them running Android 2.3.5. Each device has my app installed and debugged at the moment. The app fetches a UUID from the other remote device using reflection method, invoking Bluetooth.getUuids(). (i.e.: Device #1 fetches a UUID from Device #2, while Device #2 fetches a UUID from Device #1.) The UUID for both devices are shown in the red box. According to this answer here http://stackoverflow.com/a/14757884/1016891, it said I need to use the same UUID for use with BluetoothAdapter.listenUsingRfcommWithServiceRecord() and BluetoothDevice.createRfcommSocketToServiceRecord(). However, I realized that using the same UUID that was pre-fetched using BluetoothDevice.getUuids() w/ reflection for both BluetoothServerSocket.accept() and BluetoothSocket.connect() is wrong. Either I have to use UUID.randomUUID() or BluetoothDevice.getUuids() w/ reflection in order to obtain a UUID. It doesn't matter if it's randomly-generated, or fetched from a remote device, I have to obtain a UUID from some place, don't I? Below is the sectors of my application. The Accept and Connect sectors implement the Runnable interface. http://i.imgur.com/SsWMUwR.png It probably doesn't relate to the main problem at hand, but it shows how I was doing with the obtained UUID. The UUID is used in the Accept and Connect sectors, where it handles BluetoothServerSocket.accept() and BluetoothSocket.connect(), respectively. *Now, summarizing the narrowed problem: What can I do in order to obtain the same UUID for two devices? *The code below doesn't work: http://i.imgur.com/M5k0u5r.png The variable, localData, is null after executing. What am I after? I'm trying to obtain the same UUID from one device (i.e.: Device #1), in which all other devices (i.e.: Device #2, Device #3, etc.) can also fetch after, and use it to connect to the first device (i.e.: Device #1). -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
After extensive researching on the Bluetooth Chat example, it all comes down to using pre-determined UUIDs to connect to another device, the 1-to-1 way. However, that doesn't make it useful. I need to not rely on pre-determined UUIDs, so that I'm able to connect multiple devices together with Bluetooth, without having to generate as much UUIDs as possible. Have you ever tried doing non-deterministic UUID generation for Bluetooth connections, using UUID.randomUUID() or similar methods? -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
For many reasons, you really shouldn't be using non deterministic UUID generation: it just doesn't make sense as to why you'd need it. (Keep in mind, phones can only be connected to two or three other things at a time.) What's your real problem? I've had cases where I generate 10 UUIDs and then cycle through each in case one is taken, but never the case where I keep generating them. Kris On Wed, Feb 13, 2013 at 5:24 AM, tom lee tom.mai78...@gmail.com wrote: After extensive researching on the Bluetooth Chat example, it all comes down to using pre-determined UUIDs to connect to another device, the 1-to-1 way. However, that doesn't make it useful. I need to not rely on pre-determined UUIDs, so that I'm able to connect multiple devices together with Bluetooth, without having to generate as much UUIDs as possible. Have you ever tried doing non-deterministic UUID generation for Bluetooth connections, using UUID.randomUUID() or similar methods? -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
You just need one UUID for your app. Use it on the server and the clients. It basically tells the clients what Bluetooth port number on the server they need to connect to (from 1 to 31, I think). You can use the uuidgen tool on Mac. Here's a UUID I just made if you want it: uuidgen 068F39DC-7012-4497-85B6-BD5C25D6AE58 On Wednesday, February 13, 2013 4:24:19 AM UTC-6, tom_mai78101 wrote: After extensive researching on the Bluetooth Chat example, it all comes down to using pre-determined UUIDs to connect to another device, the 1-to-1 way. However, that doesn't make it useful. I need to not rely on pre-determined UUIDs, so that I'm able to connect multiple devices together with Bluetooth, without having to generate as much UUIDs as possible. Have you ever tried doing non-deterministic UUID generation for Bluetooth connections, using UUID.randomUUID() or similar methods? -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
That's actually not quite right: if you have your app make multiple connections then you do generally need multiple UUIDs. However, if you need only a single connection then sure. My point is that you should never need more than (theoretically) seven, as that's the size of a BT piconet. Kris On Wed, Feb 13, 2013 at 10:17 AM, bob b...@coolfone.comze.com wrote: You just need one UUID for your app. Use it on the server and the clients. It basically tells the clients what Bluetooth port number on the server they need to connect to (from 1 to 31, I think). You can use the uuidgen tool on Mac. Here's a UUID I just made if you want it: uuidgen 068F39DC-7012-4497-85B6-BD5C25D6AE58 On Wednesday, February 13, 2013 4:24:19 AM UTC-6, tom_mai78101 wrote: After extensive researching on the Bluetooth Chat example, it all comes down to using pre-determined UUIDs to connect to another device, the 1-to-1 way. However, that doesn't make it useful. I need to not rely on pre-determined UUIDs, so that I'm able to connect multiple devices together with Bluetooth, without having to generate as much UUIDs as possible. Have you ever tried doing non-deterministic UUID generation for Bluetooth connections, using UUID.randomUUID() or similar methods? -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
I have made multiple connections to a single UUID. It is like TCP. The UUID just says what port the Bluetooth Server is on. I could have a server running on Bluetooth port 1. Then I could make 2 or 3 simultaneous connections to it just like I can make 2 or 3 simultaneous connections to port 80 of Yahoo's web server. On Wednesday, February 13, 2013 10:31:39 AM UTC-6, Kristopher Micinski wrote: That's actually not quite right: if you have your app make multiple connections then you do generally need multiple UUIDs. However, if you need only a single connection then sure. My point is that you should never need more than (theoretically) seven, as that's the size of a BT piconet. Kris On Wed, Feb 13, 2013 at 10:17 AM, bob b...@coolfone.comze.comjavascript: wrote: You just need one UUID for your app. Use it on the server and the clients. It basically tells the clients what Bluetooth port number on the server they need to connect to (from 1 to 31, I think). You can use the uuidgen tool on Mac. Here's a UUID I just made if you want it: uuidgen 068F39DC-7012-4497-85B6-BD5C25D6AE58 On Wednesday, February 13, 2013 4:24:19 AM UTC-6, tom_mai78101 wrote: After extensive researching on the Bluetooth Chat example, it all comes down to using pre-determined UUIDs to connect to another device, the 1-to-1 way. However, that doesn't make it useful. I need to not rely on pre-determined UUIDs, so that I'm able to connect multiple devices together with Bluetooth, without having to generate as much UUIDs as possible. Have you ever tried doing non-deterministic UUID generation for Bluetooth connections, using UUID.randomUUID() or similar methods? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
I know it's *nominally* implemented this way, I'm just saying that hasn't been my experience across devices (bugs and all). Though take that with a grain of salt, my implementation was done over two years ago now, Kris On Wed, Feb 13, 2013 at 12:25 PM, bob b...@coolfone.comze.com wrote: I have made multiple connections to a single UUID. It is like TCP. The UUID just says what port the Bluetooth Server is on. I could have a server running on Bluetooth port 1. Then I could make 2 or 3 simultaneous connections to it just like I can make 2 or 3 simultaneous connections to port 80 of Yahoo's web server. On Wednesday, February 13, 2013 10:31:39 AM UTC-6, Kristopher Micinski wrote: That's actually not quite right: if you have your app make multiple connections then you do generally need multiple UUIDs. However, if you need only a single connection then sure. My point is that you should never need more than (theoretically) seven, as that's the size of a BT piconet. Kris On Wed, Feb 13, 2013 at 10:17 AM, bob b...@coolfone.comze.com wrote: You just need one UUID for your app. Use it on the server and the clients. It basically tells the clients what Bluetooth port number on the server they need to connect to (from 1 to 31, I think). You can use the uuidgen tool on Mac. Here's a UUID I just made if you want it: uuidgen 068F39DC-7012-4497-85B6-BD5C25D6AE58 On Wednesday, February 13, 2013 4:24:19 AM UTC-6, tom_mai78101 wrote: After extensive researching on the Bluetooth Chat example, it all comes down to using pre-determined UUIDs to connect to another device, the 1-to-1 way. However, that doesn't make it useful. I need to not rely on pre-determined UUIDs, so that I'm able to connect multiple devices together with Bluetooth, without having to generate as much UUIDs as possible. Have you ever tried doing non-deterministic UUID generation for Bluetooth connections, using UUID.randomUUID() or similar methods? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
I just tried. The connection is still refused. I don't think the result was affected by the timeout, since the timeout error was reported in the Logcat after the connection was reported to be refused first. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Android Bluetooth: I get Connection Refused after unpairing two devices, invoke user pairing, and accepting/listening connections.
Why not try the Bluetooth Chat Sample and see if that works? On Friday, February 8, 2013 4:22:06 AM UTC-6, tom_mai78101 wrote: I just tried. The connection is still refused. I don't think the result was affected by the timeout, since the timeout error was reported in the Logcat after the connection was reported to be refused first. -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.