更改WiFi-Direct IP范围?在Android WiFi-Direct中强制使用IPv6? [英] Change WiFi-Direct IP range? Force IPv6 in Android WiFi-Direct?

查看:458
本文介绍了更改WiFi-Direct IP范围?在Android WiFi-Direct中强制使用IPv6?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个Android KitKat手机,两个都是作为群组所有者运行WiFi-Direct群组,我们称之为GO1和GO2

I have two Android KitKat phones, both are running WiFi-Direct groups as Group Owners, let's call them GO1 and GO2

我设法将GO1连接为传统客户端到GO2没有破坏任何(以前设置的)wifi直接组。

I managed to connect GO1 as a legacy client to GO2 without breaking any of the (previously set) wifi-direct groups.

问题是,正如您所知,GO IP地址在Android中是硬编码的来源,并设置为192.168.49.1

The problem is that, as you might know, the GO IP address is hardcoded in Android source, and is set to 192.168.49.1

因此,我的两个设备GO1和GO2都有相同的IP地址(**)......每个都在他的本地网络。

Therefore, both of my devices, GO1 and GO2 have the same IP address (**)... each on his local network.

我的应用程序同时是客户端和服务器。但是两个网络都使用相同的IP范围(192.168.49.XXX),显然,我无法改变。

My app is both client and server at the same time. But both networks are using the same IP range (192.168.49.XXX), which, apparently, I cannot change.

因此我无法在两者之间建立TCP连接他们是否同时主持WiFi-Direct组,因为任何设备在尝试连接到192.168.49.1时都会连接到自己

As a result I cannot create a TCP connection between them if they are both hosting a WiFi-Direct Group, since any device will connect to itself when trying to connect to 192.168.49.1

所以问题是:


  • 有没有办法更改Wifi-Direct中使用的IP范围?

  • 有没有办法在Wifi-Direct中使用IPv6而不是IPv4?

  • 可以在不使用手机的情况下完成任何此操作吗?

  • 还有其他任何建议吗?

  • 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 any of this be done without rooting the phone?
  • Any other suggestion?

**:实际上,因为GO1作为传统客户端连接到GO2,所以GO1被称为192.168.49.227(例如)到GO2和GO2被称为GO1的192.168.49.1。但是因为GO1也是GO,它也被称为192.168.49.1给他的客户(及其本身)。

** : Actually, because GO1 is connecting as a legacy client to GO2, then GO1 is known as 192.168.49.227 (for example) to GO2 and GO2 is known as 192.168.49.1 to GO1. But because GO1 is ALSO a GO, it also known as 192.168.49.1 to his clients (and itself).

推荐答案

无法更改IP范围,因为正如您正确指出的那样,它在Android Wi-Fi Direct系统服务中是硬编码的。就个人而言,我不知道在Wi-Fi P2P接口上启用了IPv6,即使它是,它也可能是一个硬编码的IPv6地址。

There is no way to change the IP range because as you have correctly pointed out, it is hardcoded in the Android Wi-Fi Direct system service. Personally, I am not aware of IPv6 being enabled on the Wi-Fi P2P interface, and even if it was, it would likely be a hardcoded IPv6 address.

如果是GO1和GO2,必须在GO模式下相互连接,然后可能会使用蓝牙或其他传输来查看它们以进行通信。如果可以延迟GO1和GO2之间的通信,则缓存要交换的任何信息,并且当一个设备可以是另一个设备的客户端时,可以在这两个设备之间发送它,例如,当GO1可以停止成为GO并且可以成为GO2的客户时。

If GO1 and GO2, must be connected to each other whilst both in GO mode, then perhaps look at using Bluetooth or some other transport to allow them to communicate. If communication between GO1 and GO2 can be delayed, then cache whatever information is to be exchanged, and send it between these two devices when one can be the client of the other, e.g. when GO1 can stop being a GO and can be a client of GO2.

这篇关于更改WiFi-Direct IP范围?在Android WiFi-Direct中强制使用IPv6?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