lemonisdead Well-Known Member Licensed User Longtime User Mar 17, 2014 #1 Hi, I wonder if you already had such troubles : I am trying to connect to a Bluetooth device (a smartwatch) that seems to initiate the connection after having been previously paired. I say "seems" because when I try to use the serial connection, I get the famous "java.IOException:Service discovery failed". So, I arrived to the conclusion that the phone won't be able to connect directly to the smartwatch. But this was false because when you go to the Android's Bluetooth Preferences and click on the paired device, the phone connects. I have tried : connect2 and connect3 but I always get the Success to false To be really sure that this problem didn't come from my code, I have tried with Erel's Serial Sample too : http://www.b4x.com/android/forum/threads/android-serial-tutorial.6908/ and I've got the same error. Do you have any idea about this ? Many thanks Last edited: Mar 17, 2014
Hi, I wonder if you already had such troubles : I am trying to connect to a Bluetooth device (a smartwatch) that seems to initiate the connection after having been previously paired. I say "seems" because when I try to use the serial connection, I get the famous "java.IOException:Service discovery failed". So, I arrived to the conclusion that the phone won't be able to connect directly to the smartwatch. But this was false because when you go to the Android's Bluetooth Preferences and click on the paired device, the phone connects. I have tried : connect2 and connect3 but I always get the Success to false To be really sure that this problem didn't come from my code, I have tried with Erel's Serial Sample too : http://www.b4x.com/android/forum/threads/android-serial-tutorial.6908/ and I've got the same error. Do you have any idea about this ? Many thanks
Erel B4X founder Staff member Licensed User Longtime User Mar 17, 2014 #2 There are all kinds of Bluetooth profiles. I guess that this device doesn't support the SPP profile (serial port profile). Other profiles are handled by the OS. See this link: http://en.wikipedia.org/wiki/Bluetooth_profile Upvote 0
There are all kinds of Bluetooth profiles. I guess that this device doesn't support the SPP profile (serial port profile). Other profiles are handled by the OS. See this link: http://en.wikipedia.org/wiki/Bluetooth_profile
lemonisdead Well-Known Member Licensed User Longtime User Mar 17, 2014 #3 Many thanks for having pointed me to. I have contacted the reseller of the product and the protocol is HSP. Does this mean we don't have the way to connect to with B4A ? (I don't find the word HSP in the wiki). Thanks again Upvote 0
Many thanks for having pointed me to. I have contacted the reseller of the product and the protocol is HSP. Does this mean we don't have the way to connect to with B4A ? (I don't find the word HSP in the wiki). Thanks again
Erel B4X founder Staff member Licensed User Longtime User Mar 18, 2014 #4 The connection is not handled by B4A or your code in these cases. If the OS supports the profile then it will connect. You will not be able to manage the communication in your code. Upvote 0
The connection is not handled by B4A or your code in these cases. If the OS supports the profile then it will connect. You will not be able to manage the communication in your code.