JohanDegraeve / xdripswift

xdrip for iOS, written in Swift
GNU General Public License v3.0
327 stars 320 forks source link

Failed to scan Libre 2 #428

Closed CDBridger closed 1 year ago

CDBridger commented 1 year ago

I captured logs from my phone from the moment I try and scan as well as the screen that is shown on failure. Not sure what else I can provide to help debug this issue.

Setup:

iPhone 12 Mini (iOS 16.3.1) Libre 2 LibreLink successful scan + results LibreLink has Bluetooth permission disabled

Attempted on Shuggah as well as xdrip4ios built from source (same error).

EDIT: This happens every time, it is not an intermittent issue (and I have no idea why the logs say Tag not connected).

default 15:17:58.905550+1300    xdrip   -[NFCTagReaderSession <private>]:245 Current connectedTag: None
default 15:17:58.906800+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:58.9060 4.11.0 4183 categoryLibreNFC 15:17:58 NFC: did detect tags
default 15:17:58.912810+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:58.9080 4.11.0 4183 categoryLibreNFC 15:17:58 NFC: connecting to tag
default 15:17:58.947295+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:58.9440 4.11.0 4183 categoryLibreNFC 15:17:58 NFC:     - tag response OK, now let's get systemInfo and patchInfo
default 15:17:58.947441+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:58.9460 4.11.0 4183 categoryLibreNFC 15:17:58 NFC: reading tag info
default 15:17:58.962359+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:58.9580 4.11.0 4183 categoryLibreNFC 15:17:58 NFC:     calling 0xA1 before getting sytemInfo
default 15:17:58.976274+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:58.9750 4.11.0 4183 categoryLibreNFC 15:17:58 NFC:     getting tag sytemInfo
default 15:17:58.980429+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:58.9790 4.11.0 4183 categoryLibreNFC 15:17:58 NFC:     getting tag patchInfo, retry attempt # 0/10
default 15:17:58.995245+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:58.9910 4.11.0 4183 categoryLibreNFC 15:17:58 NFC:     systemInfo and patchInfo retrieved. Let's try and process them.
default 15:17:59.006422+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0060 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#0 - #2): Tag response error
default 15:17:59.007922+1300    xdrip   -[NFCTagReaderSession <private>]:957 code=200, finalUIState=2, activateCallback=0
default 15:17:59.019535+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0190 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#3 - #5): Tag response error
error   15:17:59.101381+1300    xdrip   -[NFCTagReaderSession <private>]:879 Error Domain=NFCError Code=100 UserInfo={NSLocalizedDescription=<private>, NSUnderlyingError=0x2822a7450 {Error Domain=nfcd Code=54 UserInfo={NSLocalizedDescription=<private>}}}
default 15:17:59.101629+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0750 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#6 - #8): Stack Error
default 15:17:59.102133+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0770 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#9 - #11): Tag is not connected
default 15:17:59.102278+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0790 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#12 - #14): Tag is not connected
default 15:17:59.102611+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0810 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#15 - #17): Tag is not connected
default 15:17:59.102921+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0820 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#18 - #20): Tag is not connected
default 15:17:59.105057+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0840 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#21 - #23): Tag is not connected
default 15:17:59.105921+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0850 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#24 - #26): Tag is not connected
default 15:17:59.107053+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0860 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#27 - #29): Tag is not connected
default 15:17:59.107628+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0880 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#30 - #32): Tag is not connected
default 15:17:59.108321+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0890 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#33 - #35): Tag is not connected
default 15:17:59.108876+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0900 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#36 - #38): Tag is not connected
default 15:17:59.109318+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0920 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#39 - #41): Tag is not connected
default 15:17:59.110246+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0930 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading multiple blocks (#42 - #42): Tag is not connected
default 15:17:59.111505+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0950 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: IC identifier: e007a400074fc1a3
default 15:17:59.112237+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0970 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: IC manufacturer code: 7 (Texas Instruments)
default 15:17:59.112931+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0980 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: IC serial number: a400074fc1a3
default 15:17:59.113147+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.0990 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: RF430TAL160H Libre 2 A4 ROM
default 15:17:59.114140+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1000 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: IC reference: 0x-1
default 15:17:59.114325+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1010 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: memory size: 256
default 15:17:59.114554+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1010 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: block size: 8
default 15:17:59.115329+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1020 4.11.0 4183 Libre2                         15:17:59 new sensor detected :  0MH00FLY1MD
default 15:17:59.115808+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1020 4.11.0 4183 RootView                       15:17:59 new sensor detected
default 15:17:59.116170+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1030 4.11.0 4183 Libre2                         15:17:59 patchInfo received :  76093904957e
default 15:17:59.116429+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1030 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: sensorUID: a3c14f0700a407e0
default 15:17:59.116553+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1040 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: patchInfo: 76093904957e
default 15:17:59.117125+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1040 4.11.0 4183 Libre2                         15:17:59 received fram :
default 15:17:59.117727+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1050 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: sending 0x179 0x07 0x60f80c command (libre 2 read raw)
default 15:17:59.118633+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1060 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading 12 words at raw memory 0x63584
default 15:17:59.119947+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1060 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: dump of Tag is not connected
default 15:17:59.120140+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1070 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: sending 0x179 0x07 0x001a0c command (libre 2 read raw)
default 15:17:59.121493+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1080 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading 12 words at raw memory 0x6656
default 15:17:59.126940+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1080 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: dump of Tag is not connected
default 15:17:59.128623+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1080 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: sending 0x179 0x07 0xacff0c command (libre 2 read raw)
default 15:17:59.129553+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1090 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: error while reading 12 words at raw memory 0x65452
default 15:17:59.130728+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1100 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: dump of Tag is not connected
default 15:17:59.136464+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1110 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: sending Libre 2 command to enable BLE streaming : code: 0xA1, parameters: 0x1e2a00000099dedf34unlock code: 42
default 15:17:59.143163+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1120 4.11.0 4183 categoryLibreNFC 15:17:59 NFC: 'enable BLE streaming command response 0 bytes : 0x, error: Tag is not connected
default 15:17:59.144753+1300    xdrip   xDrip-NSLog 2023-03-10 15:17:59.1120 4.11.0 4183 Libre2                         15:17:59 received streaming enabled message from NFC with result unsuccessful
default 15:18:01.819737+1300    xdrip   -[NFCTagReaderSession <private>]:224 sessionState=5, proxy=YES
default 15:18:01.819966+1300    xdrip   xDrip-NSLog 2023-03-10 15:18:01.8120 4.11.0 4183 categoryLibreNFC 15:18:01 NFC: user cancelled the NFC scan
default 15:18:01.820207+1300    xdrip   xDrip-NSLog 2023-03-10 15:18:01.8140 4.11.0 4183 categoryLibreNFC 15:18:01 NFC: passing NFC scan error to the delegate
default 15:18:01.820689+1300    xdrip   xDrip-NSLog 2023-03-10 15:18:01.8140 4.11.0 4183 Libre2                         15:18:01 received NFC scan result from NFC with result unsuccessful
error   15:18:01.821902+1300    xdrip   in observeValue, nfcScanFailed has been set to true so will disconnect and offer to scan again
default 15:18:01.821965+1300    xdrip   xDrip-NSLog 2023-03-10 15:18:01.8170 4.11.0 4183 blePeripheralViewController    15:18:01 in observeValue, nfcScanFailed has been set to true so will disconnect and offer to scan again
error   15:18:01.834069+1300    xdrip   in observeValue, nfcScanFailed has been set to true so will disconnect and offer to scan again
default 15:18:01.834306+1300    xdrip   xDrip-NSLog 2023-03-10 15:18:01.8330 4.11.0 4183 blePeripheralViewController    15:18:01 in observeValue, nfcScanFailed has been set to true so will disconnect and offer to scan again
default 15:18:01.840873+1300    xdrip   Override focusSystemState: (ENABLED) for reason(s): {(
    "<_UIAlertControllerPhoneTVMacView 0x106813a00>"
)}
default 15:18:01.869987+1300    xdrip   _willShowAlertController: <UIAlertController: 0x106083000>
default 15:18:01.870022+1300    xdrip   _addAlertControllerToStack: Adding Alert to stack : <UIAlertController: 0x106083000>
default 15:18:01.870059+1300    xdrip   Reloading input views for: <UIAlertController: 0x106083000> force: 0
default 15:18:02.161570+1300    xdrip   sceneOfRecord: sceneID: sceneID:com.alty.xdripswift-default  persistentID: 8F927FD3-8092-4799-AA63-30219E34D697
default 15:18:02.209455+1300    xdrip   sceneOfRecord: sceneID: sceneID:com.alty.xdripswift-default  persistentID: 8F927FD3-8092-4799-AA63-30219E34D697
default 15:18:02.209486+1300    xdrip   Deactivation reason removed: 12; deactivation reasons: 36864 -> 32768; animating application lifecycle event: 0
default 15:18:02.210174+1300    xdrip   Deactivation reason removed: 15; deactivation reasons: 32768 -> 0; animating application lifecycle event: 0
default 15:18:02.210206+1300    xdrip   App did become active
default 15:18:02.225610+1300    xdrip   sceneOfRecord: sceneID: sceneID:com.alty.xdripswift-default  persistentID: 8F927FD3-8092-4799-AA63-30219E34D697
default 15:18:02.225763+1300    xdrip   [0x2807b57a0] Scene target of event deferring environments did update: scene: 0x105509c70; current systemShellManagesKeyboardFocus: 1; systemShellManagesKeyboardFocusForScene: 1; eligibleForRecordRemoval: 1;
default 15:18:02.225887+1300    xdrip   Scene became target of keyboard event deferring environment: UIWindowScene: 0x105509c70; scene identity: com.apple.frontboard.systemappservices::FBSceneManager:sceneID%3Acom.alty.xdripswift-default
error   15:18:02.367886+1300    xdrip   Attempt to present <UIAlertController: 0x10600ea00> on <xdrip.TabBarViewController: 0x10602e200> (from <xdrip.BluetoothPeripheralViewController: 0x114016c00>) which is already presenting <UIAlertController: 0x106083000>.
default 15:19:28.671953+1300    xdrip   Evaluating dispatch of UIEvent: 0x2817bc5b0; type: 0; subtype: 0; backing type: 11; shouldSend: 1; ignoreInteractionEvents: 0, systemGestureStateChange: 0
default 15:19:28.672039+1300    xdrip   Sending UIEvent type: 0; subtype: 0; to windows: 1
default 15:19:28.672101+1300    xdrip   Sending UIEvent type: 0; subtype: 0; to window: <UIWindow: 0x1055105c0>; contextId: 0x1A050819
default 15:19:29.117892+1300    xdrip   Evaluating dispatch of UIEvent: 0x2817bc5b0; type: 0; subtype: 0; backing type: 11; shouldSend: 1; ignoreInteractionEvents: 0, systemGestureStateChange: 0
default 15:19:29.118033+1300    xdrip   Sending UIEvent type: 0; subtype: 0; to windows: 1
default 15:19:29.118155+1300    xdrip   Sending UIEvent type: 0; subtype: 0; to window: <UIWindow: 0x1055105c0>; contextId: 0x1A050819
default 15:19:29.135646+1300    xdrip   Evaluating dispatch of UIEvent: 0x2817bc5b0; type: 0; subtype: 0; backing type: 11; shouldSend: 1; ignoreInteractionEvents: 0, systemGestureStateChange: 0
default 15:19:29.135740+1300    xdrip   Sending UIEvent type: 0; subtype: 0; to windows: 1
default 15:19:29.135807+1300    xdrip   Sending UIEvent type: 0; subtype: 0; to window: <UIWindow: 0x1055105c0>; contextId: 0x1A050819
default 15:19:29.165328+1300    xdrip   sceneOfRecord: sceneID: sceneID:com.alty.xdripswift-default  persistentID: 8F927FD3-8092-4799-AA63-30219E34D697
default 15:19:29.165447+1300    xdrip   Deactivation reason added: 0; deactivation reasons: 0 -> 1; animating application lifecycle event: 1
default 15:19:29.166160+1300    xdrip   App will resign active
default 15:19:29.166359+1300    xdrip   Deactivation reason added: 12; deactivation reasons: 1 -> 4097; animating application lifecycle event: 1
default 15:19:29.170125+1300    xdrip   Evaluating dispatch of UIEvent: 0x2817bc5b0; type: 0; subtype: 0; backing type: 11; shouldSend: 1; ignoreInteractionEvents: 0, systemGestureStateChange: 0
default 15:19:29.170267+1300    xdrip   Sending UIEvent type: 0; subtype: 0; to windows: 1
default 15:19:29.170296+1300    xdrip   Sending UIEvent type: 0; subtype: 0; to window: <UIWindow: 0x1055105c0>; contextId: 0x1A050819
default 15:19:30.816272+1300    xdrip   Evaluating dispatch of UIEvent: 0x2817bc5b0; type: 0; subtype: 0; backing type: 11; shouldSend: 0; ignoreInteractionEvents: 0, systemGestureStateChange: 0
default 15:19:30.820487+1300    xdrip   sceneOfRecord: sceneID: sceneID:com.alty.xdripswift-default  persistentID: 8F927FD3-8092-4799-AA63-30219E34D697
default 15:19:30.820517+1300    xdrip   Deactivation reason removed: 12; deactivation reasons: 4097 -> 1; animating application lifecycle event: 1
default 15:19:30.821392+1300    xdrip   Deactivation reason removed: 0; deactivation reasons: 1 -> 0; animating application lifecycle event: 0
default 15:19:30.821420+1300    xdrip   App did become active
default 15:19:30.828835+1300    xdrip   sceneOfRecord: sceneID: sceneID:com.alty.xdripswift-default  persistentID: 8F927FD3-8092-4799-AA63-30219E34D697
default 15:19:31.253561+1300    xdrip   sceneOfRecord: sceneID: sceneID:com.alty.xdripswift-default  persistentID: 8F927FD3-8092-4799-AA63-30219E34D697
default 15:19:31.280713+1300    xdrip   sceneOfRecord: sceneID: sceneID:com.alty.xdripswift-default  persistentID: 8F927FD3-8092-4799-AA63-30219E34D697
default 15:19:32.080291+1300    xdrip   sceneOfRecord: sceneID: sceneID:com.alty.xdripswift-default  persistentID: 8F927FD3-8092-4799-AA63-30219E34D697
default 15:19:32.408471+1300    xdrip   sceneOfRecord: sceneID: sceneID:com.alty.xdripswift-default  persistentID: 8F927FD3-8092-4799-AA63-30219E34D697
default 15:19:32.426121+1300    xdrip   Change to input view set: (null)

IMG_2466

CDBridger commented 1 year ago

I found some more details about my Libre 2 using app called DiaBLE which I also built from source.

image

image

CDBridger commented 1 year ago

image

CDBridger commented 1 year ago

Ah the issue is that my sensor is Libre 2 CA.

Would I be able to find out why Libre 2 CA is not supported?

CDBridger commented 1 year ago

Hi @gui-dos how do I go about viewing/seeing these announcements by LibreHack?