GNU bug report logs - #36141
[PATCH] installer: Unblock relevant rfkill switches.

Previous Next

Package: guix-patches;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Sat, 8 Jun 2019 17:56:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36141 in the body.
You can then email your comments to 36141 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#36141; Package guix-patches. (Sat, 08 Jun 2019 17:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 08 Jun 2019 17:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: guix-patches <at> gnu.org
Subject: [PATCH] installer: Unblock relevant rfkill switches.
Date: Sat,  8 Jun 2019 19:55:05 +0200
* 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 <at> gmail.com>
+;;; Copyright © 2019 Tobias Geerinckx-Rice <me <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#36141; Package guix-patches. (Sat, 08 Jun 2019 18:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 36141 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 36141 <at> debbugs.gnu.org
Subject: Re: [bug#36141] [PATCH] installer: Unblock relevant rfkill switches.
Date: Sat, 08 Jun 2019 20:14:40 +0200
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#36141; Package guix-patches. (Sun, 09 Jun 2019 00:21:02 GMT) Full text and rfc822 format available.

Message #11 received at 36141 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 36141 <at> debbugs.gnu.org
Subject: Re: [bug#36141] [PATCH] installer: Unblock relevant rfkill switches.
Date: Sun, 09 Jun 2019 02:20:39 +0200
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Tue, 03 Aug 2021 19:36:02 GMT) Full text and rfc822 format available.

Notification sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
bug acknowledged by developer. (Tue, 03 Aug 2021 19:36:02 GMT) Full text and rfc822 format available.

Message #16 received at 36141-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 36141-done <at> debbugs.gnu.org
Subject: Re: bug#36141: [PATCH] installer: Unblock relevant rfkill switches.
Date: Tue, 03 Aug 2021 15:34:55 -0400
Hi Tobias,

Tobias Geerinckx-Rice <me <at> 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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 01 Sep 2021 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.