unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#36141] [PATCH] installer: Unblock relevant rfkill switches.
@ 2019-06-08 17:55 Tobias Geerinckx-Rice
  2019-06-08 18:14 ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-06-08 17:55 UTC (permalink / raw)
  To: 36141

* gnu/installer/connman.scm (connman-enable-technology): Call ‘rfkill’
to (soft-)unblock a wireless technology before enabling it.
---
Guix,

Scanning for Wi-Fi networks on a Dell Latitude E6400 shows nothing
before running ‘rfkill unblock all’ on another VT.

Do this automatically, and more specifically.

K-regs,

T G-R

 gnu/installer/connman.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gnu/installer/connman.scm b/gnu/installer/connman.scm
index 7f47b9af77..0c72aaf2a1 100644
--- a/gnu/installer/connman.scm
+++ b/gnu/installer/connman.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -236,7 +237,12 @@ list so that each keys of a given technology are gathered in a separate list."
 
 (define (connman-enable-technology technology)
   "Enable the given TECHNOLOGY."
-  (let ((type (technology-type technology)))
+  (let* ((type (technology-type technology))
+         (connman-rfkill-types `(("bluetooth" . "bluetooth")
+                                 ("wifi" . "wlan")))
+         (rfkill-type (assoc-ref connman-rfkill-types type)))
+    (when rfkill-type
+      (system* "rfkill" "unblock" rfkill-type))
     (connman "enable" type)))
 
 (define (connman-disable-technology technology)
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#36141] [PATCH] installer: Unblock relevant rfkill switches.
  2019-06-08 17:55 [bug#36141] [PATCH] installer: Unblock relevant rfkill switches Tobias Geerinckx-Rice
@ 2019-06-08 18:14 ` Tobias Geerinckx-Rice
  2019-06-09  0:20   ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-06-08 18:14 UTC (permalink / raw)
  To: 36141

[-- Attachment #1: Type: text/plain, Size: 835 bytes --]

Oh…

Tobias Geerinckx-Rice wrote:
> +         (connman-rfkill-types `(("bluetooth" . "bluetooth")
> +                                 ("wifi" . "wlan")))
> +         (rfkill-type (assoc-ref connman-rfkill-types type)))

Turns out that util-linux allows ‘wifi’ as a special alias for 
‘wlan’:

  // only result for ‘grep -riw wifi’:
  static const struct rfkill_type_str rfkill_type_strings[] = {
    { .type = RFKILL_TYPE_ALL,       .name = "all"  },
    { .type = RFKILL_TYPE_WLAN,      .name = "wlan",
      .desc = "Wireless LAN" },
    { .type = RFKILL_TYPE_WLAN,      .name = "wifi" }, /* alias */

…so we could drop connman-rfkill-types completely and rely on that 
(undocumented!) quirk.

Of course I don't believe we should, but now you know as much as I 
do :-)

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#36141] [PATCH] installer: Unblock relevant rfkill switches.
  2019-06-08 18:14 ` Tobias Geerinckx-Rice
@ 2019-06-09  0:20   ` Tobias Geerinckx-Rice
  2021-08-03 19:34     ` bug#36141: " Maxim Cournoyer
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-06-09  0:20 UTC (permalink / raw)
  To: 36141

[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

Tobias Geerinckx-Rice wrote:
> [hokum]

Never mind, there's something else going on here.  connmanctl 
handles (blindly clobbers, even) rfkill for you.  Perhaps I lost a 
race.  Possibly due to this machine's 3 Wi-Fi cards.

Still, something's not right.  To be continued…

Sorry for my noise,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#36141: [PATCH] installer: Unblock relevant rfkill switches.
  2019-06-09  0:20   ` Tobias Geerinckx-Rice
@ 2021-08-03 19:34     ` Maxim Cournoyer
  0 siblings, 0 replies; 4+ messages in thread
From: Maxim Cournoyer @ 2021-08-03 19:34 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 36141-done

Hi Tobias,

Tobias Geerinckx-Rice <me@tobias.gr> writes:

> Tobias Geerinckx-Rice wrote:
>> [hokum]
>
> Never mind, there's something else going on here.  connmanctl handles
> (blindly clobbers, even) rfkill for you.  Perhaps I lost a race.
> Possibly due to this machine's 3 Wi-Fi cards.
>
> Still, something's not right.  To be continued…
>
> Sorry for my noise,
>
> T G-R

I'll close this one, but feel free to open a bug if you stumble upon a
problem in this area again.

Thanks,

Maxim




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-03 19:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-08 17:55 [bug#36141] [PATCH] installer: Unblock relevant rfkill switches Tobias Geerinckx-Rice
2019-06-08 18:14 ` Tobias Geerinckx-Rice
2019-06-09  0:20   ` Tobias Geerinckx-Rice
2021-08-03 19:34     ` bug#36141: " Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).