C 或 Java 的 Linux 无线 API

发布于 2024-10-19 03:38:28 字数 202 浏览 6 评论 0原文

我和我的团队正在开发一个基于无人机 Parrot API 的项目。 我们正在尝试找到一个API来编写一个小程序,可以扫描无线网络并选择无人机的ESSID。我们的主要语言是 C,但 Java 也很受欢迎。

我尝试查看是否存在 iwlist/iwconfig 命令的 API,但没有找到任何内容。 有人可以帮我吗?任何示例(代码示例)也将受到赞赏。

格拉西亚斯

my team and I are working in a project based on the drone Parrot API.
We are trying to find an api to write a small program which can scan the wireless network and selects the drone ESSID. Our main language is C but Java is also appreciated.

I tried to look if exist any API for the iwlist/iwconfig command but i did not find anything.
Can someone help me plz? Any example (code sample) will also be appreciated.

Gracias

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

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

发布评论

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

评论(2

初吻给了烟 2024-10-26 03:38:28

对于较新的内核,管理无线卡的框架称为nl80211。它基于 netlink,因此您可以使用 libnl 发出命令并解析答案。更多信息:

https://wireless.wiki.kernel.org/en/developers /documentation/nl80211

目前 iw 是利用 nl80211 的命令行实用程序,因此您可以列出可用的硬件、扫描等:

https://wireless.wiki.kernel.org/en/users/documentation/iw

它的源代码很容易研究和使用在你自己的项目中重用,只需查看他们的 git 存储库即可。

With newer kernels the framework for managing wireless cards is called nl80211. It's netlink based, so you can use libnl to issue commands and parse answers. More information:

https://wireless.wiki.kernel.org/en/developers/documentation/nl80211

Currently iw is the command line utility that utilizes nl80211, so you can list available hardware, scan, etc:

https://wireless.wiki.kernel.org/en/users/documentation/iw

Its source code is easy to study and reuse in your own project, just check out their git repo.

醉南桥 2024-10-26 03:38:28

没有 API,但您可以尝试: Excecute iwconfig from a java application

您也可以尝试 http://kosmosisland.com/island/david/kosmos-island-wireless .php 。他们有一个 Java Applet(带有源代码)来监视无线链路。你可以看到他们是如何做到的。

古斯塔沃

No API but you can try: Excecute iwconfig from a java application

You can also try http://kosmosisland.com/island/david/kosmos-island-wireless.php . They have a Java Applet (with source) that monitors the Wireless Link. You can see how they did it.

Gustavo

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