Re: P2P communication between android phone and nfc reader
FYI, the NFC Forum has just published the Simple NDEF Exchange Protocol (SNEP) specification which provides a standardized way to exchange NDEF messages on top of LLCP. Every future NFC Forum certified device will have a default SNEP server running on a well known service access point ("urn:nfc:sn:snep", SAP 2 as per http://www.nfc-forum.org/specs/nfc_foru … s_register). The SNEP specification can be downloaded at http://www.nfc-forum.org/specs/spec_license.
A SNEP implementation and client/server test code is available through nfcpy (https://launchpad.net/nfcpy) and may be useful to either experiment with the protocol or to have a test partner for an own implementation. Same as the LLCP client/server examples, this code was used in cross-vendor plugfests and should be sufficiently correct, although nothing is perfect in the world (issues may be reported on https://bugs.launchpad.net/nfcpy).
Hope it helps the FOSS community and thanks for the work you're doing with libnfc.