Well, I got over my SWD programming issues with a Cypress PSoC 4 BLE CYBLE-012011-00 SMT module.
Why do they make life so complicated?
https://www.eevblog.com/forum/microcontrollers/cant-get-swd-working-on-psoc4-ble-module/I can now program (and verify) the module.
I'm using two examples directly and unedited from the Cypress examples, BLE HID keyboard, BLE HID mouse. Since an HID keyboard has more security concerns than some random GATT you are not allowed to write an app to interact directly with HID BLE. Normally you pair and let the system take over from there. On Android there is even a GUI slider for "Use as input device". But I can't make it pair. I can see the device in "pair new device" but clicking pair just makes it wobble then settle down. There's no indication of error. I've looked in logcat and can't find anything. Windows 10 doesn't even seem to notice the device.
So, I went for my third OS, Raspberry Pi and bluetoothctl. I can see my device in scan. I can trust it. I try pairing and get:
[CHG] Device 00:A0:50:17:13:6C Connected: yes
[CHG] Device 00:A0:50:17:13:6C Connected: no
[CHG] Device 00:A0:50:17:13:6C Connected: yes
[BLE Mouse]# pair 00:A0:50:17:13:6C
Attempting to pair with 00:A0:50:17:13:6C
[CHG] Device 00:A0:50:17:13:6C Connected: no
Failed to pair: org.bluez.Error.AuthenticationCanceled
[CHG] Device 00:A0:50:17:13:6C Connected: yes
[CHG] Device 00:A0:50:17:13:6C Connected: no
[CHG] Device 00:A0:50:17:13:6C Connected: yes
The debug UART out of the module just says this in a loop:
CYBLE_EVT_ADVERTISING
CYBLE_EVT_GATT_CONNECT_IND: 0, 4
CYBLE_EVT_GAP_DEVICE_CONNECTED: connIntv = 48 ms
CYBLE_EVT_AUTH_FAILED: 6
CYBLE_EVT_GATT_DISCONNECT_IND
CYBLE_EVT_GAP_DEVICE_DISCONNECTED: 5
How is it that a $1 Chinese selfie clicker can get this right and I can't?
[NEW] Device FF:FF:43:0F:62:9A AB Shutter3
[bluetooth]# trust FF:FF:43:0F:62:9A
[CHG] Device FF:FF:43:0F:62:9A Trusted: yes
Changing FF:FF:43:0F:62:9A trust succeeded
[bluetooth]# pair FF:FF:43:0F:62:9A
Attempting to pair with FF:FF:43:0F:62:9A
[CHG] Device FF:FF:43:0F:62:9A Connected: yes
Request authorization
[agent] Accept pairing (yes/no): yes
... services, etc ...
[CHG] Device FF:FF:43:0F:62:9A Paired: yes
The GAP security settings are as they came in the example, although I've tried a bunch of others.
I also have the EZ-Serial in binary form and that programs and pairs perfectly.