shermp / Kobo-UNCaGED

UNCaGED, for Kobo devices
GNU Affero General Public License v3.0
95 stars 7 forks source link

Shell script updates for wpa_supplicant and USB power #21

Closed shermp closed 5 years ago

shermp commented 5 years ago

Well, I'm back from holiday. Time to ease back into this...

Just a couple of shell script updates to make things a little nicer.

The first update uses the wpa_cli application to ensure that wpa_supplicant connects before trying to obtain an IP address. While I haven't timed it, this check actually seems to improve Wifi connection time.

The second update adds an option to allow the user to launch KU if their Kobo is plugged into USB power. This is disabled by default.

@NiLuJe can you sanity check these changes please?

I will probably publish a new release after this PR.

NiLuJe commented 5 years ago

I have no experience w/ wpa_cli, but that sounds sensible :).

shermp commented 5 years ago

I have no experience w/ wpa_cli, but that sounds sensible :).

It was either that, or get wpa_supplicant to log to a file and poll that. wpa_cli seemed cleaner, and it's available, so I'm using it.

shermp commented 5 years ago

Note, from a pure code separation point of view, I'm not terribly happy using the ku.toml config file for the USB power thing, as that file was designed for the Go binary, not the shell scripts.

From the users point of view though, it makes no sense to have separate config files to manage, and the user also shouldn't have to modify the scripts at all, and the Go code can ignore any setting it doesn't know about, so that's where I've put it.

shermp commented 5 years ago

Thank you all for your feedback on this. Will merge, and then start the process of creating another release. It's been a long time since the last one, and there's been a lot of changes.