Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PN532 UART device is not getting connected #176

Closed
GoogleCodeExporter opened this issue Apr 3, 2015 · 22 comments
Closed

PN532 UART device is not getting connected #176

GoogleCodeExporter opened this issue Apr 3, 2015 · 22 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.nfc-list
2.
3.

What is the expected output? What do you see instead?
device id, tag id

What version of the product are you using? On what operating system?
1.5.1

Please provide any additional information below.

hi when i tried to run libnfc in my PC its not detected. its showing that 
device is not found
i used nfc-list


kserver@kserver:/media/kdata/packages/libnfc-1.5.1$ nfc-list 
nfc-list uses libnfc 1.5.1 (r1175)
No NFC device found.

my pn532_uart driver is enabled and i am using it only. is it possible to give 
the target device file with the command

i ve used the below command also

./configure --with-drivers=pn532_uart --enable-serial-autoprobe

but its not getting detected
showing the same error

Original issue reported on code.google.com by vishnu...@gmail.com on 18 Oct 2011 at 3:18

@GoogleCodeExporter
Copy link
Author

I am using NXP PN532-C106 cakeboard demoboard

Original comment by vishnu...@gmail.com on 18 Oct 2011 at 3:22

@GoogleCodeExporter
Copy link
Author

You could turn on the logging mode using log4c.
As log4c support is enabled at compile time, you have to re-configure, 
re-compile it and re-run it.
Please be sure you have a log4rc (see in trunk/) that allow logging.

Note: regarding your device, this should work perfectly: other users do have 
this board.

Original comment by romu...@libnfc.org on 18 Oct 2011 at 3:58

@GoogleCodeExporter
Copy link
Author

hi,

how to enable log4c.

when i tried --with-log4c its not detected
unrecognized options: --with-log4c

how to make the device detected.
I am using ttyUSB0 as well as ttyS0

Original comment by vishnu...@gmail.com on 19 Oct 2011 at 5:27

@GoogleCodeExporter
Copy link
Author

I just tried the same version you have, with the same kind of device (a PN532 
connected on USB to UART dongle) so it uses /dev/ttyUSB0.

I ran ./configure with "--with-drivers=pn532_uart --enable-serial-autoprobe" 
then "make" as usual.
Running, "utils/nfc-list" works perfectly, it shows:
Connected to NFC device: PN532 (/dev/ttyUSB0) - PN532 v1.6 (0x07)

Are you sure the device is correctly plugged and powered ?

Original comment by romu...@libnfc.org on 19 Oct 2011 at 11:44

@GoogleCodeExporter
Copy link
Author

To enable log4c, just install log4c library with its headers.

Under Ubuntu:
apt-get install liblog4c-dev

Then re-run ./configure and have a look to the line:
checking for log4c-config... /usr/bin/log4c-config

Original comment by romu...@libnfc.org on 19 Oct 2011 at 11:46

@GoogleCodeExporter
Copy link
Author

hi,

this is the log file


root@freescale /unit_tests$ cd ..
root@freescale /$ ls
bin         dev   ieu.linux  mnt   root    share  unit_tests
boot        etc   include    opt   rootfs  sys    usr
config.b2m  home  lib        proc  sbin    tmp    var
root@freescale /$ utils/nfc-list
-sh: utils/nfc-list: No such file or directory
root@freescale /$ utils/nfc-lusb 1-1: new full speed USB device using fsl-ehci 
and address 5
usb 1-1: New USB device found, idVendor=0403, idProduct=6001
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: USB <-> Serial Cable
usb 1-1: Manufacturer: FTDI
usb 1-1: SerialNumber: FTSHZC2E
usb 1-1: configuration #1 chosen from 1 choice
ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
usb 1-1: Detected FT232RL
usb 1-1: Number of endpoints 2
usb 1-1: Endpoint 1 MaxPacketSize 64
usb 1-1: Endpoint 2 MaxPacketSize 64
usb 1-1: Setting MaxPacketSize 64
usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0

-sh: utils/nfc-list: No such file or directory
root@freescale /$ 
root@freescale /$ 
root@freescale /$ 
root@freescale /$ nfc-list 
nfc-list uses libnfc 1.5.1 (rexported)
No NFC device found.
root@freescale /$ nfc-list 
nfc-list uses libnfc 1.5.1 (rexported)
No NFC device found.
root@freescale /$ 
it is connected as ttyUSB0

