MIFARE_ULTRALIGHT(3)

✨ NAME ✨

mifare_ultralight_connect, mifare_ultralight_disconnect, mifare_ultralight_read, mifare_ultralight_write β€” Mifare UltraLight Manipulation Functions πŸ’…

okay bestie, gather round, because this is the manual page for the Mifare UltraLight manipulation functions and honestly? it's giving "small but mighty" πŸ¦‹


πŸ“š LIBRARY πŸ“š

Mifare card manipulation library (libfreefare, -lfreefare)

like, that's the whole vibe. you want these functions, you link the lib. iykyk 🌸


πŸŽ€ SYNOPSIS πŸŽ€

#include <freefare.h>

int
mifare_ultralight_connect(MifareTag tag);

int
mifare_ultralight_disconnect(MifareTag tag);

int
mifare_ultralight_read(MifareTag tag,
    const MifareUltralightPageNumber page, MifareUltralightPage *data);

int
mifare_ultralight_write(MifareTag tag,
    const MifareUltralightPageNumber page,
    const MifareUltralightPage data);

four functions, one header, zero drama (well, mostly). copy that #include <freefare.h> first or the compiler will simply not know her πŸ’€


πŸ’– DESCRIPTION πŸ’–

The mifare_ultralight_*() functions allows management of Mifare UltraLight tags. so like, the whole squad of them β€” connect, disconnect, read, write β€” they handle your tag's whole little life cycle 🫢

The mifare_ultralight_connect() function activates the specified tag. that's the "hey bestie, wake up" moment ⭐

A page of data can be read from a tag using mifare_ultralight_read(), and written using mifare_ultralight_write(). reading = peeking at a page, writing = changing a page. no cap, that's it πŸ“–

After usage, a tag is deactivated using mifare_ultralight_disconnect(). please, please do this. leaving tags activated is not the main character energy we're going for πŸ™ˆ


🌈 RETURN VALUES 🌈

Unless stated otherwise, all functions return a value greater than or equal to 0 on success or -1 on failure.

so: >= 0 = slay, -1 = not slay. check it every time, fr fr πŸ’―


πŸ‘€ SEE ALSO πŸ‘€

freefare(3)

go read that one too, it's the rest of the lore ✨


πŸ‘‘ AUTHORS πŸ‘‘

  • Romain Tartiere <romain@blogreen.org>
  • Romuald Conty <romuald@libnfc.org>

the icons who built this. absolute legends, we stan πŸ’œ


and that's a wrap!! this page is from the Debian crew, dated March 30, 2010, and it lives under the name MIFARE_ULTRALIGHT(3) β€” go forth and manipulate those UltraLight tags responsibly, bestie πŸŽ€βœ¨