cancel
Showing results for 
Search instead for 
Did you mean: 

Read multiple blocks iOS - Request Flags

DMugg.1
Associate II

iOS (ISO15693RequestFlag) doesn't have a inventory_flag. How do I get data without the inventory_flag?

UID: E0 02 26 00 A7 3B 33 B6

my Command:

04 23 B6 33 3B A7 00 26 02 E0 A5 04

What exact request flags do I have to set?

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

Hi

Inventory_flag is intended to be used for Inventory command (code = 01h), not for read command.

For Read multiple blocks command (code =23h) in addressed mode (i.e. with UID parameter in the request), the Address_flag (bit 6) shall be set to 1. Usually Data_rate_flag (b2) is also set to 1 (High data rate shall be used):

b8 b7 b6 b5 b4 b3 b2 b1
 0  0  1  0  0  0  1  0
                      0   Sub-carrier_flag: A single sub-carrier frequency shall be used by the VICC
                   1 Data_rate_flag: High data rate shall be used
                0 Inventory_flag: Flags 5 to 8 meaning is according to table 4
             0 Protocol Extension_flag: No protocol format extension
          0 Select_flag
       1 Address_flag Request is addressed. UID field is included
    0 Option_flag
 0 RFU

For further information on request flags, see ISO/IEC 15693-3.

See as well https://community.st.com/s/question/0D50X0000CBlUz2SQF/about-ios-13-extendedreadmultipleblocks-command for limitation on Extended Read Multiple Blocks.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

9 REPLIES 9
Brian TIDAL
ST Employee

Hi

Inventory_flag is intended to be used for Inventory command (code = 01h), not for read command.

For Read multiple blocks command (code =23h) in addressed mode (i.e. with UID parameter in the request), the Address_flag (bit 6) shall be set to 1. Usually Data_rate_flag (b2) is also set to 1 (High data rate shall be used):

b8 b7 b6 b5 b4 b3 b2 b1
 0  0  1  0  0  0  1  0
                      0   Sub-carrier_flag: A single sub-carrier frequency shall be used by the VICC
                   1 Data_rate_flag: High data rate shall be used
                0 Inventory_flag: Flags 5 to 8 meaning is according to table 4
             0 Protocol Extension_flag: No protocol format extension
          0 Select_flag
       1 Address_flag Request is addressed. UID field is included
    0 Option_flag
 0 RFU

For further information on request flags, see ISO/IEC 15693-3.

See as well https://community.st.com/s/question/0D50X0000CBlUz2SQF/about-ios-13-extendedreadmultipleblocks-command for limitation on Extended Read Multiple Blocks.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
DMugg.1
Associate II

Thanks that helped alot, it now works on android with:

22 23 B6 33 3B A7 00 26 02 E0 A5 04

But on iOS i still can't get data with a custom command what I do:

        Set<ISO15693RequestFlag> requestFlags = new Set();
        requestFlags.add(ISO15693RequestFlag.highDataRate);
        requestFlags.add(ISO15693RequestFlag.address);
 
        Uint8List command = new Uint8List(10);
        command[0] = (182);
        command[1] = (51);
        command[2] = (59);
        command[3] = (167);
        command[4] = (0);
        command[5] = (38);
        command[6] = (2);
        command[7] = (224);
        command[8] = (165);
        command[9] = (4);
        Uint8List response = await iso15693.customCommand(requestFlags: requestFlags, commandCode: 23, parameters: command);
        debugPrint('Response: ' +  response.toString());

should be the same as: 22 23 B6 33 3B A7 00 26 02 E0 A5 04

right?

but i always get:

"Invalid Parameters" & "custom Command code must be between 0xA0 to 0xDF"

Brian TIDAL
ST Employee

Hi,

from ISO/IEC 15693-3 standpoint, Read Multiple Blocks command is not a custom command but an optional command. 4 sets of commands are defined:

  • 01h - 1Fh: Mandatory commands
  • 20h - 9Fh: Optional commands
  • A0h - DFh: Custom commands
  • E0h - FFh: Proprietary commands

I would suggest you try first to use a Read Single Block command (20h).

What is version of iOS being used?

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
DMugg.1
Associate II

Same error with Read Single Block command (20h), well it's Flutter but deployed over xcode (iOS 13.3)

Still "Invalid Parameters" & "custom Command code must be between 0xA0 to 0xDF" from NFCCore of Apple.

Brian TIDAL
ST Employee

Hi,

can you elaborate on the API being used on your side to send the Read Single Block? See https://developer.apple.com/documentation/corenfc/nfciso15693tag and

func readSingleBlock

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
victor laraison
ST Employee

​Hi DMugg,

I'm in charge of developing iOS NFC Tap for our ST25 NFC products.

Regarding custom command, it is NOT possible today to use the iOS Core NFC Custom Command with ".addressed" flag. Otherwise, you wil get an error.

We have raised an issue to Apple, but it is sitll in the pipe...Hope it will be fixed in newer version, but not done yet.

So, for Custom Command ONLY, you must NOT use .adressed flag, and so, don't pass UID in the command parameters.

For all the other comands of iOS COre NFC 15693, there is no issue regarding flags. You can use both : addressed or non addressed flags.

Regarding issue you got with readSingleBlock, please, could you send me hte exact command sent ?

Hope it clarifies.

Br,

VL  

DMugg.1
Associate II

Hi Victor,

I can only use customCommand on ISO15693 so it's not possible to use read multiple blocks or read single block with the customCommand of iOS Core NFC 15693?

So I HAVE TO use https://developer.apple.com/documentation/corenfc/nfciso15693tag/3043810-readsingleblock ?

Brian TIDAL
ST Employee

Hi

Can you elaborate on why you can use only customCommand ? Again, Read Single Block (20h) and Read Multiple Blocks (23h) are not custom commands (20h < A0h same for 23h)

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
DMugg.1
Associate II

Oh yeah right of course. Thanks for the help, its limited by the plugin. So I have to use Read Sinlge and Multiple Block from iOS