We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Olá a todos
Alguém teria um exemplo funcional de como gravar em cartão NFC informando uma senha?
Tentei o exemplo que a PagSeguro enviou, ele compila e roda na POS sem problema, mas se eu informar uma senha a POS bipa repetidamente e retorna erro.
Exemplo que estou me baseando:
private val timeout = 5 // seconds private val demoSlot = 0 private val charsetUTF8 = Charset.forName("UTF-8") private val DEFAULT_KEY_NFC = byteArrayOf( 0x01.toByte(), 0x02.toByte(), 0x03.toByte(), 0x04.toByte(), 0x05.toByte(), 0x06.toByte() )
// len = 16 private val demoText = arrayOf( "_TESTANDO_1_2_3_".toByteArray(charsetUTF8), "demo_text 02 ".toByteArray(charsetUTF8), "demo_text 03".toByteArray(charsetUTF8) )
val cardData = PlugPagNearFieldCardData().apply { startSlot = demoSlot endSlot = demoSlot slots[demoSlot]["pwd"] = DEFAULT_KEY_NFC slots[demoSlot]["data"] = demoText[0] timeOutRead = timeout }
val write = plugpag.writeToNFCCard(cardData)
Se eu deixar a DEFAULT_KEY_NFC como byte[6] 0xFF a gravação ocorre sem problemas
Se alguém puder ajudar eu serei eternamente grato.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Olá a todos
Alguém teria um exemplo funcional de como gravar em cartão NFC informando uma senha?
Tentei o exemplo que a PagSeguro enviou, ele compila e roda na POS sem problema, mas se eu informar uma senha a POS bipa repetidamente e retorna erro.
Exemplo que estou me baseando:
private val timeout = 5 // seconds
private val demoSlot = 0
private val charsetUTF8 = Charset.forName("UTF-8")
private val DEFAULT_KEY_NFC = byteArrayOf(
0x01.toByte(),
0x02.toByte(),
0x03.toByte(),
0x04.toByte(),
0x05.toByte(),
0x06.toByte()
)
val cardData = PlugPagNearFieldCardData().apply {
startSlot = demoSlot
endSlot = demoSlot
slots[demoSlot]["pwd"] = DEFAULT_KEY_NFC
slots[demoSlot]["data"] = demoText[0]
timeOutRead = timeout
}
Se eu deixar a DEFAULT_KEY_NFC como byte[6] 0xFF a gravação ocorre sem problemas
Se alguém puder ajudar eu serei eternamente grato.
The text was updated successfully, but these errors were encountered: