cancel
Showing results for 
Search instead for 
Did you mean: 

Lock write access on ST25DV04K using ST25R3916

cmsilva
Visitor

I'm fairly new in NFC technology and was trying to implement a simple project that uses the ST25R3916 to write a message in a specific memory location of the ST25DV04K and then locks write access to that specific memory location. I'm using an adapted version of the library "en.x-cube-nfc6". I can read/write messages without any problem, but when I can't seem to find any function in the library to block the write access that works. I'm using  "ndefPollerWriteBytes(ndefContext *ctx, uint32_t offset, const uint8_t *buf, uint32_t len)" to write, which works fine, butif I try to use "ndefPollerSetReadOnly(ndefContext *ctx)", it returns error 33 "Wrong State". Am I doing something wrong? Should I use different functions? I'll append a picture of my code, which stems from the demo usage of the library. The purpuse of the code was to write 4 bytes, lock access then try to write again (which sould fail, I guess).

code.jpeg

0 REPLIES 0