From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: 35640@debbugs.gnu.org
Subject: bug#35640: Make USB modems just work on Guix
Date: Wed, 8 May 2019 20:26:07 +0200 [thread overview]
Message-ID: <20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain> (raw)
[-- Attachment #1: Type: text/plain, Size: 1971 bytes --]
When plugging in a USB modem, i.e. a “surf stick” / internet 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
[…]
This service is part of ‘%desktop-services’ (*note Desktop
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-20170806/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
[-- Attachment #2: 0001-services-Include-ModemManager-in-desktop-services.patch --]
[-- Type: text/plain, Size: 1078 bytes --]
From 5e9b45fe785dee52da2a67fbecbabc4741f85e54 Mon Sep 17 00:00:00 2001
From: Florian Pelz <pelzflorian@pelzflorian.de>
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.")))
;; The D-Bus clique.
(service network-manager-service-type)
+ (service modem-manager-service-type) ;the manual claims this were
+ ;part of %desktop-services, but
+ ;it wasn’t
(service wpa-supplicant-service-type) ;needed by NetworkManager
(service avahi-service-type)
(udisks-service)
--
2.21.0
[-- Attachment #3: 0002-gnu-network-manager-applet-Propagate-packages-requir.patch --]
[-- Type: text/plain, Size: 1757 bytes --]
From d489f805599ea63e2e06727a3201572ee0480a60 Mon Sep 17 00:00:00 2001
From: Florian Pelz <pelzflorian@pelzflorian.de>
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
next reply other threads:[~2019-05-08 18:27 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 18:26 pelzflorian (Florian Pelz) [this message]
2019-05-09 5:31 ` bug#35640: Make USB modems just work on Guix pelzflorian (Florian Pelz)
2019-05-09 12:55 ` Danny Milosavljevic
2019-05-09 13:07 ` pelzflorian (Florian Pelz)
2019-05-09 13:43 ` pelzflorian (Florian Pelz)
2019-05-09 15:24 ` Ludovic Courtès
2019-05-13 20:57 ` pelzflorian (Florian Pelz)
2019-05-13 21:04 ` pelzflorian (Florian Pelz)
2019-05-14 7:22 ` pelzflorian (Florian Pelz)
2019-05-14 8:35 ` Danny Milosavljevic
2019-05-14 20:56 ` pelzflorian (Florian Pelz)
2019-05-15 13:01 ` Ludovic Courtès
2019-05-15 14:40 ` pelzflorian (Florian Pelz)
2019-05-22 16:29 ` pelzflorian (Florian Pelz)
2019-05-22 17:58 ` pelzflorian (Florian Pelz)
2019-05-24 15:37 ` Ludovic Courtès
2019-05-24 20:12 ` pelzflorian (Florian Pelz)
2019-05-25 11:18 ` pelzflorian (Florian Pelz)
2019-05-25 12:43 ` pelzflorian (Florian Pelz)
2019-05-25 17:44 ` Ludovic Courtès
2019-05-25 19:42 ` pelzflorian (Florian Pelz)
2019-06-12 10:36 ` pelzflorian (Florian Pelz)
2019-06-12 10:41 ` pelzflorian (Florian Pelz)
2019-06-12 21:00 ` Ludovic Courtès
2019-06-12 21:11 ` Ludovic Courtès
2019-06-13 18:04 ` pelzflorian (Florian Pelz)
2019-06-13 18:05 ` pelzflorian (Florian Pelz)
2019-06-15 16:39 ` Ludovic Courtès
2019-06-12 12:13 ` pelzflorian (Florian Pelz)
2019-06-12 12:21 ` Ludovic Courtès
2019-06-12 19:51 ` pelzflorian (Florian Pelz)
2019-06-12 20:42 ` Ludovic Courtès
2019-06-12 20:58 ` Ludovic Courtès
2019-05-14 20:48 ` Ludovic Courtès
2019-05-15 11:17 ` pelzflorian (Florian Pelz)
2019-05-15 12:51 ` Ludovic Courtès
2019-05-16 7:50 ` pelzflorian (Florian Pelz)
2019-05-16 8:34 ` pelzflorian (Florian Pelz)
2019-05-16 11:30 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190508182607.wcjfxkoqwcvzrdmt@pelzflorian.localdomain \
--to=pelzflorian@pelzflorian.de \
--cc=35640@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).