Android Wifi 直接多连接 ad-hoc

发布于 2024-10-22 07:01:26 字数 331 浏览 0 评论 0原文

我尝试在许多 Android 设备之间创建一个临时网络,但我找不到执行此操作的文档。

我认为 Wifi direct 可以满足我的需求,但是是否可以在一台设备上进行多个连接?我发现我们可以让一个设备充当接入点并与许多设备进行通信,但是我们可以从一个客户端设备与两个接入点设备进行通信吗?

例如,我有 3 个设备:A -> B-> C

“A”设备需要与“C”设备通信,但他距离太远,所以我想在 A 和 B 之间建立 ad-hoc wifi 直连,在 B 和 C 之间建立 ad-hoc wifi 直连,这样 A 就可以与C通信。它还应该与3个以上的设备一起工作。

谢谢 !

I try to create an ad-hoc network between many Android devices, but I can't find documentation to do that.

I thought Wifi direct could work for what I want, but is it possible to have multiple connection on one device ? I saw that we could do a device acting like an access point and communicate with many devices, but can we communicate from one client device to two access point devices ?

I have for example 3 devices: A -> B -> C

The "A" device need to communicate with "C" device but he's too far away, so I want to have ad-hoc wifi direct connection between A&B and ad-hoc wifi direct connection between B&C, so A can communicate with C. It should also work with more than 3 devices.

Thanks !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

煮茶煮酒煮时光 2024-10-29 07:01:27

一个月以来,我一直致力于通过 Android 手机建立临时通信。我正在尝试创建一个无需 3G 或接入点即可运行的应用程序。主要思想是让客户端能够近距离传输语音或数据。

有些人实现了关于几乎相同主题的基本系统。它基本上与 Wi-Fi 接入点配合使用。因此,您需要一个接入点才能建立连接。虽然这不是我想要的,但可能对其他人有帮助。您可能需要联系他们以获取更多详细信息。

https://sites.google.com/site/androidwalkietalkie/home

I have been working on establishing ad hoc communication over Android phones for a month. I am trying to create an app that could work without having 3G or access point. Main idea is to let the clients to be able transfer voice or data in a close range.

There are some guys implemented a basic system regarding almost the same topic. It basically works with Wi-Fi access point. So you need an access point in order to establish the connection. Although this is not what I am looking for, it might be helpful for others. You might need to contact them for more details.

https://sites.google.com/site/androidwalkietalkie/home

勿忘初心 2024-10-29 07:01:27

目前仅 Galaxy S 2 支持 Wi-Fi Direct

At this time only Galaxy S 2 support Wi-Fi Direct

标点 2024-10-29 07:01:27

wifi direct 支持单一接口上的并发托管和客户端功能。这意味着,该设备将充当 AP,允许其他设备作为客户端连接到它,并且还可以作为客户端连接到另一个 AP。并且可以通过驱动接口之间的互联网流量来共享互联网连接。
然而,当前 android 上 wifi direct 的实现是特定于手机的,而不是 andorid sdk 的一部分。因此,尚不清楚它们是否支持并发。此功能不受硬件限制。

The wifi direct supports concurrent hosting and client capabilities on single interface. Which means, the device will act as an AP, allowing other devices to connect to it as clients, And also connect to another AP as a client. And can share internet connection by driving the internet traffic between the interfaces.
However, current implementations of wifi direct on android are specific to the phone and not part of andorid sdk. So there is not much clarity if they support concurrency. This capability is not limited by hardware.

将军与妓 2024-10-29 07:01:27

Android 中禁用了 Ad hoc wifi。你需要询问谷歌为什么他们选择这样做。如果您有权使用允许安装自定义 Android 映像的设备,您将能够修补 Android 以支持它。或者,您可以 root 设备并重新启用 ad hoc Wifi,网络上有很多关于如何在已 root 的 Android 设备上启用 ad hoc 的解决方案。这是一个软件问题,据我所知,每台 Android 设备上的硬件都支持 ad hoc Wifi。

Ad hoc wifi is disabled in Android. You need to ask Google why they have chosen to do so. If you have access to a device that allow you to install custom Android images, you will be able to patch Android to support it. Or you can root your device and reenable ad hoc Wifi, there are plenty of solutions on the web on how to enable ad hoc on rooted Android devices. This is a software issue, the hardware on every Android device that I know of has support for ad hoc Wifi.

痴骨ら 2024-10-29 07:01:27

Serval 项目部分基于 WiFi Tether,是我发现此功能的唯一地方。它仍处于阿尔法阶段,但似乎是该领域的先行者。 wiki 比上面链接的主项目页面有用得多,其中包含安装说明和一些文档。

Serval 可能适合也可能不适合您的需求,但我认为应该指出的是,自组织网络在 Android 上并非不可能。不过,最好还是等到 Google 开始将其实现为标准 API(如果您相信他们会这么做的话:))。

The Serval Project, based in part on WiFi Tether, is the only place I've found this functionality. It's still alpha phase, but seems to be the forerunner in the field. The wiki is much more useful than the main project page linked above, with installation instructions and a bit of documentation.

Serval may or may not be right for your needs, but I felt it should be pointed out that ad-hoc networking is not impossible on Android. It might be better to wait until Google gets around to implementing it as standard API, though (if you believe they ever will :) ).

故人爱我别走 2024-10-29 07:01:27

嗯,您可能有兴趣查看 AllJoyn。它是适用于 Android 操作系统的 qualcoms SDK,其中包括通过创建 adhoc 连接来实现 wi-fi 点对点实现。这与 Wi-Fi Direct 相同。

Well You might be interested in looking at AllJoyn. It is qualcoms SDK for android OS which includes wi-fi peer-to-peer implementations by creating adhoc connections. This is same as Wi-Fi Direct.

宫墨修音 2024-10-29 07:01:27

Android 目前不支持 ad-hoc WiFi - 抱歉!

更新(2019):Android已经支持WiFi Direct一段时间了,这个答案还没有更新。

你的方案会起作用。只要 B(组所有者)在 A 和 C 的范围内,A 就能够与 C 连接。

有关详细信息,请参阅 Android 开发人员文档:

https://developer.android.com/guide/topics/connectivity/wifip2p

Android does not have support for ad-hoc WiFi at this time -- sorry!

Update (2019): Android has supported WiFi Direct for a while, and this answer has not been updated.

Your scenario would work. A would be able to connect with C as long as B (the group owner) is within range of both A and C.

See Android's developer documentation for more info:

https://developer.android.com/guide/topics/connectivity/wifip2p

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文