Device disconnect when starting the app


#1

When starting Scanner app with connected Structure device we are getting “Sensor disconnected” and the only way to recover from it is to disconnect & connect back the cable.

Is it possible to other-come this problem?

2018-01-31 12:50:23.600932+0200 Scanner[2852:410315] [DYMTLInitPlatform] platform initialization successful
2018-01-31 12:50:23.724812+0200 Scanner[2852:410135] [ApplicationLifecycle] Windows were created before application initialzation completed. This may result in incorrect visual appearance.
2018-01-31 12:50:23.725448+0200 Scanner[2852:410135] +[CATransaction synchronize] called within transaction
2018-01-31 12:50:24.531421+0200 Scanner[2852:410135] Metal GPU Frame Capture Enabled
2018-01-31 12:50:24.533882+0200 Scanner[2852:410135] Metal API Validation Enabled
2018-01-31 12:50:26.371485+0200 Scanner[2852:410135] eaAccessory CoreAccessoryPrimaryUUID = BE22769C-B022-4C0C-94D2-3C6356027089
2018-01-31 12:50:26.400131+0200 Scanner[2852:410135] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-01-31 12:50:26.400918+0200 Scanner[2852:410135] [MC] Reading from public effective user settings.
Could not open log fileHOST INFO    2018-01-31 12:50:26.770                          :411  StructureCore_InitBootId                 StructureCore Init
2018-01-31 12:50:26.835684+0200 Scanner[2852:410135] Unspecified amount of protocols offered
2018-01-31 12:50:26.835779+0200 Scanner[2852:410135] Accessory model number (ST01) not equal to Expected SC number (ST02)
2018-01-31 12:50:26.840987+0200 Scanner[2852:410392] accessoryd sessionResult = 1, useSocketInterace = 1, sessionID = 0x4
2018-01-31 12:50:26.844931+0200 Scanner[2852:410392] ERROR - opening session failed
2018-01-31 12:50:26.844975+0200 Scanner[2852:410392] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c4006100 and sessionID=65536
2018-01-31 12:50:26.845180+0200 Scanner[2852:410392] ERROR - opening session failed
2018-01-31 12:50:26.845204+0200 Scanner[2852:410392] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c4006100 and sessionID=65536
2018-01-31 12:50:27.099620+0200 Scanner[2852:410392] ERROR - opening session failed
2018-01-31 12:50:27.099665+0200 Scanner[2852:410392] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c4006100 and sessionID=65536
2018-01-31 12:50:27.099742+0200 Scanner[2852:410392] ERROR - opening session failed
2018-01-31 12:50:27.099815+0200 Scanner[2852:410392] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c4006100 and sessionID=65536
2018-01-31 12:50:27.354958+0200 Scanner[2852:410392] ERROR - opening session failed
2018-01-31 12:50:27.354998+0200 Scanner[2852:410392] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c4006100 and sessionID=65536
2018-01-31 12:50:27.355063+0200 Scanner[2852:410392] ERROR - opening session failed
2018-01-31 12:50:27.355085+0200 Scanner[2852:410392] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c4006100 and sessionID=65536
2018-01-31 12:50:27.610221+0200 Scanner[2852:410392] ERROR - opening session failed
2018-01-31 12:50:27.610259+0200 Scanner[2852:410392] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c4006100 and sessionID=65536
2018-01-31 12:50:27.610304+0200 Scanner[2852:410392] ERROR - opening session failed
2018-01-31 12:50:27.610324+0200 Scanner[2852:410392] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c4006100 and sessionID=65536
2018-01-31 12:50:27.610400+0200 Scanner[2852:410392] Removing EASession 50CB8F8A-8CDE-4564-B76A-039AB6420CA4 from list of sessionUUIDs
2018-01-31 12:50:27.615178+0200 Scanner[2852:410135] Not authorized to use the camera!
2018-01-31 12:50:27.615562+0200 Scanner[2852:410135] Error during streaming start: (null)
2018-01-31 12:50:27.616071+0200 Scanner[2852:410135] CoreAccessories accessoryInfo for departure = {
    ACCExternalAccessoryPrimaryUUID = "BE22769C-B022-4C0C-94D2-3C6356027089";
    IAPAppAccessoryCapabilitiesKey = 1;
    IAPAppAccessoryDockTypeKey = "";
    IAPAppAccessoryFirmwareRevisionKey = "2.0";
    IAPAppAccessoryFirmwareRevisionPendingKey = "<null>";
    IAPAppAccessoryHardwareRevisionKey = "1.0";
    IAPAppAccessoryManufacturerKey = Occipital;
    IAPAppAccessoryModelNumberKey = ST01;
    IAPAppAccessoryNameKey = "Structure Sensor";
    IAPAppAccessoryProtocolsKey =     {
        "io.structure.control" = 0;
        "io.structure.depth" = 2;
        "io.structure.infrared" = 1;
    };
    IAPAppAccessorySerialNumberKey = 30335;
    IAPAppAccessoryVehicleInfoInitialDataKey =     {
    };
    IAPAppConnectionIDKey = 45320883;
}

