适用于Linux或C语言的无线API [英] Wireless API for Linux in C or Java

查看:560
本文介绍了适用于Linux或C语言的无线API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

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

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

推荐答案

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

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:

http:/ /wireless.kernel.org/en/developers/Documentation/nl80211

目前 iw 是使用nl80211的命令行实用程序,所以你可以列出可用的硬件,扫描等:

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

http://linuxwireless.org/en/users/Documentation/iw

其源代码易于学习和重用项目,看看他们的git回购。

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

这篇关于适用于Linux或C语言的无线API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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