Feature #708
openNeed network config app
20%
Description
pnc is too big and bulky. I need a C/GTK+ version of imwww, but without AP setup. This doesn't need to be complex. Just set the SSID, password, etc - just like with imwww.
Files
Updated by Hammel over 4 years ago
- File network-config.png network-config.png added
- Status changed from New to In Progress
- % Done changed from 0 to 10
This is the imwww interface. I just need a GTK+ interface for the upper half, with an additional field for current IP address.
Updated by Hammel over 4 years ago
The initial UI is ready. It has a builtin keyboard that was suprisingly easy to write, mostly because of the way I originally wrote the launcher to handle icon touch points. With the keyboard, each touch point is just that much smaller. However, it's only been tested on the desktop. I need to tear down the hardware and add a keyboard so I can get wifi config information to be able to test it on real hardware.
Anyway, the next step should be fairly simple. I need to gather the fields (which is already done in submit()) and pass them to piboxd. The way to do this can be seen in Ironman's imwww/php/settings-write.php:saveWireless(). It looks like this:
$header = 0x00000903; // MT_NET, MA_SETWIRELESS $size = strlen($msg); socket_write($socket, pack("I", $header), 4); socket_write($socket, pack("I", $size), 4); socket_write($socket, $msg, strlen($msg));
where msg is a colon seperated set of values, as in:
$msg = $ssid . ":" . $security . ":" . $pw;
The security field can be sent as ordinary text - the backend pnc library handles that.
Updated by Hammel over 4 years ago
- % Done changed from 10 to 40
Actually, I already have an API for this in libpibox: piboxMsg(). There is an example in picam:
piboxMsgSend(MT_STREAM, MA_START, 0, tag, strlen("webcam"), "webcam", NULL, 0);
However, this is for a custom function in picam. The libpibox API is simpler. For xeonnc it would look like this:
(fill buf with colon delimited fields) piboxMsg(MT_NET, MA_SETWIRELESS, 0, buf, strlen(buf), &returnBuf);
where returnBuf is a pointer to a buffer to hold the returned data. For setting the wireless there is no return data. But we'll also need
- getWireless - to fill in the fields initially
- getIP - to get the IP address of the wifi interface