13

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

Dimitri
  • 8,122
  • 19
  • 71
  • 128

2 Answers2

10

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.

hu-zza
  • 79
  • 1
  • 1
  • 9
ldx
  • 3,984
  • 23
  • 28
1

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

Community
  • 1
  • 1
gfelisberto
  • 1,655
  • 11
  • 18