Topic: nfc_target_receive_bytes fails with stdout/stderr in console
I am trying to use the Android transceive method for the IsoDep class to send APDU messages to my PN532 device running with Libnfc.
Something weird I noticed is that, when I have stdout and stderr of my program (running libnfc with PN532) piped to a file or /dev/null (away from console). It consistently works, meaning the program can receive the APDU message the Android sent and can respond. However, when stdout and stderr go to the console, it consistently fail to receive the APDU message. I tried increasing/decreasing the timeout on the nfc_target_receive_bytes call, adding retries on the Android transceiver method, and none of these helped.
I hope you can help me.
Thank you in advance,
- Edmund Lo