You can use wifi direct or use phonenet - content centric networking!
On May 10, 2012 10:30 AM, "devin kelly" <[email protected]> wrote:

>
>
> On Thu, May 10, 2012 at 12:35 PM, Robert Greenwalt 
> <[email protected]>wrote:
>
>>
>>
>> On Thu, May 10, 2012 at 9:23 AM, Devin <[email protected]> wrote:
>>
>>>
>>>
>>> On Thursday, May 10, 2012 11:08:20 AM UTC-4, Robert Greenwalt wrote:
>>>>
>>>> Could you use wifi?  They will both be given addresses via dhcp and
>>>> will be able to see each other.  Finding the other guy is a problem, but
>>>> you're going to have that in any situation.
>>>
>>> Finding the other guy or finding you, whatever works :)  He's the only
>>> other person I've found searching around that's had the same problem.
>>>
>>
>> You might be able to use a service discovery protocol like bonjour for
>> this.
>>
>>
>>>
>>>
>>> I think usb tether uses unroutable addresses and considers the two links
>>>> as separate networks.  wifi treats them as on the same network.
>>>>
>>> That's fine I plan on putting each phone on a different subnet and
>>> routing between them (for now at least).  I'd like to have pairs of
>>> addresses like this
>>>
>>> PC                Phone
>>> 192.168.1.1, 192.168.1.2
>>> 192.168.2.1, 192.168.2.2
>>> 192.168.3.1, 192.168.3.2
>>> 192.168.4.1, 192.168.4.2
>>> 192.168.5.1, 192.168.5.2
>>> etc
>>>
>>>  In a tethering situation the phone is the dhcp server and the PC
>> contacts us for an ip address.
>>
>
> That architecture doesn't really work for me for obvious reasons.
>  Although it makes total sense for the common use case (one phone, one pc
> tethered together) since you don't have to assume that the PC is running a
> DHCP server.
>
>
>> The addresses used are hardcoded in the tethering code and you won't be
>> able to change it without rebuilding and flashing devices.
>>
>
> Not necessarily true, I use commands like the one below to change the
> phones IP.
>
> adb -s myphoneserial shell 'echo 1 > /sys/class/usb_composite/rndis/enable'
> adb -s myphoneserial shell 'ip route add myphoneaddress dev usb0; ip link
> set usb0 up'
>
> for each phone, it works just like I want it to, like in the table I made
> earlier.  I do a few other things (like PC side setup and ip addr del
> 192.168.42.129 dev usb0)  to set up the network but those two lines
> (especially the first one) are key for me.
>
>
>
>> It could be moved into a user visible setting but the extra complexity in
>> settings and the percentage of users who would like it just didn't lead us
>> down that path.
>>
>>
>
> That makes sense though I think hardcoding anything is, in general, bad
> practice.  I think you (you meaning Google) should add this functionality
> in, I think you're going to see a lot more requests like mine in the next
> year or so.  It doesn't even have to be in the Settings menu on the phones
> IMO, maybe just a config file somewhere.  Basically, I'd like to be able to
> change the default IP address without having to rebuild anything.
>
>
>> Each phone has a usb0 interface, the PC has interfaces usb0, usb1, usb2,
>>> usb3, usb4, etc.  I plan on making a network of many ( >10, < 100) phones,
>>> eventually I'll have more than PC too.
>>>
>>> Most users also appreciate the convenience of wireless when using phones
>>>> also..  don't tie them down!
>>>>
>>>
>>> Not me!  :) I specifically want to make a usb network of devices.
>>>
>>
>> lol..  to each their own..
>>
>
> heh, I'm not crazy I swear.
>
>
>>
>>>
>>> One more question: it seems that Android phones really like
>>> 192.168.42.129 as their address when they're put in tethering mode.  I
>>> grepped the entire FS on my phone for this string and it seems that this
>>> address is hard coded and can't be changed without rebuilding some part of
>>> Android, is this right?  I believe I found the address in a dex file
>>> somewhere under /cache.  I'm really sure how those dex files are created
>>> (run time, build time, something else??)
>>>
>>> As I said above these addresses are baked into java code and can't
>> really be altered without making a new image.  I don't know about the
>> problem you might face trying to patch the dex files.
>>
>>
>>> R
>>>>
>>>> On Wed, May 9, 2012 at 7:57 AM, Devin wrote:
>>>>
>>>>> John-Marc,
>>>>>
>>>>> I'm trying to do the same thing and I'm running into the same problem,
>>>>> any updates?
>>>>>
>>>>> Thanks,
>>>>> Devin
>>>>>
>>>>> On Thursday, February 2, 2012 1:45:04 PM UTC-5, John-Marc Desmarais
>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Does anyone know of a method to tether two phones via USB so that one
>>>>>> phone can communicate with the other using an intermediate PC?
>>>>>>
>>>>>> Or, a method to change the default gateway given when tethering on one
>>>>>> of the phones from 192.168.42.129 to something else.
>>>>>>
>>>>>> It seems that if I connect two android phones to the PC both are given
>>>>>> the same gateway address, it is possible to send/receive data from one
>>>>>> phone to the other? is there an address on the other side of the
>>>>>> gateway address that can be used? Can I configure the address on one
>>>>>> of the phones so that the gateway addresses are unique?
>>>>>>
>>>>>> Thanks,
>>>>>> John-Marc Desmarais
>>>>>>
>>>>>>
>>>>>
>>> On Thursday, May 10, 2012 11:08:20 AM UTC-4, Robert Greenwalt wrote:
>>>
>>>> Could you use wifi?  They will both be given addresses via dhcp and
>>>> will be able to see each other.  Finding the other guy is a problem, but
>>>> you're going to have that in any situation.
>>>>
>>>> I think usb tether uses unroutable addresses and considers the two
>>>> links as separate networks.  wifi treats them as on the same network.
>>>>
>>>> Most users also appreciate the convenience of wireless when using
>>>> phones also..  don't tie them down!
>>>>
>>>> R
>>>>
>>>> On Wed, May 9, 2012 at 7:57 AM, Devin  wrote:
>>>>
>>>> John-Marc,
>>>>>
>>>>> I'm trying to do the same thing and I'm running into the same problem,
>>>>> any updates?
>>>>>
>>>>> Thanks,
>>>>> Devin
>>>>>
>>>>> On Thursday, February 2, 2012 1:45:04 PM UTC-5, John-Marc Desmarais
>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Does anyone know of a method to tether two phones via USB so that one
>>>>>> phone can communicate with the other using an intermediate PC?
>>>>>>
>>>>>> Or, a method to change the default gateway given when tethering on one
>>>>>> of the phones from 192.168.42.129 to something else.
>>>>>>
>>>>>> It seems that if I connect two android phones to the PC both are given
>>>>>> the same gateway address, it is possible to send/receive data from one
>>>>>> phone to the other? is there an address on the other side of the
>>>>>> gateway address that can be used? Can I configure the address on one
>>>>>> of the phones so that the gateway addresses are unique?
>>>>>>
>>>>>> Thanks,
>>>>>> John-Marc Desmarais
>>>>>>
>>>>>>  --
>>>>>
>>>>
>>>>  --
>>> 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
>>>
>>
>>  --
>> 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
>>
>
>
>
> --
> http://alum.wpi.edu/~dkelly/
>
> --
> 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

-- 
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