Usual context: I’m new to Android development and do not have access to any real hardware.
Objective: For now, I’m just trying to install and configure OpenNFC as supplied. My ultimate objective is to be able to run two simulators which will communicate via simulated NFC; one on which I can run Android apps and the other a PIN Pad simulation. I’m doing this as a training exercise to prepare for an anticipated project using this technology in a few months. Problem: I can’t get the Open NFC AVD to start up successfully. The last two steps of the instructions for how to use the NFC Simulator with the Open NFC add-on (http://open-nfc.org/wp/editions/android/) are:
- Now, start your AVD again. You should get additional activity in the Connection Center window, showing that client source "nfcc_hal" has connected.
- Once the AVD image has booted, you can see the reader modes started on the NfcSimulator software. You can start emulating NFC events from this point
I think step 9 has worked (but I’m not certain!) but not step 10.
I have installed:
- Android Studio 1.1.0 (and various packages managed by the SDK Manager)
- OpenNFC Core (Open NFC - Core Edition v4.5.2 (16234).zip)
- OpenNFC SDK (Delivery_2012-12-14_android-4.2.1_r1_OpenNFC_4.5.1.tar.gz)
- EchoTool – as suggested here (Getting started with Open NFC emulator)
I tried to follow the instructions here (Getting started with Open NFC emulator) but I can’t follow these two steps onwards as don’t have anywhere to enter an IP address within the emulated phone:
--from the emulator, select Settings->Wireless & networks->NFC settings
--enter 10.0.2.2 in IP Connection Center
Results: I'm not allowed to post images so I'll try to describe what I see when I run. This is a filtered log extract although I’m not sure whether I’ve included what is important.
05-13 10:14:06.421 37-69/? W/SurfaceFlinger﹕ getting VSYNC period from fb HAL: 16666666
05-13 10:14:07.261 35-35/? I/OpenNFCServer﹕ Starting Open NFC server...
05-13 10:14:07.261 35-35/? E/SIMULATOR﹕ 00001 ERROR HAL : GetNALBinding
05-13 10:14:07.261 35-35/? I/OpenNFCServer﹕ serverStart : StartNFCC
05-13 10:14:07.641 35-35/? I/OPENNFC_SERVER﹕ 00001 LOG NFCC_B: Open NFC v4.5.1 (Build 15725) is booting
05-13 10:14:07.641 35-35/? I/SIMULATOR﹕ 00002 LOG HAL : ***************** Reseting NFC Controller *********************
05-13 10:14:07.681 35-35/? I/OpenNFCServer﹕ serverStart : WaitForNFCCBoot
05-13 10:14:07.711 35-129/? I/OPENNFC_SERVER﹕ 00002 LOG NAL : ND->NFCC NAL-ADMIN CMD-GET_PARAMETER HARDWARE_INFO
05-13 10:14:08.370 40-40/? I/AudioFlinger﹕ loadHwModule() Loaded primary audio interface from LEGACY Audio HW HAL (audio) handle 1
05-13 10:14:08.370 40-40/? I/AudioFlinger﹕ HAL output buffer size 1024 frames, normal mix buffer size 1024 frames
05-13 10:14:08.440 40-40/? I/AudioPolicyService﹕ Loaded audio policy from LEGACY Audio Policy HAL (audio_policy)
05-13 10:14:12.720 35-129/? I/SIMULATOR﹕ 00003 LOG HAL : ***************** Reseting NFC Controller *********************
05-13 10:14:12.720 35-129/? I/OPENNFC_SERVER﹕ 00003 LOG NAL : ND->NFCC NAL-ADMIN CMD-GET_PARAMETER HARDWARE_INFO
05-13 10:14:17.731 35-129/? I/SIMULATOR﹕ 00004 LOG HAL : ***************** Reseting NFC Controller *********************
05-13 10:14:17.731 35-129/? I/OPENNFC_SERVER﹕ 00004 LOG NAL : ND->NFCC NAL-ADMIN CMD-GET_PARAMETER HARDWARE_INFO
05-13 10:14:22.730 35-129/? I/SIMULATOR﹕ 00005 LOG HAL : ***************** Reseting NFC Controller *********************
05-13 10:14:22.730 35-129/? I/OPENNFC_SERVER﹕ 00005 LOG NAL : ND->NFCC NAL-ADMIN CMD-GET_PARAMETER HARDWARE_INFO
05-13 10:14:48.520 403-403/? I/NfcService﹕ Starting NFC service
05-13 10:14:48.700 403-403/? I/packages/apps/Nfc/nxp/jni/com_android_nfc.cpp﹕ NFC Service : loading JNI
05-13 10:14:49.710 403-403/? W/NfceeAccess﹕ could not find /etc/nfcee_access.xml, no NFCEE access allowed
05-13 10:14:49.710 403-403/? I/NfceeAccess﹕ read 0 signature(s) for NFCEE access
05-13 10:14:51.420 403-460/? D/NfcService﹕ NFC is on. Doing normal stuff
05-13 10:14:51.440 403-460/? I/NfcService﹕ Enabling NFC
05-13 10:14:51.640 403-460/? E/packages/apps/Nfc/nxp/jni/com_android_nfc_NativeNfcManager.cpp﹕ can't initialize NFC Manager
05-13 10:14:51.640 403-460/? W/NfcService﹕ Error enabling NFC
When I click on the NFC item within Wireless Setting I get the following log file entries:
05-13 10:42:27.887 403-885/? I/NfcService﹕ Enabling NFC
05-13 10:42:27.917 403-885/? E/packages/apps/Nfc/nxp/jni/com_android_nfc_NativeNfcManager.cpp﹕ can't initialize NFC Manager
05-13 10:42:27.917 403-885/? W/NfcService﹕ Error enabling NFC
Connection Centre v4.5.2 (Build 16234) : Log records :
Client source <machinename>;Unknown;nfcc_hal;NFC Controller (NFC HAL);NFC Controller (NFC HAL);10;connected to provider souce <machinename>;NfcSImulator;nfcc_hal;NFC Controller (NFC HAL);NFC Device #1;10;Application name NfcSimulator
The NFCC tab indicates there are no NFC Controller's available ("no device available" on the 1st two tabs)
NFC Controller Simulator v4.5.2 (build 16324) doesn't seem to have any lights lit up.
This question may be the same as this one (Open NFC Simulator not working for Android emulator) but it's hard to tell and the existing question is unanswered.