Feature #708
Need network config app
Status: | In Progress | Start date: | 24 Mar 2019 | ||
---|---|---|---|---|---|
Priority: | Normal | Due date: | |||
Assignee: | % Done: | 40% | |||
Category: | - | ||||
Target version: | v0.1 | ||||
Severity: | 03 - Medium |
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.</p>
Associated revisions
RM #708: Fix install scripts to format and install to an image file. This is so I can work on getting QEMU to boot PiBox and allow me to test apps without having to use the Pis directly (which can be hard if I have to tear apart a Xeon phone, for example).
History
#1
Updated by Hammel over 1 year ago
- File 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.
#2
Updated by Hammel over 1 year 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.
#3
Updated by Hammel over 1 year 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