Project

General

Profile

Actions

Feature #708

open

Need network config app

Added by Hammel over 5 years ago. Updated over 1 year ago.

Status:
In Progress
Priority:
Normal
Assignee:
Target version:
Start date:
24 Mar 2019
Due date:
% Done:

20%

Estimated time:
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.


Files

network-config.png (76.3 KB) network-config.png network config imwww Hammel, 20 May 2019 19:28
Actions #1

Updated by Hammel over 5 years ago

This is the imwww interface. I just need a GTK+ interface for the upper half, with an additional field for current IP address.

Actions #2

Updated by Hammel over 5 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.

Actions #3

Updated by Hammel over 5 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
Actions #4

Updated by Hammel over 1 year ago

  • Target version changed from v0.1 to Xeon 1.0 - Asimov
  • % Done changed from 40 to 20

Update after migration from custom hardware to PinePhone Pro.

This issue can easily be handled via the PiNet app. PiNet just needs to be ported (if any porting is required) to Xeon.

Actions

Also available in: Atom PDF