It seems at though the Linux Lejos uses doesn't include iw/iwlist, which would give me what I wanted. So I figure I have two options:
- Find a way to compile the iwlist tools into an valid bash program, and put that on the EV3 brick.
- Try to use ioctl to access the info I need through JNA.
I don't even know where to begin with the first one, and since I'm on a windows box, it seems like it might fairly difficult (build a cross compile toolchain to ARM, get the right settings for the EV3 brick, compile, etc.).
So I've tried a bit with the second. But I'm having the hardest time figuring out the ioctl interface for wireless. I've looked at the Linux wireless.h file, and have a rough idea of the structures and how to define those using JNA, but I can't figure out the format for the ioctl calls that need to pass additional information (namely: get information about access point X, where X is not the one I'm currently connected to).
Anyway, does anyone have any hints as to what I could do to make this work for me? If there is an easy way to get compiled versions of iwlist, I'd use that and just parse the result. All of this stuff seems fairly opaque and I don't understand how anybody figures it out in the first place.