WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: eiwd, a minimalistic wpa_supplicant alternative  (Read 3294 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
eiwd, a minimalistic wpa_supplicant alternative
« on: March 09, 2021, 12:36:56 PM »
eiwd (https://github.com/dylanaraps/eiwd) is a fork of Intel's iwd to remove dependency on dbus. Everything eiwd needs to get you connected to WiFi is provided by the kernel itself. In the case of TCL, its sole dependency is wireless-KERNEL.tcz.

Here is wpa_supplicant's dependency tree:
Code: [Select]
-----wpa_supplicant-dbus.tcz
     |-----libnl.tcz
     |-----dbus.tcz
     |     |-----expat2.tcz
     |     |-----elogind.tcz
     |     |     |-----acl.tcz
     |     |     |     |-----attr.tcz
     |     |     |-----libcap.tcz
     |     |     |     |-----attr.tcz
     |-----openssl-1.1.1.tcz
     |-----readline.tcz
     |     |-----ncursesw.tcz
     |-----wireless_tools.tcz
     |     |-----wireless-KERNEL.tcz
     |     |-----libiw.tcz

Here is eiwd's dependency tree 8):
Code: [Select]
-----eiwd.tcz
     |-----wireless-KERNEL.tcz

I submitted eiwd.tcz for TCL11 and TCL12 (x86_64 only). Barebones usage examples are in the .info file. Enjoy!

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: eiwd, a minimalistic wpa_supplicant alternative
« Reply #1 on: March 09, 2021, 02:09:02 PM »
By the way, if your needs are simple like mine (all I need is for my laptop to connect to highest-ranking hotspot among those currently available), then you don't need a network manager. This is more than enough: eiwd.tcz (or wpa_supplicant-dbus.tcz), iw.tcz (to scan available networks), and a simple shell script to tie things together.

I attached the "autowifi" shell script that I've been using with eiwd.tcz. All you need to adjust is the interface name at the top (if yours is something other than wlan0) and the ssid/password pairs (use an empty string for password for hotspots that don't have a password).

Run the script as root at boot and/or manually ("sudo autowifi") whenever you want to connect to highest-ranking of the currently available networks.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: eiwd, a minimalistic wpa_supplicant alternative
« Reply #2 on: March 09, 2021, 10:59:35 PM »
Oops, the autowifi script I posted above assumes eiwd's built-in dhcp client is enabled, which is not the default behavior.

Here's the autowifi script again, tweaked to work with eiwd's default behavior of performing AP association only.

P.S. I'm sorry for spamming the thread. At least it's my own ;D

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: eiwd, a minimalistic wpa_supplicant alternative
« Reply #3 on: March 10, 2021, 02:08:13 AM »
Hi, GNUser!
Package looks very attractive, thanks for the info and submitting! Can I try to build it for x86, or there exist any obstacles?

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: eiwd, a minimalistic wpa_supplicant alternative
« Reply #4 on: March 10, 2021, 08:23:28 AM »
Hi, jazzbiker. I think it would build for x86 just fine. I've attached my build notes and .info file in case they're helpful to you.

P.S. I discovered that iwd_passphrase is just a trivial shell script, so you can easily replace the relevant line in my autowifi script with this:
  printf "[Security]\nPassphrase=$password\n" >/var/lib/iwd/"$ssid".psk

When all the dust has settled, it turns out that the minimum you need to add to barebones TCL system to enjoy WiFi is wireless-KERNEL.tcz and the (e)iwd binary :)
« Last Edit: March 10, 2021, 08:27:22 AM by GNUser »

Offline nick65go

  • Hero Member
  • *****
  • Posts: 839
Re: eiwd, a minimalistic wpa_supplicant alternative
« Reply #5 on: March 12, 2021, 06:02:47 AM »
Thank you GNUser! This is the trend I like to see in Tinycore.
Cutting the fat. Same as using apulse to cut PulseAudio bloat.
PS: I still use FLWM environment, no need for icons (which I do not remember what they do) just to run few main (bloated also) applications like firefox, vlc, libreoffice. YMMV.
« Last Edit: March 12, 2021, 06:30:09 AM by nick65go »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: eiwd, a minimalistic wpa_supplicant alternative
« Reply #6 on: March 24, 2021, 10:30:10 AM »
You're welcome, nick65go. TCL inspires me to cut out as much fat as possible from my computing!

BTW, I made some minor edits to my autowifi script:
1. Use printf instead of iwd_passphrase
2. Redirect to /dev/null at the iwd step (so that script's output looks nice when running it in a terminal)

I've been using this final version (attached) daily for a few weeks and am very happy with it.