timmerk / libnfc

Automatically exported from code.google.com/p/libnfc
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Provide a fake NFC device for simulation #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be great to have e default *software simulation of a real NFC hardware 
reader*.

It should be useful for two reasons:

1) A developer without a physical NFC reader could develop NFC-based 
applications.

2) When libnfc is used on mobile platforms, it would be easy to create a 
simulator/emulator for the development platform without replacing existing NFC 
code.

My company is interested in development (and open-source release) of this tool 
for *libnfc* because we're using it in our projects.

Original issue reported on code.google.com by emanuele.bertoldi on 6 Aug 2010 at 9:04

GoogleCodeExporter commented 9 years ago
Sounds nice.

Another use-case that would be made possible and I think would be greate is the 
possibility to set-up regression tests.  I am planning some refactoring in the 
libnfc and would be really less nervous if there were some knd of regression 
tests suite that I could use to ensure I don't break any feature.

Are you just planning PCD emulation or willing to support say "modules" that 
emulates PICCs on the PCD ?  Has work already started (the issue is in the 
accepted state… but Google trends to use this as default if you are a 
developer and add an issue in a project) ? How have you planned to do the 
implementation ?

Original comment by romain.t...@gmail.com on 6 Aug 2010 at 9:42

GoogleCodeExporter commented 9 years ago
Currently my idea is to simulate the NXP PN532 firmware with only a small set 
of supported commands and only for passive targets (all tags supported by the 
chip).

Tags could be simulated with dump files.

We are in the initial case-study phase so all suggestions are welcome!

Original comment by emanuele.bertoldi on 6 Aug 2010 at 9:58

GoogleCodeExporter commented 9 years ago
Okay

I would really be pleased if the code had enough abstraction to easily add 
support for emulating more devices (PN531, PN533) and tags (e.g. DESFire 
targets for which a dump will not be enough) in the future.

One way might be having a PCD emulation daemon for emulating the NFC device 
(one daemon per device) that communicates with any number of PICC emulator 
daemons (one daemon per target).  The libnfc then would only require a simple 
"pass-through" interface to communicate with the PCD emulator.
While it is probably not the easiest way to reach the goal, this modularity has 
some benefits:
  - It is easy to add new types of target (possibly custom ones);
  - Targets emulators can be programmed in almost any language, that allows someone to use the same code for testing purpose and in an OS programmed in a contact-less Smart Card (e.g. FLOSS implementation of Mifare DESFire OS for a Java / BASIC card… I have never played with these card so maybe it is not feasible, but if it is, it may be a real advantage for developers to have such a framework);

But it might be really over-skill regarding what you are planning ;-)

Maybe the wiki could be a good place for the brainstorming ?
Romain

Original comment by romain.t...@gmail.com on 6 Aug 2010 at 1:20

GoogleCodeExporter commented 9 years ago
Nobody is working on this issue anymore.

Is someone interesting by this feature ?

Original comment by romu...@libnfc.org on 27 Sep 2012 at 9:43

GoogleCodeExporter commented 9 years ago

Original comment by romu...@libnfc.org on 29 Jan 2013 at 2:36