Argon/Xenon - Particle App 2.3.{6,7} Android - Spins during pairing

The logs should appear only during the time the BLE connection is established. If USB Serial doesn’t seem to produce any logging output, can I ask you to try collecting it from Serial1 using USB-to-UART adapter or using another device with a simple passthrough app?

SYSTEM_MODE(MANUAL);

void setup() {
    Serial.begin();
    Serial1.begin(115200);
    while (true) {
        while (Serial1.available() > 0 && Serial.availableForWrite() > 0) {
            Serial.write(Serial1.read());
        }
    }
}

With just the app:
0000000020 [hal.ble] TRACE: RAM start: 0x20004200
0000000026 [hal.ble] TRACE: Fast advertising mode started
Based on this, the phone isn’t even trying to connect.

If I exit the app and try a normal android pair, I get this:
0000069125 [hal.ble] TRACE: Connected
0000069125 [hal.ble] TRACE: Requesting connection interval: 24 x 1.25 ms
0000069337 [hal.ble] WARN: Authentication failed, status: 133
0000069630 [hal.ble] TRACE: Connection interval updated: 6 x 1.25 ms
0000069746 [hal.ble] TRACE: Connection interval updated: 24 x 1.25 ms
0000072294 [hal.ble] TRACE: Fast advertising mode started
0000072295 [hal.ble] TRACE: Disconnected

I wonder if the particle app isn’t able to see the list of discovered BT devices and can’t initiate a pairing.

@2a719e4488 when you get the 2.3.8 version of the Android app (just released – if you don’t have access now, you should soon), can you share your app logs with the new log sharing feature? It’s on the main screen, under the “three dots” menu.

-snip-
12-13 14:01:08.978 I/io.particle.mesh.bluetooth.scanning.BLEScannerLD( 2319): Starting scan!
12-13 14:01:08.978 I/io.particle.mesh.bluetooth.scanning.BLEScannerLD( 2319): Starting scan!
12-13 14:01:08.983 D/BluetoothAdapter( 2319): STATE_ON
12-13 14:01:08.987 D/BluetoothLeScanner( 2319): onClientRegistered() - status=0 clientIf=5
~45 seconds elapse
-snip-

Should I post the whole dump to this thread, or send it elsewhere?

Turns out location is mandatory for this phone to pair with any mesh device. Although the app requests access to location, if denied it won’t warn you later when you try and set up a new device.

Also looks like bluetooth scanning needs more than just a coarse location:
12-13 13:35:11.691 I/ScanCodeFragment(28926): Permission is granted: android.permission.CAMERA
12-13 13:35:11.691 I/ScanCodeFragment(28926): Permission is granted: android.permission.ACCESS_COARSE_LOCATION

Thanks a lot to Andrey and Jens for taking the time to dig into this, apologies that I didn’t catch this mistake sooner.

Big thanks to @2a719e4488 for working w/me on this and updating the thread with the solution.

I thought I recalled getting some kind of error in the past when scanning without location services, but apparently not! I’ll add a check for this in the next release of the app.