Share Coding

Tutorials, Problems, Stuffs …

ACR122U FeliCa Reader with Raspberry Pi

apt-get install flex libpcsclite-dev libusb-dev checkinstall libusb-0.1-4 libpcsclite1 libccid pcscd pcsc-tools libcurl4-openssl-dev

 

wget http://www.acs.com.hk/drivers/eng/ACR122_Driver_Lnx_Mac10.5_10.6_10.7_104_P.zip
unzip ACR122_Driver_Lnx_Mac10.5_10.6_10.7_104_P.zip
cd ACR122_Driver_Lnx_Mac10.5_10.6_10.7_104_P
tar -jxvf acsccid-1.0.4.tar.bz2
cd acsccid-1.0.4
./configure
make
checkinstall -D -y –install

 

Download libnfc (1.7.1)
cd libnfc-1.7.1
./configure --prefix=/usr --sysconfdir=/etc --with-drivers=acr122_pcsc
make
make install
/sbin/ldconfig

 

reboot
pcsc_scan
nfc-list
nfc-poll

 


 

// If error message appear
No NFC device found.

 

// Use dmesg to check error
usb 2-1.2: usbfs: interface 0 claimed by pn533 while 'nfc-list' sets config #1

 

// Solution: Create /etc/modprobe.d/blacklist-libnfc.conf and type
blacklist pn533
blacklist nfc

 

// Save and run
modprobe -r pn533 nfc
reboot
Advertisements

