Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
ghedeon
Posts: 4
Registered: ‎03-13-2012
My Device: BlackBerrry 9930
Accepted Solution

NFC Mifare card emulation

The question is extremely simple:
Is it possible to emulate Mifare (Classic 1k/UltraLight) card?

 

Preconditions:

BB 9930 , API 7.0

Postconditions:

An external reader detects my device as Mifare card.

 

Thanks.

Please use plain text.
New Contributor
ghedeon
Posts: 4
Registered: ‎03-13-2012
My Device: BlackBerrry 9930

Re: NFC Mifare card emulation

Well, it seems that the question isn't so simple...

Please use plain text.
Developer
paulkayuk
Posts: 133
Registered: ‎04-30-2010
My Device: Curve 8520

Re: NFC Mifare card emulation

The extremely simple answer is Mifare Classic 1k, NO; Mifare Ultralight, YES.
Please use plain text.
New Contributor
ghedeon
Posts: 4
Registered: ‎03-13-2012
My Device: BlackBerrry 9930

Re: NFC Mifare card emulation

Thank you for your quick response, paulkayuk! Let's concentrate on Mifare Ultralight. Do you have any idea(example) how to do this?

I've tried Virtual Target Emulation sample, but the automatically generated UID is 4 bytes one, and the Mifare UL's UID is 7 bytes one. As far as I know, I can't handle how the serial number is generated. Is it true?

Please use plain text.
Developer
paulkayuk
Posts: 133
Registered: ‎04-30-2010
My Device: Curve 8520

Re: NFC Mifare card emulation

I was working on Tag Emulation yesterday, based on the Virtual target Emulation sample, and took a look at the various constructors for VirtualNDEFTag, and used the message + callback constructor as in the sample.  I couldn't see an obvious use (yet) for the constructors which also specify TechnologyType and UID.  No doubt down-the-road I will find a necessary use case, but with the simpler constructor my virtual tags are being recognised by other BlackBerries, Android, and an ACR122 USB reader, and that satisfied my immediate requirement.

Please use plain text.
New Contributor
ghedeon
Posts: 4
Registered: ‎03-13-2012
My Device: BlackBerrry 9930

Re: NFC Mifare card emulation

Is it recognized exactly as Mifare card, or something like "ISO/IEC 14443 Type A"?

Please use plain text.
Developer
paulkayuk
Posts: 133
Registered: ‎04-30-2010
My Device: Curve 8520

Re: NFC Mifare card emulation

I have not got the devices with me at the moment, I will check this evening and let you know.
Please use plain text.
Retired
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10

Re: NFC Mifare card emulation

[ Edited ]

I don't think emulating a type 2 tag is possible from the APIs if we're strict about what we mean here. Type 2 tags work at ISO14443-3 whereas the API Virtualxxxxxx classes/interfaces work at layer 4 and are really designed for type 4 emulation. You can certainly emulate a generic tag which serves an NDEF message of course.

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Please use plain text.
Developer
paulkayuk
Posts: 133
Registered: ‎04-30-2010
My Device: Curve 8520

Re: NFC Mifare card emulation

You are, of course, right Martin, as a quick re-read of VirtualNDEFTag confirms. Generic Type 4 virtual tag only.

Please use plain text.
Retired
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10

Re: NFC Mifare card emulation

...or possibly just pedantic :-)

 

All depends what we really meant in the first place I guess!

 

A good discussion :-)

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Please use plain text.