**** Getting disconnected error ***** 

2018-01-31 12:50:27.617558+0200 Scanner[2852:410135] [Structure] Sensor disconnected!

*** disconnecting and connecting back structure cable ****
2018-01-31 12:50:30.005129+0200 Scanner[2852:410135] CoreAccessories accessoryInfo for arrival = {
    ACCExternalAccessoryPrimaryUUID = "16774800-CFE3-4D9B-BD45-9328C2018905";
    IAPAppAccessoryCapabilitiesKey = 1;
    IAPAppAccessoryCertDataKey = "908 bytes";
    IAPAppAccessoryCertSerialNumberKey = "15 bytes";
    IAPAppAccessoryDockTypeKey = "";
    IAPAppAccessoryFirmwareRevisionKey = "2.0";
    IAPAppAccessoryFirmwareRevisionPendingKey = "<null>";
    IAPAppAccessoryHardwareRevisionKey = "1.0";
    IAPAppAccessoryManufacturerKey = Occipital;
    IAPAppAccessoryModelNumberKey = ST01;
    IAPAppAccessoryNameKey = "Structure Sensor";
    IAPAppAccessoryProtocolsKey =     {
        "io.structure.control" = 0;
        "io.structure.depth" = 2;
        "io.structure.infrared" = 1;
    };
    IAPAppAccessorySerialNumberKey = 30335;
    IAPAppAccessoryVehicleInfoInitialDataKey =     {
    };
    IAPAppConnectionIDKey = 42578228;
}
2018-01-31 12:50:30.005261+0200 Scanner[2852:410135] eaAccessory CoreAccessoryPrimaryUUID = 16774800-CFE3-4D9B-BD45-9328C2018905
2018-01-31 12:50:30.006559+0200 Scanner[2852:410135] Unspecified amount of protocols offered
2018-01-31 12:50:30.006738+0200 Scanner[2852:410135] Accessory model number (ST01) not equal to Expected SC number (ST02)
2018-01-31 12:50:30.007835+0200 Scanner[2852:410135] CoreAccessories accessoryInfo for arrival = {
    ACCExternalAccessoryPrimaryUUID = "16774800-CFE3-4D9B-BD45-9328C2018905";
    IAPAppAccessoryCapabilitiesKey = 1;
    IAPAppAccessoryCertDataKey = "908 bytes";
    IAPAppAccessoryCertSerialNumberKey = "15 bytes";
    IAPAppAccessoryDockTypeKey = "";
    IAPAppAccessoryFirmwareRevisionKey = "2.0";
    IAPAppAccessoryFirmwareRevisionPendingKey = "<null>";
    IAPAppAccessoryHardwareRevisionKey = "1.0";
    IAPAppAccessoryManufacturerKey = Occipital;
    IAPAppAccessoryModelNumberKey = ST01;
    IAPAppAccessoryNameKey = "Structure Sensor";
    IAPAppAccessoryProtocolsKey =     {
        "io.structure.control" = 0;
        "io.structure.depth" = 2;
        "io.structure.infrared" = 1;
    };
    IAPAppAccessorySerialNumberKey = 30335;
    IAPAppAccessoryVehicleInfoInitialDataKey =     {
    };
    IAPAppConnectionIDKey = 42578228;
}
2018-01-31 12:50:30.007958+0200 Scanner[2852:410135] eaAccessory CoreAccessoryPrimaryUUID = 16774800-CFE3-4D9B-BD45-9328C2018905
2018-01-31 12:50:30.008151+0200 Scanner[2852:410135] Unspecified amount of protocols offered
2018-01-31 12:50:30.008212+0200 Scanner[2852:410135] Accessory model number (ST01) not equal to Expected SC number (ST02)
2018-01-31 12:50:31.258711+0200 Scanner[2852:410503] accessoryd sessionResult = 1, useSocketInterace = 1, sessionID = 0x1
2018-01-31 12:50:31.268351+0200 Scanner[2852:410503] [CoreAcc ExternalAccessory] XPC connection error: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.accessories.externalaccessory-server" UserInfo={NSDebugDescription=connection to service named com.apple.accessories.externalaccessory-server}
2018-01-31 12:50:31.268521+0200 Scanner[2852:410503] ERROR - opening session failed
2018-01-31 12:50:31.268589+0200 Scanner[2852:410503] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c80036e0 and sessionID=65536
2018-01-31 12:50:31.268842+0200 Scanner[2852:410503] ERROR - opening session failed
2018-01-31 12:50:31.268898+0200 Scanner[2852:410503] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c80036e0 and sessionID=65536
2018-01-31 12:50:31.524932+0200 Scanner[2852:410503] ERROR - opening session failed
2018-01-31 12:50:31.524977+0200 Scanner[2852:410503] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c80036e0 and sessionID=65536
2018-01-31 12:50:31.525021+0200 Scanner[2852:410503] ERROR - opening session failed
2018-01-31 12:50:31.525040+0200 Scanner[2852:410503] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c80036e0 and sessionID=65536
2018-01-31 12:50:31.776868+0200 Scanner[2852:410503] ERROR - opening session failed
2018-01-31 12:50:31.776913+0200 Scanner[2852:410503] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c80036e0 and sessionID=65536
2018-01-31 12:50:31.776964+0200 Scanner[2852:410503] ERROR - opening session failed
2018-01-31 12:50:31.776986+0200 Scanner[2852:410503] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c80036e0 and sessionID=65536
2018-01-31 12:50:32.032049+0200 Scanner[2852:410503] ERROR - opening session failed
2018-01-31 12:50:32.032093+0200 Scanner[2852:410503] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c80036e0 and sessionID=65536
2018-01-31 12:50:32.032137+0200 Scanner[2852:410503] ERROR - opening session failed
2018-01-31 12:50:32.032156+0200 Scanner[2852:410503] ERROR - /BuildRoot/Library/Caches/com.apple.xbs/Sources/ExternalAccessory/ExternalAccessory-383.30.1/EASession.m:-[EASession dealloc] - 190 unable to close session for _accessory=0x1c80036e0 and sessionID=65536
2018-01-31 12:50:32.032221+0200 Scanner[2852:410503] Removing EASession F18EE631-811B-4378-A698-68B067CDD3BB from list of sessionUUIDs
2018-01-31 12:50:32.033361+0200 Scanner[2852:410135] Error during streaming start: (null)
2018-01-31 12:50:32.038875+0200 Scanner[2852:410135] CoreAccessories accessoryInfo for departure = {
    ACCExternalAccessoryPrimaryUUID = "16774800-CFE3-4D9B-BD45-9328C2018905";
    IAPAppAccessoryCapabilitiesKey = 1;
    IAPAppAccessoryDockTypeKey = "";
    IAPAppAccessoryFirmwareRevisionKey = "2.0";
    IAPAppAccessoryFirmwareRevisionPendingKey = "<null>";
    IAPAppAccessoryHardwareRevisionKey = "1.0";
    IAPAppAccessoryManufacturerKey = Occipital;
    IAPAppAccessoryModelNumberKey = ST01;
    IAPAppAccessoryNameKey = "Structure Sensor";
    IAPAppAccessoryProtocolsKey =     {
        "io.structure.control" = 0;
        "io.structure.depth" = 2;
        "io.structure.infrared" = 1;
    };
    IAPAppAccessorySerialNumberKey = 30335;
    IAPAppAccessoryVehicleInfoInitialDataKey =     {
    };
    IAPAppConnectionIDKey = 42578228;
}
2018-01-31 12:50:32.039000+0200 Scanner[2852:410135] [Structure] Sensor disconnected!
2018-01-31 12:51:20.245267+0200 Scanner[2852:410135] CoreAccessories accessoryInfo for arrival = {
    ACCExternalAccessoryPrimaryUUID = "6304A285-2F61-4107-936E-B7E21C7D32B3";
    IAPAppAccessoryCapabilitiesKey = 1;
    IAPAppAccessoryCertDataKey = "908 bytes";
    IAPAppAccessoryCertSerialNumberKey = "15 bytes";
    IAPAppAccessoryDockTypeKey = "";
    IAPAppAccessoryFirmwareRevisionKey = "2.0";
    IAPAppAccessoryFirmwareRevisionPendingKey = "<null>";
    IAPAppAccessoryHardwareRevisionKey = "1.0";
    IAPAppAccessoryManufacturerKey = Occipital;
    IAPAppAccessoryModelNumberKey = ST01;
    IAPAppAccessoryNameKey = "Structure Sensor";
    IAPAppAccessoryProtocolsKey =     {
        "io.structure.control" = 0;
        "io.structure.depth" = 2;
        "io.structure.infrared" = 1;
    };
    IAPAppAccessorySerialNumberKey = 30335;
    IAPAppAccessoryVehicleInfoInitialDataKey =     {
    };
    IAPAppConnectionIDKey = 35665772;
}
2018-01-31 12:51:20.245420+0200 Scanner[2852:410135] eaAccessory CoreAccessoryPrimaryUUID = 6304A285-2F61-4107-936E-B7E21C7D32B3
2018-01-31 12:51:20.247494+0200 Scanner[2852:410135] Unspecified amount of protocols offered
2018-01-31 12:51:20.247624+0200 Scanner[2852:410135] Accessory model number (ST01) not equal to Expected SC number (ST02)
2018-01-31 12:51:20.247754+0200 Scanner[2852:410135] [Structure] Sensor connected!
2018-01-31 12:51:20.258876+0200 Scanner[2852:410851] accessoryd sessionResult = 1, useSocketInterace = 1, sessionID = 0x1
2018-01-31 12:51:20.264483+0200 Scanner[2852:410851] accessoryd sessionResult = 1, useSocketInterace = 1, sessionID = 0x2
2018-01-31 12:51:20.268529+0200 Scanner[2852:410851] accessoryd sessionResult = 1, useSocketInterace = 1, sessionID = 0x3
2018-01-31 12:51:21.332298+0200 Scanner[2852:410135] [Structure] Streaming started.

New Project, Sensor Connect after Resign Active, iOS 11.2.6
#2

We have seen this issue before and are working on a solution, however, it seems that it stems from iOS 11 directly. Until we figure out a solution, however, you can get your Structure Sensor to work by disconnecting and reconnecting it again.

You can find a longer discussion about this topic here: iOS 11 - connecting to Structure sensor takes longer + sensor doesn't connect after app was backgrounded


#3