3 responses to “ACR122U FeliCa Reader with Raspberry Pi

  1. Bob 2014/12/18 at 3:51 am

    Ok, when making the ACR122 driver, the checkinstall line fails with

    make: *** No rule to make target ‘install’. Stop.

    **** Installation failed. Aborting package creation.

    Cleaning up…OK

    Bye.

    Any ideas? make install fails too…

    • Mr.Sing 2014/12/18 at 10:55 pm

      It seems you have problem in ./configure
      can you capture the message after you run ./configure ?

      • Bob 2014/12/19 at 3:44 am

        Here’s the output from ./configure

        checking for a BSD-compatible install… /usr/bin/install -c
        checking whether build environment is sane… yes
        checking for a thread-safe mkdir -p… /bin/mkdir -p
        checking for gawk… no
        checking for mawk… mawk
        checking whether make sets $(MAKE)… yes
        checking whether make supports nested variables… yes
        checking build system type… armv6l-unknown-linux-gnueabihf
        checking host system type… armv6l-unknown-linux-gnueabihf
        checking whether to enable maintainer-specific portions of Makefiles… no
        checking for gcc… gcc
        checking whether the C compiler works… yes
        checking for C compiler default output file name… a.out
        checking for suffix of executables…
        checking whether we are cross compiling… no
        checking for suffix of object files… o
        checking whether we are using the GNU C compiler… yes
        checking whether gcc accepts -g… yes
        checking for gcc option to accept ISO C89… none needed
        checking for style of include used by make… GNU
        checking dependency style of gcc… gcc3
        checking whether gcc and cc understand -c and -o together… yes
        checking how to run the C preprocessor… gcc -E
        checking whether make sets $(MAKE)… (cached) yes
        checking whether ln -s works… yes
        checking for flex… flex
        checking lex output file root… lex.yy
        checking lex library… -lfl
        checking whether yytext is a pointer… yes
        checking for pkg-config… /usr/bin/pkg-config
        checking pkg-config is at least version 0.9.0… yes
        checking for PCSC… yes
        checking for grep that handles long lines and -e… /bin/grep
        checking for egrep… /bin/grep -E
        checking for ANSI C header files… yes
        checking for sys/types.h… yes
        checking for sys/stat.h… yes
        checking for stdlib.h… yes
        checking for string.h… yes
        checking for memory.h… yes
        checking for strings.h… yes
        checking for inttypes.h… yes
        checking for stdint.h… yes
        checking for unistd.h… yes
        checking ifdhandler.h usability… yes
        checking ifdhandler.h presence… yes
        checking for ifdhandler.h… yes
        checking reader.h usability… yes
        checking reader.h presence… yes
        checking for reader.h… yes
        checking how to print strings… printf
        checking for a sed that does not truncate output… /bin/sed
        checking for fgrep… /bin/grep -F
        checking for ld used by gcc… /usr/bin/ld
        checking if the linker (/usr/bin/ld) is GNU ld… yes
        checking for BSD- or MS-compatible name lister (nm)… /usr/bin/nm -B
        checking the name lister (/usr/bin/nm -B) interface… BSD nm
        checking the maximum length of command line arguments… 1572864
        checking whether the shell understands some XSI constructs… yes
        checking whether the shell understands “+=”… yes
        checking how to convert armv6l-unknown-linux-gnueabihf file names to armv6l-unknown-linux-gnueabihf format… func_convert_file_noop
        checking how to convert armv6l-unknown-linux-gnueabihf file names to toolchain format… func_convert_file_noop
        checking for /usr/bin/ld option to reload object files… -r
        checking for objdump… objdump
        checking how to recognize dependent libraries… pass_all
        checking for dlltool… no
        checking how to associate runtime and link libraries… printf %s\n
        checking for ar… ar
        checking for archiver @FILE support… @
        checking for strip… strip
        checking for ranlib… ranlib
        checking command to parse /usr/bin/nm -B output from gcc object… ok
        checking for sysroot… no
        checking for mt… mt
        checking if mt is a manifest tool… no
        checking for dlfcn.h… yes
        checking for objdir… .libs
        checking if gcc supports -fno-rtti -fno-exceptions… no
        checking for gcc option to produce PIC… -fPIC -DPIC
        checking if gcc PIC flag -fPIC -DPIC works… yes
        checking if gcc static flag -static works… yes
        checking if gcc supports -c -o file.o… yes
        checking if gcc supports -c -o file.o… (cached) yes
        checking whether the gcc linker (/usr/bin/ld) supports shared libraries… yes
        checking whether -lc should be explicitly linked in… no
        checking dynamic linker characteristics… GNU/Linux ld.so
        checking how to hardcode library paths into programs… immediate
        checking whether stripping libraries is possible… yes
        checking if libtool supports shared libraries… yes
        checking whether to build shared libraries… yes
        checking whether to build static libraries… no
        checking for ANSI C header files… (cached) yes
        checking errno.h usability… yes
        checking errno.h presence… yes
        checking for errno.h… yes
        checking fcntl.h usability… yes
        checking fcntl.h presence… yes
        checking for fcntl.h… yes
        checking for stdlib.h… (cached) yes
        checking for unistd.h… (cached) yes
        checking termios.h usability… yes
        checking termios.h presence… yes
        checking for termios.h… yes
        checking for string.h… (cached) yes
        checking sys/time.h usability… yes
        checking sys/time.h presence… yes
        checking for sys/time.h… yes
        checking for sys/types.h… (cached) yes
        checking stdarg.h usability… yes
        checking stdarg.h presence… yes
        checking for stdarg.h… yes
        checking arpa/inet.h usability… yes
        checking arpa/inet.h presence… yes
        checking for arpa/inet.h… yes
        checking for an ANSI C-conforming const… yes
        checking for size_t… yes
        checking whether time.h and sys/time.h may both be included… yes
        checking for select… yes
        checking for strerror… yes
        checking for strncpy… yes
        checking for memcpy… yes
        checking for strlcpy… no
        checking for strlcat… no
        checking for LIBUSB… yes
        checking usb.h usability… yes
        checking usb.h presence… yes
        checking for usb.h… yes
        checking for usb_init… yes
        checking for usb_interrupt_read… yes
        checking for usb_detach_kernel_driver_np… yes
        checking if libusb is emulated by libusb-compat… no
        checking for -fvisibility=hidden… yes
        checking for the pthreads library -lpthreads… no
        checking whether pthreads work without any flags… no
        checking whether pthreads work with -Kthread… no
        checking whether pthreads work with -kthread… no
        checking for the pthreads library -llthread… no
        checking whether pthreads work with -pthread… yes
        checking for joinable pthread attribute… PTHREAD_CREATE_JOINABLE
        checking if more special flags are required for pthreads… no
        checking for SCardEstablishContext… yes

        libacsccid has been configured with following options:

        Version: 1.0.4

        Host: armv6l-unknown-linux-gnueabihf
        Compiler: gcc
        Preprocessor flags:
        Compiler flags: -g -O2
        Preprocessor flags:
        Linker flags:
        Libraries:

        PCSC_CFLAGS: -pthread -I/usr/include/PCSC
        PCSC_LIBS: -lpcsclite
        PTHREAD_CFLAGS: -pthread
        PTHREAD_LIBS:
        BUNDLE_HOST: Linux
        DYN_LIB_EXT: so
        LIBUSB_CFLAGS:
        LIBUSB_LIBS: -lusb
        SYMBOL_VISIBILITY: -fvisibility=hidden
        NOCLASS: –no-class

        libusb support: yes
        use USB interrupt: no
        composite as multislot: no
        multi threading: yes
        bundle directory name: ifd-acsccid.bundle
        USB drop directory: /usr/lib/pcsc/drivers
        compiled for pcsc-lite: yes
        udev support: no
        class driver: no

        configure: creating ./config.status
        config.status: creating Makefile
        config.status: creating m4/Makefile
        config.status: creating src/Makefile
        config.status: creating config.h
        config.status: executing depfiles commands
        config.status: executing libtool commands

        And this from make

        make all-recursive
        make[1]: Entering directory ‘/home/bob/nfc/ACR122_Driver_Lnx_Mac10.5_10.6_10.7_104_P/acsccid-1.0.4’
        Making all in m4
        make[2]: Entering directory ‘/home/bob/nfc/ACR122_Driver_Lnx_Mac10.5_10.6_10.7_104_P/acsccid-1.0.4/m4’
        make[2]: Nothing to be done for ‘all’.
        make[2]: Leaving directory ‘/home/bob/nfc/ACR122_Driver_Lnx_Mac10.5_10.6_10.7_104_P/acsccid-1.0.4/m4’
        Making all in src
        make[2]: Entering directory ‘/home/bob/nfc/ACR122_Driver_Lnx_Mac10.5_10.6_10.7_104_P/acsccid-1.0.4/src’
        CC libacsccid_la-ccid.lo
        CC libacsccid_la-commands.lo
        CC libacsccid_la-acr38cmd.lo
        CC libacsccid_la-ifdhandler.lo
        CC libacsccid_la-utils.lo
        CC libacsccid_la-ccid_usb.lo
        CC libacsccid_la-tokenparser.lo
        CC libacsccid_la-strlcpy.lo
        CC libacsccid_la-atr.lo
        CC libacsccid_la-pps.lo
        CC libacsccid_la-buffer.lo
        CC libacsccid_la-checksum.lo
        CC libacsccid_la-proto-t1.lo
        CCLD libacsccid.la
        make[2]: Leaving directory ‘/home/bob/nfc/ACR122_Driver_Lnx_Mac10.5_10.6_10.7_104_P/acsccid-1.0.4/src’
        make[2]: Entering directory ‘/home/bob/nfc/ACR122_Driver_Lnx_Mac10.5_10.6_10.7_104_P/acsccid-1.0.4’
        make[2]: Leaving directory ‘/home/bob/nfc/ACR122_Driver_Lnx_Mac10.5_10.6_10.7_104_P/acsccid-1.0.4’
        make[1]: Leaving directory ‘/home/bob/nfc/ACR122_Driver_Lnx_Mac10.5_10.6_10.7_104_P/acsccid-1.0.4’

        Thank you!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: