From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: bug#35640: Make USB modems just work on Guix Date: Wed, 8 May 2019 20:26:07 +0200 Message-ID: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nc2j33f4en2jwjnc" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:51457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hORHX-0005fx-B1 for bug-guix@gnu.org; Wed, 08 May 2019 14:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hORHU-0003pW-GR for bug-guix@gnu.org; Wed, 08 May 2019 14:27:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48668) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hORHS-0003oe-KA for bug-guix@gnu.org; Wed, 08 May 2019 14:27:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hORHS-0000W2-ET for bug-guix@gnu.org; Wed, 08 May 2019 14:27:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:51344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hORGy-0004rr-Oq for bug-guix@gnu.org; Wed, 08 May 2019 14:26:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hORGv-0003XX-HA for bug-guix@gnu.org; Wed, 08 May 2019 14:26:32 -0400 Received: from pelzflorian.de ([5.45.111.108]:60810 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hORGu-0003S0-Fw for bug-guix@gnu.org; Wed, 08 May 2019 14:26:29 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id C81E8360038 for ; Wed, 8 May 2019 20:26:07 +0200 (CEST) Content-Disposition: inline List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 35640@debbugs.gnu.org --nc2j33f4en2jwjnc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable When plugging in a USB modem, i.e. a =E2=80=9Csurf stick=E2=80=9D / inter= net stick with a SIM card for mobile broadband, setup should be as simple as WiFi. However, a few things are missing in Guix. First, the manual claims: -- Scheme Variable: modem-manager-service-type [=E2=80=A6] This service is part of =E2=80=98%desktop-services=E2=80=99 (*note D= esktop Services::). But it is not part of %desktop-services. The first attached patch fixes this oversight. Now I can type this to get an internet connection: sudo nmcli connection add type gsm ifname ttyUSB1 apn internet However, I want to be able to do this setup graphically. I made a second patch to propagate iso-codes (for mobile broadband country selection) and mobile-broadband-provider-selection (for selecting defaults for providers) in nm-connection-editor (network-manager-applet) and gnome-control-center. Propagation is ugly though. Should I try patching network-manager-applet instead? I assume there are other packages doing such patching that I can imitate. Now I can configure the modem as Mobile Broadband in a graphical interface. I cannot do so in nmtui; I believe this modem setup feature is not included in nmtui. However, this is not the whole truth. Before I can configure anything, I have to run sudo ~/usr/sbin/usb_modeswitch -c ~/Downloads/usb-modeswitch-data-2017080= 6/usb_modeswitch.d/12d1:14fe -v 0x12d1 -p 0x14fe because my modem by default presents itself as a CD containing Windows drivers and not as a USB modem. Preferrably, usb-modeswitch and usb-modeswitch-data would be packaged (as a single package). I can try that later this week. Lastly, there are udev rules in usb-modeswitch, I believe, because on Debian I do not need to run any command; mode switching happens automatically when plugging in the USB modem. I suppose that means there should also be a usb-modeswitch-service-type extending udev? Regards, Florian --nc2j33f4en2jwjnc Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-services-Include-ModemManager-in-desktop-services.patch" Content-Transfer-Encoding: quoted-printable >From 5e9b45fe785dee52da2a67fbecbabc4741f85e54 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Tue, 7 May 2019 11:51:43 +0200 Subject: [PATCH 1/2] services: Include ModemManager in %desktop-services. * gnu/services/desktop.scm (%desktop-services): Add modem-manager-service= -type. --- gnu/services/desktop.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 5e0bd102a2..c0300c0ddc 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1062,6 +1062,9 @@ dispatches events from it."))) =20 ;; The D-Bus clique. (service network-manager-service-type) + (service modem-manager-service-type) ;the manual claims this we= re + ;part of %desktop-services= , but + ;it wasn=E2=80=99t (service wpa-supplicant-service-type) ;needed by NetworkMana= ger (service avahi-service-type) (udisks-service) --=20 2.21.0 --nc2j33f4en2jwjnc Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0002-gnu-network-manager-applet-Propagate-packages-requir.patch" >From d489f805599ea63e2e06727a3201572ee0480a60 Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Wed, 8 May 2019 20:02:00 +0200 Subject: [PATCH 2/2] gnu: network-manager-applet: Propagate packages required for USB modem setup. * gnu/packages/gnome.scm (network-manager-applet): Propagate iso-codes and mobile-broadband-provider-info. (gnome-control-center): Ditto. --- gnu/packages/gnome.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 7c40a39f01..a3765007bf 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5511,10 +5511,12 @@ to virtual private networks (VPNs) via OpenVPN.") ;; libnm-gtk.pc refers to all these. `(("dbus-glib" ,dbus-glib) ("gtk+" ,gtk+) + ("iso-codes" ,iso-codes) ;mobile broadband country selection + ("mobile-broadband-provider-info" + ,mobile-broadband-provider-info) ;mobile broadband provider selection ("network-manager" ,network-manager))) (inputs - `(("iso-codes" ,iso-codes) - ("libgudev" ,libgudev) + `(("libgudev" ,libgudev) ("libnotify" ,libnotify) ("libsecret" ,libsecret) ("libselinux" ,libselinux) @@ -5895,6 +5897,10 @@ devices using the GNOME desktop.") ("smbclient" ,samba) ("tzdata" ,tzdata) ("upower" ,upower))) + (propagated-inputs + `(("iso-codes" ,iso-codes) ;mobile broadband country selection + ("mobile-broadband-provider-info" + ,mobile-broadband-provider-info))) ;mobile broadband provider selection (synopsis "Utilities to configure the GNOME desktop") (home-page "https://www.gnome.org/") (description -- 2.21.0 --nc2j33f4en2jwjnc--