cancel
Showing results for 
Search instead for 
Did you mean: 

NFC tag ST25DV64K reading throwing invalid parameter error

sahiljain
Associate II

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

 

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
10 REPLIES 10
victor laraison
ST Employee

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