C 或 Java 的 Linux 无线 API
我和我的团队正在开发一个基于无人机 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于较新的内核,管理无线卡的框架称为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.
没有 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