2023-04-17 11:33 AM
In follow up to my earlier question on reading Mailbox Memory from our iOS app, we are trying to pass the Read Msg command, but looks like this needs address flag set and UID needs to be passed. But when we try to pass the address flag and UID along with "AC" read command code, we get Stack Error along with Invalid Parameters error.
Solved! Go to Solution.
2023-04-21 12:59 AM
Hi Rjaya2,
Thx for your feedback.
This is a minor bug into our UI for custom command. It is quite confusing, but when toggling the Address mode to "ON" in the UI, we force the non-addressed mode anyway.
In our code, we always assume that commands coming from user or ST25SDK stack are formated with the UID (addressed mode). And, when using the customCommand from iOS coreNFC, we remove the UID from data passed.
Ex :
UI custom command 22 AC 02 <UID> 02 00 02 => iOS Reader Interface remove UID => iOS coreNFC call custom command with code 0xAC and Data = 0x02 00 02
If the UID is not passed in the iOS ReaderInterface funtion, command is not formated well.
So consider, that in every case, we use the "non adressed mode". We must correct this behavior into our code. this is not your fault.
Carry on using addressed mode in custom command UI, and keep in mind that custom command will be executed in non-adressed in low level layer.
sorry for misunderstanding. Hope it clarifies a bit.
We are working on new release for fixing it.
Thx and br,
2023-04-18 01:38 AM
hi Rjaya2,
1- in iOScoreNFC, the custom command does not work in addressed mode. You have to remove the flag .address when calling customCommand function.
Issue is well known and raised to apple since many years....nothing done for correction so far.
2- I'm delivering a new source code in coming days in st.com web site. Stay tuned...It should contains latest changes.
3- in DS, please have a look in section 7.6.31 Write Message and Section
5.1: Fast transfer mode (FTM)
Hope it helps.
BR
2023-04-18 05:33 AM
Hi Victor,
Thanks for the response.
For item #1, in your latest version of iOS ST App, we are passing "AC" ReadMsg command to read the mailbox buffer. When we toggle the Address Mode to "ON", the command is successful (we can see the command includes the UID in your UI). When we toggle the Address Mode to "OFF", we see that your command does not include the UID and the response is also command not successful. In our case, when we pass the command both ways, we are seeing "Stack Error" from our custom command. So, would like to know how do you pass the "AC" command in your ST app in Custom Command section.
Scenarios:
22 AC 02 <UID> 02 00 02 - This command is successful in your ST App with addressed flag turned ON
02 AC 02 02 00 02 - This command returns failure in your ST app with address mode turned OFF
2023-04-21 12:59 AM
Hi Rjaya2,
Thx for your feedback.
This is a minor bug into our UI for custom command. It is quite confusing, but when toggling the Address mode to "ON" in the UI, we force the non-addressed mode anyway.
In our code, we always assume that commands coming from user or ST25SDK stack are formated with the UID (addressed mode). And, when using the customCommand from iOS coreNFC, we remove the UID from data passed.
Ex :
UI custom command 22 AC 02 <UID> 02 00 02 => iOS Reader Interface remove UID => iOS coreNFC call custom command with code 0xAC and Data = 0x02 00 02
If the UID is not passed in the iOS ReaderInterface funtion, command is not formated well.
So consider, that in every case, we use the "non adressed mode". We must correct this behavior into our code. this is not your fault.
Carry on using addressed mode in custom command UI, and keep in mind that custom command will be executed in non-adressed in low level layer.
sorry for misunderstanding. Hope it clarifies a bit.
We are working on new release for fixing it.
Thx and br,