Original comment by vishnu...@gmail.com on 19 Oct 2011 at 12:06

@GoogleCodeExporter
Copy link
Author

Maybe for debugging purpose, you should use a simple PC with a linux distro, 
check if with the same parameters you have the same result...

You could also write some fprintf-based macro replacement for log_put(), this 
way you should be able to see something on this output (without installing 
log4c).

Original comment by romu...@libnfc.org on 19 Oct 2011 at 1:08

@GoogleCodeExporter
Copy link
Author

i tried it in a PC bt that tooo not wrking
there also we are having the same problem its not detecting

Original comment by vishnu...@gmail.com on 19 Oct 2011 at 5:04

@GoogleCodeExporter
Copy link
Author

I tried the same board in windows and am getting data from the board.

Original comment by vishnu...@gmail.com on 20 Oct 2011 at 11:06

@GoogleCodeExporter
Copy link
Author

hi,

my problem is not solved yet.
the board is not yet detected

Original comment by vishnu...@gmail.com on 24 Oct 2011 at 6:22

@GoogleCodeExporter
Copy link
Author

its detected in my PC when I installed
 pcscd 

Original comment by vishnu...@gmail.com on 25 Oct 2011 at 12:48

@GoogleCodeExporter
Copy link
Author

but this one dint help me in kit

Original comment by vishnu...@gmail.com on 25 Oct 2011 at 12:48

@GoogleCodeExporter
Copy link
Author

What does means "its detected in my PC when I installed pcscd" ? PCSCd is not 
related to PN532_UART driver.
PCSCd is only for (bogus) ACR122 devices.

Original comment by romu...@libnfc.org on 27 Oct 2011 at 3:24

@GoogleCodeExporter
Copy link
Author

r1180 adds a logging capability when log4c is not available.


./configure --with-drivers=pn532_uart --enable-serial-autoprobe --enable-debug
make clean all

Please provide useful logs to help you.

Original comment by romu...@libnfc.org on 27 Oct 2011 at 3:25

  • Changed title: PN532 UART device is not getting connected

@GoogleCodeExporter
Copy link
Author

yes i was getting datas from the card only aftrer installing pcscd. I am using 
NXP PN532 cakeboard is it an acr122 device

Original comment by vishnu...@gmail.com on 27 Oct 2011 at 5:33

@GoogleCodeExporter
Copy link
Author

Hi,

So, could you provide some more logs ?

Could you explain what is a "cakeboard" ? Google show me some strange stuffs :)
And could you reformulate your last sentence: I did not understand what you 
mean.

Can I close this issue ?

Original comment by romu...@libnfc.org on 4 Nov 2011 at 1:08

@GoogleCodeExporter
Copy link
Author

It was a timing problem. for my board 15 ms time is not enough I changed it to 
2 secnd and now am getting data from TAG

Original comment by vishnu...@gmail.com on 4 Nov 2011 at 1:24

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

How did you do that ? (changing "15 ms time")

Original comment by romu...@libnfc.org on 4 Nov 2011 at 3:01

  • Changed state: Invalid
  • Added labels: Type-Other
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Hi,

I am seeing the original problem where no NFC device is found. What was the 
solution to resolve that issue?

Thanks

Original comment by Thenusan...@gmail.com on 23 May 2013 at 2:25

@GoogleCodeExporter
Copy link
Author

maybe a short sleep in pn532_uart_wakeup() helps?
it works for me...

   int res = uart_send(DRIVER_DATA(pnd)->port, pn532_wakeup_preamble, sizeof(pn532_wakeup_preamble), 0);
   CHIP_DATA(pnd)->power_mode = NORMAL; // PN532 should now be awake
+  msleep(1);
   return res;

msleep() is some macro defined in pn532_spi.c, or just use usleep(1000)

Original comment by pme...@gmail.com on 6 Jul 2013 at 9:30

@GoogleCodeExporter
Copy link
Author

i an trying to interface Arduino UNO with grove NFC. I added all the libraries 
perfectly but the code is written for i2c where grove nfc has UART connected on 
the board. it is suggested that de-solder the UART and solder it to i2c in nfc 
board, could you please help me in solving the problem. i need library for 
interfacing ardunino UNO with grove nfc through UART.

Original comment by udaykira...@gmail.com on 5 Feb 2015 at 11:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant