SEQUENTIAL bidirectional P2P with NFC on Gingerbread

Showing 1-11 of 11 messages
SEQUENTIAL bidirectional P2P with NFC on Gingerbread Tez 9/20/11 8:53 AM
I have the following scenario

1. Phone A prepares an NDEF message and Phone B registers foreground
dispatch.
2. Phone A pushes the NDEF. Phone B receives this and processes it.
3. Phone A now registers for foreground dispatch and disables NDEF
push.Phone B replies with an NDEF push.

ALL this is to be done in one swipe. How can I do this?
Right now, I have to pull the devices away for the 2nd part to work. I
have seen the sample on p2p exchange, but in that case, both the
message contents are known in advance. Here, the reply depends on the
request.

Secondly, will there be a proper NFC API with the ability to create
LLCP sockets?

Cheers,
Earlence
Re: SEQUENTIAL bidirectional P2P with NFC on Gingerbread Tez 9/21/11 9:07 AM
Basically, I need a request-response mechanism in one swipe.
from the logs, I see that the system is "about to close" an LLCP
connection, but does not do so until the 2 devices are out of each
others RF fields.
Due to this, the polling loop does not restart to make the system
available for another NDEF push.

Is there anything that can be done, short of modifying the system
code?

-Earlence
Re: SEQUENTIAL bidirectional P2P with NFC on Gingerbread Alexander Starchenko 9/22/11 6:11 AM
Check out this:
1. Tutorial to make hidden API visible devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-1-introduction/

2. Use INfcAdapter, ILlcpServiceSocket, ILlcpSocket (will be visible after 1 step) like it's done in the code from com.android.nfc.ndefpush package;

Yes, it's quite 'dirty' way, but the only possible currently on 2.3.4 version.
Re: SEQUENTIAL bidirectional P2P with NFC on Gingerbread Alexander Starchenko 9/22/11 2:20 AM
Take a look:
1. devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-1-
introduction/
;
2. INfcAdapter, ILlcpServicesocket, ILlcpSocket classes (following 1.
would give You access to these classes);

It's possible to make LLCP P2P communication on two 2.3.4 device.

I know, this is a 'dirty' way, but there seems to be no other option
to achieve what You're looking for.

Thanks in advance,
Alex
Re: SEQUENTIAL bidirectional P2P with NFC on Gingerbread Tez 9/22/11 10:48 AM
Hmm...this is interesting.

I was also thinking the following:
Suppose I use internal and hidden APIs in a package that is compiled
with the entire Android System itself.
I guess this method should also work.

-Earlence

On Sep 22, 11:20 am, Alexander Starchenko <alex.starche...@gmail.com>
wrote:
Re: SEQUENTIAL bidirectional P2P with NFC on Gingerbread d 10/24/11 3:13 PM
Hi Earlence,

I am also trying to do the same scenario on 2.3.6.
I tried using Alex's solution but the API has been updated so some of
the classes/methods are missing.
Could you please post the solution if you got it.

Thanks!
> > > > Secondly, will there be a properNFCAPI with the ability to create
> > > > LLCP sockets?
>
> > > > Cheers,
> > > > Earlence
Re: SEQUENTIAL bidirectional P2P with NFC on Gingerbread Nick Pelly 10/25/11 10:36 PM
We don't currently provide a way to do command/response over P2P. We understand the use cases, and want to make these use cases possible in a clean and future-proof way at some time.

Those (hidden) API's are no longer present in ICS.

Nick



--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/IYy7_RGBT90J.

To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Re: SEQUENTIAL bidirectional P2P with NFC on Gingerbread Tez 10/26/11 12:01 PM
> understand the use cases, and want to make these use cases possible in a
> clean and future-proof way at some time.

Is there any ETA on this? eg: in the next, or within the next 2
releases?

> Could you please post the solution if you got it.

Yes, I managed to do it on the gingerbread stock version.
However, it is quite unstable.

Basically, you have to listen for the LLCP system notifications and
piggy back on them.
I will post a link to the code soon.

-Earlence

On Oct 26, 7:36 am, Nick Pelly <npe...@google.com> wrote:
> We don't currently provide a way to do command/response over P2P. We
> understand the use cases, and want to make these use cases possible in a
> clean and future-proof way at some time.
>
> Those (hidden) API's are no longer present in ICS.
>
> Nick
>
> On Thu, Sep 22, 2011 at 6:11 AM, Alexander Starchenko <
>
>
>
>
>
>
>
Re: SEQUENTIAL bidirectional P2P with NFC on Gingerbread d 10/31/11 1:52 PM
Thanks Earlence!
I am still working on it, would be great if you can share it.
Re: SEQUENTIAL bidirectional P2P with NFC on Gingerbread Sam Van Den Berge 12/2/12 4:34 AM
Is there any recent news concerning this subject? At the moment I'm doing a thesis which is related to this subject. 
Is it correct that sending a response withing a single connection is still not supported in Jelly Bean?

Sam.

Op woensdag 26 oktober 2011 07:36:03 UTC+2 schreef Nick Pelly het volgende:
Re: SEQUENTIAL bidirectional P2P with NFC on Gingerbread Michael Roland 1/9/13 4:16 AM
Hi Sam,

there is still no API for bidirectional P2P communication. However, you
might want to have a look at these two projects:

http://code.google.com/p/ismb-npp-java/
http://code.google.com/p/ismb-snep-java/

They do kind-of bidirectional P2P communication over SNEP/NPP. However,
they exchange one message per connection instead of keeping one
continuous connection.

br,
Michael


On 2012-12-02 13:34, Sam Van Den Berge wrote:
> Is there any recent news concerning this subject? At the moment I'm
> doing a thesis which is related to this subject.
> Is it correct that sending a response withing a single connection is
> still not supported in Jelly Bean?
>
> Sam.
>
> Op woensdag 26 oktober 2011 07:36:03 UTC+2 schreef Nick Pelly het volgende:
>
>     We don't currently provide a way to do command/response over P2P. We
>     understand the use cases, and want to make these use cases possible
>     in a clean and future-proof way at some time.
>
>     Those (hidden) API's are no longer present in ICS.
>
>     Nick
>
>
>
>     On Thu, Sep 22, 2011 at 6:11 AM, Alexander Starchenko
>     <alex.st...@gmail.com <javascript:>> wrote:
>
>         Check out this:
>         1. Tutorial to make hidden API visible
>         devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-1-introduction/
>         <http://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-1-introduction/>
>
>         2. Use INfcAdapter, ILlcpServiceSocket, ILlcpSocket (will be
>         visible after 1 step) like it's done in the code from
>         com.android.nfc.ndefpush package;
>
>         Yes, it's quite 'dirty' way, but the only possible currently on
>         2.3.4 version.
>
>         --
>         You received this message because you are subscribed to the
>         Google Groups "android-platform" group.
>         To view this discussion on the web visit
>         https://groups.google.com/d/msg/android-platform/-/IYy7_RGBT90J
>         <https://groups.google.com/d/msg/android-platform/-/IYy7_RGBT90J>.
>
>         To post to this group, send email to
>         android-...@googlegroups.com <javascript:>.
>         To unsubscribe from this group, send email to
>         android-platfo...@googlegroups.com <javascript:>.
>         For more options, visit this group at
>         http://groups.google.com/group/android-platform?hl=en
>         <http://groups.google.com/group/android-platform?hl=en>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "android-platform" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-platform/-/R6xK0DCrhlAJ.