On Sun, Apr 08, 2012 at 11:36:44AM -0700, Irfan Sheriff wrote:
> On Sun, Apr 8, 2012 at 5:08 AM, mxd <[email protected]> wrote:
> 
> >   Can 3G Data Session and WIFI Direct concurrently work?? if so, then two
> > IPaddress Exist, will it cause confusion? one example:
> 
> Yes, Wi-Fi direct uses a local IP that will not conflict with 3g
> connectivity.

Even if it didn't use two different IP addresses (along with two
different MAC addresses), it would still work.

Consider an average tablet that doesn't have 3G.  It's got ONE physical
(MAC) address and ONE IP address.  Does that prevent you from having two
connecctions?  Of course not.

As a side note, do not confuse the MAC address and IP address.  The MAC
(Media Access Control) address is unique to each physical network device,
i.e., the hardware address.  It does not change from the time that
network adapter is made until it's retired.  The IP address works at a
higher level, and it can be changed (obviously).  I know of at least one
Android developer who made this mistake in his app (he listed the
device's MAC address and called it the IP address).  That's bad enough,
but when I pointed it out, he even went so far as to say that they're
the same thing....  Sigh.  That's like saying that in a car, the tires
and the engine are the exact same thing.  They are both part of the car,
but.....

Ok, back to the real topic.  Note that this example is leaving out most
of the details at the low level.

Consider sites A, B, and C.  These can be on the same LAN or spread
across the world.  A is busy receiving data from B.  This data is coming
in in blocks.  Each block contains chunks of data, along with some
framing, addressing, error control, etc.  These blocks are not even
required to arrive in order.  Each block contains information as to
where its data fits in with the other blocks' data.  This is called an
asynchronous connection.

Here's where the confusion comes into play:  On a given physical
network (and this includes wireless), there can only be ONE data
packet present at a time.  More than one site on a LAN trying to
transmit at the same time is known as a collision.  If A is sending
data, data blocks from B and C have to wait.  Note that this does
not impact B and C directly, unless they are on the same physical
network.  Otherwise, it's the local router (or bridge in some
cases) and other devices on the same LAN that must wait.  But they
only have to wait for that one data block...not the whole file
transfer, as in the example given in this thread.  As soon as A's
packet is clear, each MAC device will wait for a random period
(collision avoidance) and then transmit.  If a collision is
detected, it starts over with another random delay on each device
on the network with data to send.

Does that make sense?  It's hard for me to describe this without going
into the real low-level protocols.

Even a dial-up modem using SLIP can have multiple connections.  SLIP
is a case of an async connection running over a synchronous physical
layer.  The SLIP connection only connects to the other modem, but
the IP connection is not limited by this.

Hope that clears things up.  With that, it's time to feed my little
monsters and get ready to brew today.  I don't crank up the burner
until 0900 as a courtesy to the neighbors, but I want to be ready
to fire it up at 0900 and hopefully mash in by 0930....  :-)

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)            MiSTie #49997      < Running FreeBSD 7.0 >
[email protected]                    ICBM/Hurr.: 30.44406N 86.59909W

               My policy on spammers:
                  "Castrate first, ask questions later."

Android Apps Listing at http://www.jstrack.org/barcodes.html

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to