Nearby Google Connections 2.0 sometimes ask for a Bluetooth pairing PIN

When testing Google Near Connections 2.0 using a view program in automatic mode, sometimes the device asks for a number to connect a Bluetooth pair. I saw two scenarios:

  • Only one device has a popup dialog with a request for output. Enter any data or release the dialog so that the connection fails.

  • Both devices have pop-up dialogs. One will ask you to set up a pin, and the other will ask you to insert a pin. After entering the PIN code, the connection was successful.

Senario 1 occurs more frequently.

How can I avoid this problem? I cannot find any information on the Connected Connections 2.0 SDK documentation.

I also see this error in my own application that uses Google Connections 2.0. The walkie-talkie sample program uses the P2P star strategy, while my application uses the P2P cluster strategy. Therefore, we see that the problem arises in both cases. I'd like to know:
(1) What causes this error?
(2) What (if anything) can the application receiving the error resolve it?
(3) If something needs to be done with physical devices in this situation, what would be a reasonable message for the user?

I found very little good technical documentation on the error conditions in Near Connections 2.0 and would love to see some. Therefore, even if no one can directly answer this specific question, I will consider the question of awarding the award with the best answer, which provides other technical information about the “Neighboring Connections” errors.

+7
android bluetooth google-nearby
source share
1 answer

After some testing, I believe this problem is related to the BLE advertising function. Here is what I did to minimize the problem:

We can roughly group Android devices into three groups:

  • Non-Bluetooth-BLE enabled devices
  • Bluetooth-BLE, but does not support BLE ads with API level 21.
  • Bluetooth-BLE with proper BLE ad support with API level 21.

When using Near Connections 2.0:

Group 1 is only suitable for searching and communicating with a device that is advertising

Group 2 can do advertising, but it's hard to judge how reliable it is.

Group 3 probably offers more reliable performance

For people who work with Connections Connections 2.0, I suggest you find out which of the three groups belongs to your devices. Using group 3 devices is preferred and minimizes the problem with Bluetooth.

PS: Always read the Google ad with caution.

0
source share

All Articles