Skip to main content
Visitor II
January 18, 2022
Solved

Handing the WTX frame correctly

  • January 18, 2022
  • 1 reply
  • 1116 views

Hello,

I would like to verify if my approach to handling the WTX S-block over I2C is correct.

Currently when I send "update binary" command with data field longer than 2 bytes I receive the S(WTX) frame in response, which is expected.

The command is:

x03 x00 xD6 x00 x3E x06 xF1 xF2 xF3 xF4 xF5 xF6 xB5 x81 (send)

The received frame is:

xF2 x02 x0A x72 (recv)

Immediately after receiving this frame I stop reading the I2C further, wait for 9.6*2 ms and send identical frame as a response:

wait(9.6*2 ms)

xF2 x02 x0A x72 (send)

Then I still attempt to read the R-APDU for "update binary" however nothing is received from the I2C.

The data gets properly written as the I am able to confirm with "read binary".

So, my question is - should I still expect the normal R-APDU for "update binary" if the WTX is received? I'm quite sure this is the case, just need a sanity check :)

Thanks,

Chris

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    Hi Chris,

    I guess your question is related to the M24SR. In that case, I would recommend to base application developments on top of X-CUBE-NFC1 package.

    If I am not wrong, the R-APDU for Update Binary is sent as a response to the S(WTX) sent by the host. Can you try to remove the wait(9.6*2 ms) and to send the S(WTX) just after the received S(WTX) and then poll for I2C readiness with a timeout large enough (let say 200ms) and read the response?

    Rgds

    BT

    1 reply

    Technical Moderator
    January 18, 2022

    Hi Chris,

    I guess your question is related to the M24SR. In that case, I would recommend to base application developments on top of X-CUBE-NFC1 package.

    If I am not wrong, the R-APDU for Update Binary is sent as a response to the S(WTX) sent by the host. Can you try to remove the wait(9.6*2 ms) and to send the S(WTX) just after the received S(WTX) and then poll for I2C readiness with a timeout large enough (let say 200ms) and read the response?

    Rgds

    BT