revtel / react-native-nfc-manager

React Native NFC module for Android & iOS
MIT License
1.33k stars 317 forks source link

How is the UID formatted? #668

Closed Lixus closed 7 months ago

Lixus commented 10 months ago

I need to compare the UID of a tag that i get from this library with the UID of the same tag from a python script, but the values are different. How is the UID formatted? I guess it's also an array originally that is formatted to be readable?

I'm using your library like this:

await NfcManager.requestTechnology([NfcTech.Ndef])
const tag = await NfcManager.getTag()
const id = tag.id // UID is 0451AAC3790000

And in my Python script the UID is:

[136, 4, 81, 170, 119] // bytes
880451AA77 // as a hex string

No matter how i try to convert the numbers, i don't get them to match. Any help would be much appreciated!

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 7 months ago

This issue was closed because it has been stalled for 5 days with no activity.