Topic: PN532 uart hang up on windows using nfc-emulate-tag example
I'm trying to emulate a nfc tag focosing on the nfc-emulate-tag example that comes with libnfc.
My problem is that this example works fine under linux but hangs up on windows when i press str+c during an active emulation (for example no device scans the tag, but i want to stop the emulation after some time). I'm using a PN532 device connected via usb->serial converter.
I was able to find out what actually hangs:
str+c will trigger the function "intr_hdlr" of the nfc-emulate-tag example, calling "nfc_abort_command", "nfc_close" and "nfc_exit". The "nfc_close"-command leads to a windows API call in the pn532 uart driver: "PurgeComm" -> this is the function that hangs up ( in "uart.c" -> "void uart_flush_input(const serial_port sp)").
As already mentioned this problem only occurs on windows.
Is this a bug?
Can someone help me fix the problem or give a proper workaround?