AndroidBluetoothLibrary icon indicating copy to clipboard operation
AndroidBluetoothLibrary copied to clipboard

Does not work connect to device

Open daimonkor opened this issue 7 years ago • 7 comments

I can not connect two devices (current sample kotlin). http://prntscr.com/m12p6r

Tested https://github.com/ybenannoune/BluetoothPong works normal (used classic https://github.com/googlesamples/android-BluetoothChat/blob/master/Application/src/main/java/com/example/android/bluetoothchat/BluetoothChatService.java ) Thanks for help.

daimonkor avatar Dec 29 '18 18:12 daimonkor

I think that currently the library just support to connect one device. @douglasjunior could give you more details about that

jjrodcast avatar Dec 29 '18 18:12 jjrodcast

I think that currently the library just support to connect one device. @douglasjunior could give you more details about that

Yes, I tested server/client devices (first - server, second - client), can not connect

daimonkor avatar Dec 29 '18 20:12 daimonkor

@jjrodcast is right. The library was created to connect to devices like thermal printers, arduino, and others devices with serial communication.

douglasjunior avatar Dec 29 '18 20:12 douglasjunior

ok, step by step:

  1. compile and install sample kotlin on first device
  2. compile and install sample kotlin on second device
  3. start application at both devices
  4. start scan on first device
  5. turn to connect to my found device and shown toast with "NONE" message.

I used BluetoothClassicService.class, I found it is the same with bluetooth chat class and the same with my tested app (ping pong). But ping pong network part works, current library sample does not work. I removed apk, removed pairs, reboot devices, no work https://prnt.sc/m12p6r

daimonkor avatar Dec 29 '18 20:12 daimonkor

This is the problem, this library will not work with two smartphones, because this library not work in "server mode", only in "client mode".

douglasjunior avatar Dec 29 '18 23:12 douglasjunior

I am trying only connect two devices, classic scenario. I think that BluetoothClassicService.class confirm my idea. Tested the same service https://github.com/ybenannoune/BluetoothPong/blob/master/android/src/com/mygdx/game/BluetoothService.java and works normal. You are right http://prntscr.com/m15t9z . Yes, jabra bluetooth connected. Please provide server mode. Thanks for help.

daimonkor avatar Dec 29 '18 23:12 daimonkor

This is the problem, this library will not work with two smartphones, because this library not work in "server mode", only in "client mode".

It would be nice, if you could add that to the project description.

GPla avatar Nov 30 '19 11:11 GPla