openwallet-foundation-labs / identity-credential

Apache License 2.0
169 stars 85 forks source link

If the BLE connection is lost after the 'State' characteristic is set to value '0x01', the mdoc still scans for the UUID #85

Open vaimut opened 2 years ago

vaimut commented 2 years ago

Expected Behavior

If the BLE connection is lost after the 'State' characteristic is set to value '0x01' then the mdoc should stop scanning for UUID and opens a new session if required as per ISO-18013-5

Actual Behavior

The mDoc is still in central client mode scanning for the UUID.

Steps to Reproduce the Problem

  1. Perform device engagement using QR code or NFC and set up BLE for device retrieval 2.Sending the device request message from the reader
  2. Disconnect the BLE connection immediately after sending the response from the holder

Specifications

davidz25 commented 2 years ago

Nice catch. Yes, this is something we should probably fix... the problem is that it's hard to test. I really wish we had some automatic test suites for the BLE code... been wanting to set up http://robolectric.org/ which can help with this...