LostSoul
LostSoul

Reputation: 401

ISO15693 - Tag connection lost on any read command - iOS 13

Im trying to send a readMultipleBlocks command to my ISO15693 tag, which works perfectly on android. Yet on iOS I always get a "Tag connection lost" error, I also tried readSingleBlock but the same error appeared.

My Tag is a ICODE SLIX2 conforming to the ISO15693 specification.

I had this error on android aswell if I didn't include my tag ID into the addressed read command. But using iOS I cannot create my own custom commands but have to use apple's ISO15693Tag interface. I have no way of actually checking what the raw command looks like that the iOS device is sending.

Here is the custom command I used on android sending it via the transieve(byte[] command) method:

          0x20, // Addressed Flag
          0x23, // Command: Read multiple blocks
          0x00, // TAG UID placeholder
          0x00, // TAG UID placeholder
          0x00, // TAG UID placeholder
          0x00, // TAG UID placeholder
          0x00, // TAG UID placeholder
          0x00, // TAG UID placeholder
          0x00, // TAG UID placeholder
          0x00, // TAG UID placeholder
          0x00, // First block (offset)
          0x08  // Number of blocks to read

Sadly there exists no documentation at all about the ISO15693Tag's readMultipleBlock command. The documention on the ISO15693Tag's readSingleBlock command states that the address flag is used by default and the tag's id is included into the command. But again there is no way of checking this.

Here is a snipped of the swift code:

        guard let connectedTech = techs[handle] as? NFCISO15693Tag else {
            result(FlutterError(code: "not_found", message: "Tag is not found.", details: nil))
            return
        }

        connectedTech.readMultipleBlocks(requestFlags: [.address], blockRange: NSMakeRange(0, 8)) { data, error in
            if let error = error {
                result(error.toFlutterError())
                return
            }

            result(data)
        }

The tag is casted as a ISO15693Tag without a problem, but as soon as I send the readMultipleBlocks command the "Tag connection lost" exception appears.

Anyone has dealt with this too and has any advice. It seems really dumb to me that one cannot create your own command like in Android using a byte array.

Any help would be appreciated.

Upvotes: 2

Views: 1621

Answers (0)

Related Questions