2023-10-26 12:42 PM - edited 2023-11-01 10:52 AM
I am trying to do extended read multiple blocks using the following iOS code:
var blocksToRead: UInt8 = 64
// Create the command data
let cmd: [UInt8] = [
0x20, // Flags (0x20 -> read)
0x33, // Extended Read Multiple Blocks
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Tag ID bytes
0x00, 0x00, // Block number bytes
0x00, 0x00 // Number of blocks to read bytes
]
// Convert the command array to Data
let cmdData = Data(cmd)
iso15693Tag.customCommand(requestFlags: RequestFlag(rawValue: 0x20), customCommandCode: 0x33, customRequestParameters: Data(cmd)) {
(response: Data, error: Error?)
in // Handle response and errors similar to Android logic
if let error = error {
print("Transceive Error: \(error)") return
}
// Use response data for further processing
}
getting the following error:
Transceive Error: invalid parameter
Solved! Go to Solution.
2023-12-05 07:37 AM
hi again sahiljain,
I tested your code ScanNFCViewcontroller.txt in my iOS App, and all seems to be working fine.
I have just replaced the retryConnection function by session.restartPolling instead of tag.connect, printed the block number at each reading and added an action on button hit.
I let you see the code sample here attached.
Hope it helps.
Br