bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35640: Make USB modems just work on Guix


From: pelzflorian (Florian Pelz)
Subject: bug#35640: Make USB modems just work on Guix
Date: Sat, 25 May 2019 13:18:56 +0200
User-agent: NeoMutt/20180716

On Fri, May 24, 2019 at 10:12:10PM +0200, pelzflorian (Florian Pelz) wrote:
> I will send an updated patch tomorrow with a working ”dispatcher“
> output.
> 

Please find attached a patch that no longer propagates
usb-modeswitch-data from usb-modeswitch.  I can now modeswitch my USB
modem by running

$ ./pre-inst-env guix install usb-modeswitch:dispatcher
$ lsmod -v #find bus name and device name of modem
[…]
Bus 001 Device 007: ID 12d1:14fe Huawei Technologies Co., Ltd. Modem (Mass 
Storage Mode)
$ for d in /sys/bus/usb/devices/*/; do echo $d; cat $d/busnum; cat $d/devnum; 
done
[…]
/sys/bus/usb/devices/1-1/
1
7
[…]
$ sudo usb_modeswitch_dispatcher --switch-mode 1-1 --config-file 
~/.guix-profile/etc/usb_modeswitch.conf


I added the --config-file option since by default
usb_modeswitch_dispatcher loads its optional config file from /etc and
a future Guix service type for USB_ModeSwitch should be able to pass a
config file.


The udev rules file in usb-modeswitch-data has lines like:

ATTR{idVendor}=="03f0", ATTR{idProduct}=="002a", RUN+="usb_modeswitch '/%k'"

Maybe I should substitute these by

RUN+="/gnu/store/…-usb-modeswich-2.5.2/usb_modeswitch '/%k'"

but this would introduce a cyclic dependency between usb-modeswitch
and usb-modeswitch-data.  Therefore this rules file should rather be
fixed in a future USB_ModeSwitch service type.

Regards,
Florian

Attachment: 0001-gnu-Add-USB_ModeSwitch.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]