eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

README (2212B)


      1 better* iwctl
      2 =============
      3 
      4 After wracking my brain over how I'm going to do this, I'm just going to
      5 literally wing it.
      6 
      7 This is the first piece of the new iwctl. It connects to iwd over a local
      8 Unix socket, sends ping!, and expects pong! back. On success it prints:
      9 
     10     ping! pong!
     11 
     12 Start the daemon in one terminal (as root):
     13 
     14     ./src/iwd
     15 
     16 Then run the client in another (also as root):
     17 
     18     ./ctl/iwctl
     19 
     20 To print one wireless interface name per line:
     21 
     22     ./ctl/iwctl device list
     23 
     24 To get the status:
     25 
     26     ./ctl/iwctl status
     27 
     28 To get the networks:
     29 
     30     ./ctl/iwctl networks
     31 
     32 To connect to a network:
     33 
     34     ./ctl/iwctl connect SSID [PASSPHRASE]
     35 
     36 To disconnect from the network
     37 
     38    ./ctl/iwctl disconnect
     39 
     40 An empty list prints nothing. Each name comes in its own packet with a
     41 trailing NUL. An empty name ends the list.
     42 
     43 The default socket is /run/eiwd.sock, set by CONTROLSOCKET in config.mk.
     44 IWD_CONTROL_SOCKET overrides the path at runtime; set the same value for
     45 both processes. The socket is created with mode 0600, so the client needs
     46 to run as its owner, normally root (sorry). The exchange uses SOCK_SEQPACKET.
     47 It allows 16 active clients since idk, one of these days someone will need
     48 that I suppose.
     49 
     50 Source map, relative to the project root for any contributors:
     51 
     52     ctl/main.c          client connection, exchange, and result
     53     shared/control.h    protocol definitions (very large tmb)
     54     src/control.c       listener and client handling in ELL's event loop
     55     src/control.h       control_init() and control_exit()
     56     src/main.c          starts and stops the listener with iwd
     57 
     58 Normal shutdown removes the socket. Existing paths are never overwritten;
     59 a stale socket left by a crash needs manual removal after confirming that
     60 the old daemon is no longer running. TL;DR just your regular dameon/client
     61 socket stuffs.
     62 
     63 *footnote: ahem, the author (me) makes no guarantees that this is going to
     64 be good.
     65 
     66 P.S. Thank you xplshn for this amazing work (added connect/status/disconnect)!
     67 
     68 TODOs (in no particular order)
     69 ------------------------------
     70     - misc options and commands
     71     - (maybe) improve iwctl interface
     72     - allow specification of the actual wireless device (iwctl station [dev])