Open NFC Simulator Usage

给你一囗甜甜゛ 提交于 2019-12-01 11:36:50

问题


I would like to know how to properly use the Open NFC Simulator, i have already gone through a similar post in: Getting started with Open NFC emulator

but my problem is after following all the instruction in the link above no luck, could someone give me step by step instructions on how to properly load the SDK addon and start the simulator?

I'm doing an Final Year Project on Android NFC, using NFC to do mobile payments, if anybody has sample programs or such topics it is also greatly appreciated.


回答1:


Ok i will put the steps down here, it will a partial replicate of the steps listed in the this link: Getting started with Open NFC emulator, but with some pointers on how to do it so that the Open NFC Simulator can be used to simulate two devices [Peer-to-peer]:

The following steps and need to be performed in order and if the simulator hangs/freeze before the procedure is completed the steps (5-8) need to be performed from the beginning and hence the order is crucial.

  1. The following packages must be present:

    OpenNFC Android SDK Add-on : Link

    OpenNFC Core Edition (contains the Connection Center and NFC Simulator)

    Echo Server – Echo Tool

  2. The OpenNFC must be installed in the Android SDK (in the folder - android-sdk-windows/add-ons/)

  3. Start the Echo server using the cmd with these parameters – “echotool /p tcp /s 7”

  4. Start the ConnectionCenter.exe and if it is the first run, it must be configured to accept service client and provider connections from other machines.

  5. Start the NfcSimulator.exe using Administrative rights (right click Run as Administrator)

  6. Start Multiple (Two) Android Emulators (AVD), conventionally creating AVD’s from the AVD Manager is sufficient, if this process doesn’t work, then using cmd, run the emulator-arm.exe (in the folder - android-sdk-windows/tools/) with these parameters “emulator-arm.exe –avd ” e.g. “emulator-arm.exe –avd A1”

  7. In each emulator at first run, the NFC settings must be configured as shown below: The IP – 10.0.2.2 must be entered and the “NFC Controller Simulator” must be selected for NFC HAL Implementation and now the Enable/Disable NFC can be toggled.

    Once these setting are configured the NFC Simulator will show the activation of the NFC in each device, it will light up the available technologies to emulate.

  8. To perform NFC peer-to-peer transfer, in the NFC Simulator, the “NFC Device #2” must be double clicked as shown below, this is as when the user places the Smartphone near the NFC reader, and to complete the transfer the OpenNFC icon as visible must be double clicked, this is similar as when the user removes the Smartphone from the reader.



来源:https://stackoverflow.com/questions/11234263/open-nfc-simulator-usage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!