Android 可以进行点对点自组织网络吗?

发布于 2024-08-15 14:45:07 字数 104 浏览 5 评论 0原文

是否可以将 Android 设置为 ad-hoc 点对点 wifi 模式?例如,我想让一部电话广播一条消息,并让网络中的所有对等方接收广播,而无需服务器。我想使用 wifi,因为蓝牙范围更有限。

Is it possible to set up Android in ad-hoc peer-to-peer wifi mode? For example, I would like to have one phone broadcast a message, and have all peers in the network receive the broadcast, without having a server. I would like to use wifi since bluetooth range is more limited.

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

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

发布评论

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

评论(11

淡墨 2024-08-22 14:45:07

这是有关您请求的功能的错误报告。

它的状态是“已审核”,但我认为它尚未实施。

http://code.google.com/p/android/issues/detail ?id=82

Here's a bug report on the feature you're requesting.

It's status is "reviewed" but I don't believe it's been implemented yet.

http://code.google.com/p/android/issues/detail?id=82

雨的味道风的声音 2024-08-22 14:45:07

尽管 Android 无法找到并连接到 ad-hoc 网络,但它肯定可以连接到接入点。因此,作为解决方法,您可以使用 Connectify 将无线卡变成接入点。

Although Android can't find and connect to ad-hoc networks it sure can connect to Access Points. So as a work-around you can turn your Wireless Card into an Access Point using, for example, Connectify.

风蛊 2024-08-22 14:45:07

我和我的朋友目前正在我们的学士论文中开发一个实现 AODV 协议(适合移动网络的多跳路由)的 java 库。最终的“产品”包括一种在多个 Android 设备上创建/加入 adhoc 网络的简单方法,以及通过库发送和接收消息的接口。不幸的是,每种类型的手机(例如 Hero、Nexus One...)都有一种依赖于手机的方式来创建临时网络,因此目前我们仅支持少数手机。

这意味着一旦该项目完成,拥有 root 权限的手机的用户只需将库 .jar 文件包含在其 Android 项目中即可实现其分布式应用程序(文件共享、游戏等)。

顺便说一下,它都是开源的

http://code.google.com/p/adhoc -on-android/

my friend and I are currently developing a java library implementing the AODV protocol (multihop routing suitable for mobile networks), in our bachelor thesis. The final 'product' includes a easy way to create/join an adhoc network on several android devices and an interface through the library, to send and receive messages. Unfortunately each type of phone such as hero, nexsus one... have a phonedepended way for createing a adhoc network so currently we are only supporting a few phones).

this means that once this project is finished, people with rooted phones can implement their distributed applications (file sharing, games, ...) by simply including the library .jar file in their android projects.

it's all open source by the way

http://code.google.com/p/adhoc-on-android/

嘴硬脾气大 2024-08-22 14:45:07

您可以将 Android 设备连接到已知的 ad-hoc 网络。

编辑 /system/etc/wifi/tiwlan.ini

WiFiAdhoc = 1
dot11DesiredSSID = <your_network_ssid>
dot11DesiredBSSType = 0 

编辑 /data/misc/wifi/wpa_supplicant.conf

ctrl_interface=tiwlan0
update_config=1
eapol_version=1
ap_scan=2

如果这太简单,请参阅这些 说明

you can connect your android device to a known ad-hoc network.

edit /system/etc/wifi/tiwlan.ini

WiFiAdhoc = 1
dot11DesiredSSID = <your_network_ssid>
dot11DesiredBSSType = 0 

edit /data/misc/wifi/wpa_supplicant.conf

ctrl_interface=tiwlan0
update_config=1
eapol_version=1
ap_scan=2

if that is too simplistic, see these instructions.

稚气少女 2024-08-22 14:45:07

API 级别 14 起,即可支持点对点 WiFi 网络。

Support for peer to peer WiFi networking is available since API level 14.

关于从前 2024-08-22 14:45:07

您的答案是通过 ICS 提供的 Wi-Fi direct。以下是 Android 文档 中的解释链接

Your answer is Wi-Fi direct which is made available with ICS. Here is a link for explanation in Android doc

︶葆Ⅱㄣ 2024-08-22 14:45:07

在 Android 上使用 JmDNS 可能有效:http://jmdns.sourceforge.net/

那里有大量支持 Zeroconf 的机器,因此这将不仅仅能够通过 Android 设备进行发现。

It might work to use JmDNS on Android: http://jmdns.sourceforge.net/

There are tons of zeroconf-enabled machines out there, so this would enable discovery with more than just Android devices.

海未深 2024-08-22 14:45:07

您可以使用 Alljoyn 框架在 Android 中实现点对点连接。它基于 Ad-hoc 网络并且也是开源的。

You can use Alljoyn framework for Peer-to-Peer connectivity in Android. Its based on Ad-hoc networking and also Open source.

束缚m 2024-08-22 14:45:07

我不认为它提供了多跳无线数据包路由环境。但是您可以尝试集成一个简单的路由机制。只需查看 Wi-Share 即可了解它是如何实现的完毕。

I don't think it provides a multi-hop wireless packet routing environment. However you can try to integrate a simple routing mechanism. Just check out Wi-Share to get an idea how it can be done.

jJeQQOZ5 2024-08-22 14:45:07

是的,但是:
1. root 您的设备(如果您像我一样拥有 Nexus S,请参阅)
2.安装root explorer(市场搜索)
3. 找到适当的 wpa_supplcant 文件并替换(和备份)原始文件,如此线程<中所示/a>

以上是在我的 Nexus S I9023 android 2.3.6 上测试的

Yes, but:
1. root your device (in case you've got Nexus S like me, see this)
2. install root explorer (search in market)
3. find appropriate wpa_supplcant file and replace (and backup) original as shown in this thread

above was tested on my Nexus S I9023 android 2.3.6

小草泠泠 2024-08-22 14:45:07

除了 Telmo Marques 的回答之外:我为此使用 虚拟路由器

与 connectify 一样,它会在 Windows 8、Windows 7 或 2008 R2 计算机上创建一个接入点,但它是开源的。

In addition to Telmo Marques answer: I use Virtual Router for this.

Like connectify it creates an accesspoint on your Windows 8, Windows 7 or 2008 R2 machine, but it's open-source.

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