I have two Android KitKat phones, both work with WiFi-Direct groups as group owners, let them call GO1 and GO2
I managed to connect GO1 as an outdated client to GO2 without violating any (previously installed) wifi-direct groups.
The problem is that, as you know, the GO IP address is hardcoded in the Android source and set to 192.168.49.1
Therefore, both my GO1 and GO2 devices have the same IP address (**) ... each on its own local network.
My application is both a client and a server. But both networks use the same IP range (192.168.49.XXX), which, apparently, I cannot change.
As a result, I canโt create a TCP connection between them if they both host a WiFi-Direct Group, since any device will connect to itself when trying to connect to 192.168.49.1
So the questions are:
- Is there a way to change the IP range used in Wifi-Direct?
- Is there a way to use IPv6 instead of IPv4 in Wifi-Direct?
- Can this be done without shortening the phone?
- Any other suggestion?
**: In fact, since GO1 connects as an old client to GO2, then GO1 is known as 192.168.49.227 (for example) for GO2, and GO2 is known as 192.168.49.1 by GO1. But since GO1 is also GO, it is also known as 192.168.49.1 for its customers (and itself).
source share