2
I am trying to create a adhoc network in which I am going to use one or more android devices to connect to laptop(s). Say laptop A, laptop B, Mobile C, Mobile D. I rooted one of my android device and changed wpa_supplicant to recognize adhoc networks. I followed
auto wlan0
iface wlan0 inet static
address 192.168.1.1
netmask 255.255.255.0
wireless-channel 1
wireless-essid myadhocnetwork
wireless-mode ad-hoc
for both laptops A and B with different Ip (192.168.1.1 and .2) address. Now I would like to add my mobile C to this network. My device detected this network but not able to connect. It says trying to get ip address and fails. I assigned manual ip (192.168.1.3) for my device with same netmask address. Even then it is not able to connect. But when I assign either ip address of either A or B as gateway and DNS1, DNS2, it connects to above network. Only then I am able to ping from C to A and C to B. I didn't understand whats the process does. Can some one please explain is that the right way for adhoc? One interesting thing I observed is assume I set 192.168.1.1 as gateway and DNS1 and DNS2 in mobile. after connecting I disabled the network in Computer A. Even then there is communication between B and C. I am able to ping between them. Can some one please tell me how to connect android to this adhoc network. NOTE: I even tried modifying wpa_supplicant.config in data/misc/etc by adding the network ssid and other parameters Thanks