Hmm... If only you had an expensive imaging device somewhere that you
could use :)
Yes, all the gear, no idea ;)
Connecting in nRF and sending the wrong PIN results in the same behaviour, so there is a connection failed message on the camera which then is replaced by the no device connected screen as per the sequence when doing it from the Pixl.
This is an nRF session where I connect and put in the wrong PIN and then re-connect and put in the correct PIN
nRF Connect, 2019-02-04
Pocket Cinema Camera 4K A:1C2 (90:FD:9F:B8:CA:37)
D 18:46:51.954 gatt.close()
D 18:46:51.957 wait(200)
V 18:46:52.158 Connecting to 90:FD:9F:B8:CA:37...
D 18:46:52.158 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE)
D 18:46:52.406 [Server callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 18:46:52.406 [Server] Device with address 90:FD:9F:B8:CA:37 connected
I 18:46:52.406 [Server] MTU changed to 64
D 18:46:52.453 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 18:46:52.453 Connected to 90:FD:9F:B8:CA:37
D 18:46:52.457 wait(1600ms)
D 18:46:52.484 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
V 18:46:54.072 Discovering services...
D 18:46:54.072 gatt.discoverServices()
D 18:46:54.087 [Callback] Services discovered with status: 0
I 18:46:54.087 Services discovered
V 18:46:54.115 Generic Access (0x1800)
- Device Name [R] (0x2A00)
- Appearance [R] (0x2A01)
Device Information (0x180A)
- Manufacturer Name String [R] (0x2A29)
- Model Number String [R] (0x2A24)
Unknown Service (291d567a-6d75-11e6-8b77-86f30ca893d3)
- Unknown Characteristic [W] (5dd3465f-1aee-4299-8493-d2eca2f8e1bb)
- Unknown Characteristic [I] (b864e140-76a0-416a-bf30-5876504537d9)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N] (6d8f2110-86f1-41bf-9afb-451d87e976c8)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N R W] (7fe8691d-95dc-4fc5-8abd-ca74339b51b9)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [W] (ffac0c52-c9fb-41a0-b063-cc76282eb89c)
- Unknown Characteristic [R] (8f1fd018-b508-456f-8f82-3d392bee2706)
D 18:46:54.116 gatt.setCharacteristicNotification(b864e140-76a0-416a-bf30-5876504537d9, true)
D 18:46:54.119 gatt.setCharacteristicNotification(6d8f2110-86f1-41bf-9afb-451d87e976c8, true)
D 18:46:54.122 gatt.setCharacteristicNotification(7fe8691d-95dc-4fc5-8abd-ca74339b51b9, true)
V 18:47:09.481 Writing request to characteristic 5dd3465f-1aee-4299-8493-d2eca2f8e1bb
D 18:47:09.481 gatt.writeCharacteristic(5dd3465f-1aee-4299-8493-d2eca2f8e1bb, value=0xFF04000000010000)
D 18:47:09.904 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_BONDING (11)
D 18:47:09.920 [Broadcast] Action received: android.bluetooth.device.action.PAIRING_REQUEST, pairing variant: PAIRING_VARIANT_PIN (0)
D 18:47:18.238 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_NONE (10)
I 18:47:18.238 Bonding failed
D 18:47:21.182 [Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I 18:47:21.182 [Server] Device disconnected
D 18:47:21.196 [Callback] Connection state changed with status: 22 and new state: DISCONNECTED (0)
E 18:47:21.197 Error 22 (0x16): GATT CONN TERMINATE LOCAL HOST
I 18:47:21.197 Disconnected
D 18:47:21.290 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
D 18:47:48.789 gatt.close()
D 18:47:48.791 wait(200)
V 18:47:48.992 Connecting to 90:FD:9F:B8:CA:37...
D 18:47:48.992 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE)
D 18:47:49.292 [Server callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 18:47:49.292 [Server] Device with address 90:FD:9F:B8:CA:37 connected
I 18:47:49.292 [Server] MTU changed to 64
D 18:47:49.400 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
D 18:47:49.400 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
I 18:47:49.400 Connected to 90:FD:9F:B8:CA:37
V 18:47:49.422 Discovering services...
D 18:47:49.422 gatt.discoverServices()
D 18:47:50.038 [Callback] Services discovered with status: 0
I 18:47:50.039 Services discovered
V 18:47:50.062 Generic Access (0x1800)
- Device Name [R] (0x2A00)
- Appearance [R] (0x2A01)
Device Information (0x180A)
- Manufacturer Name String [R] (0x2A29)
- Model Number String [R] (0x2A24)
Unknown Service (291d567a-6d75-11e6-8b77-86f30ca893d3)
- Unknown Characteristic [W] (5dd3465f-1aee-4299-8493-d2eca2f8e1bb)
- Unknown Characteristic [I] (b864e140-76a0-416a-bf30-5876504537d9)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N] (6d8f2110-86f1-41bf-9afb-451d87e976c8)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [N R W] (7fe8691d-95dc-4fc5-8abd-ca74339b51b9)
Client Characteristic Configuration (0x2902)
- Unknown Characteristic [W] (ffac0c52-c9fb-41a0-b063-cc76282eb89c)
- Unknown Characteristic [R] (8f1fd018-b508-456f-8f82-3d392bee2706)
D 18:47:50.062 gatt.setCharacteristicNotification(b864e140-76a0-416a-bf30-5876504537d9, true)
D 18:47:50.065 gatt.setCharacteristicNotification(6d8f2110-86f1-41bf-9afb-451d87e976c8, true)
D 18:47:50.068 gatt.setCharacteristicNotification(7fe8691d-95dc-4fc5-8abd-ca74339b51b9, true)
V 18:48:01.291 Writing request to characteristic 5dd3465f-1aee-4299-8493-d2eca2f8e1bb
D 18:48:01.291 gatt.writeCharacteristic(5dd3465f-1aee-4299-8493-d2eca2f8e1bb, value=0xFF04000000010000)
D 18:48:01.778 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_BONDING (11)
D 18:48:01.778 [Broadcast] Action received: android.bluetooth.device.action.PAIRING_REQUEST, pairing variant: PAIRING_VARIANT_PIN (0)
D 18:48:12.993 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_BONDED (12)
I 18:48:12.994 Device bonded
I 18:48:13.021 Data written to 5dd3465f-1aee-4299-8493-d2eca2f8e1bb, value: (0x) FF-04-00-00-00-01-00-00
A 18:48:13.021 "(0x) FF-04-00-00-00-01-00-00" sent
V 18:48:19.171 [Server] Cancelling server connection...
D 18:48:19.171 server.cancelConnection(device)
V 18:48:19.179 Disconnecting...
D 18:48:19.179 gatt.disconnect()
D 18:48:19.191 [Callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I 18:48:19.191 Disconnected
D 18:48:20.229 [Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I 18:48:20.229 [Server] Device disconnected
D 18:48:20.259 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
Changing the NRF.setSecurity doesn't change the behaviour and the PIN prompt will only be invoked on the camera and the passkeyRequest triggered if startBonding is included.
I changed the Write function so that it retains the startBonding but doesn't disconnect after writing to the characteristic. This leaves the PIN prompt up on the camera in the waiting state so gives me a chance to then pass the PIN to it but again it invokes the connection failure on the camera.
With the behaviour being identical by passing the wrong PIN when connected through nRF it does appear to point to the the problem being the PIN being mangled on its way from the Pixl.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, all the gear, no idea ;)
Connecting in nRF and sending the wrong PIN results in the same behaviour, so there is a connection failed message on the camera which then is replaced by the no device connected screen as per the sequence when doing it from the Pixl.
This is an nRF session where I connect and put in the wrong PIN and then re-connect and put in the correct PIN
Changing the NRF.setSecurity doesn't change the behaviour and the PIN prompt will only be invoked on the camera and the passkeyRequest triggered if startBonding is included.
I changed the Write function so that it retains the startBonding but doesn't disconnect after writing to the characteristic. This leaves the PIN prompt up on the camera in the waiting state so gives me a chance to then pass the PIN to it but again it invokes the connection failure on the camera.
With the behaviour being identical by passing the wrong PIN when connected through nRF it does appear to point to the the problem being the PIN being mangled on its way from the Pixl.