Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
Before Width: | Height: | Size: 494 KiB After Width: | Height: | Size: 494 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 344 KiB After Width: | Height: | Size: 344 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
@ -1,66 +0,0 @@
|
|||||||
---
|
|
||||||
title: handy tools for MMDVM
|
|
||||||
summary: >
|
|
||||||
Some nice ideas and so...
|
|
||||||
date: 2022-07-31T13:12:39+02:00
|
|
||||||
#categories: [computerstuff]
|
|
||||||
tags: [linux,systemd,networking,manjaro,dns]
|
|
||||||
draft: true
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
#### the script
|
|
||||||
|
|
||||||
~~~bash
|
|
||||||
# file: "kill-mmdvm.sh"
|
|
||||||
#!/bin/bash
|
|
||||||
#udev/rules.d contains a rule file like:
|
|
||||||
#SUBSYSTEM=="tty", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0094", SYMLINK+="ttyGD77", TAG+="systemd", ENV{SYSTEMD_WANTS}="mmdvmhost.service"
|
|
||||||
#ACTION=="remove", SUBSYSTEM=="tty", ENV{ID_VENDOR_ID}=="1fc9", ENV{ID_MODEL_ID}=="0094", RUN+="/etc/udev/kill-mmdvm.sh"
|
|
||||||
#
|
|
||||||
#mmdvmhost service stopping lasts about 1 minute to succeed, so kill is the option...
|
|
||||||
if [ "$ACTION" = "remove" ]
|
|
||||||
then
|
|
||||||
systemctl kill -s KILL mmdvmhost.service
|
|
||||||
fi
|
|
||||||
~~~
|
|
||||||
|
|
||||||
#### restarting/reloading udev rules without reboot
|
|
||||||
|
|
||||||
~~~console
|
|
||||||
# udevadm control --reload-rules && udevadm trigger
|
|
||||||
~~~
|
|
||||||
|
|
||||||
#### gd77 udev rules
|
|
||||||
|
|
||||||
~~~ini
|
|
||||||
# file: "/etc/udev/rules.d/99-gd77.rules"
|
|
||||||
# USB rules for GD-77
|
|
||||||
# Place this in /etc/udev/rules.d/ to let all users talk to the radios by USB.
|
|
||||||
|
|
||||||
#
|
|
||||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666"
|
|
||||||
|
|
||||||
# HIDAPI/libusb
|
|
||||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666"
|
|
||||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0094", MODE="0666"
|
|
||||||
|
|
||||||
# HIDAPI/hidraw
|
|
||||||
KERNEL=="hidraw*", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666"
|
|
||||||
KERNEL=="hidraw*", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0094", MODE="0666"
|
|
||||||
|
|
||||||
# HIDAPI/hiddev
|
|
||||||
## We need to unbind this device, otherwise LibUsb will fail to SetConfiguration() and ClaimInterface()
|
|
||||||
# For Bootloader (usbhid)
|
|
||||||
KERNEL=="hiddev*", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0073", MODE="0666", RUN+="/bin/bash -c 'ID=$(IFS=/; read -a array <<< %p; echo ${array[-3]}); echo $ID > /sys/bus/usb/drivers/usbhid/unbind'"
|
|
||||||
|
|
||||||
# OpenGD77
|
|
||||||
KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0094", MODE="0666", GROUP="dialout", SYMLINK+="OpenGD77"
|
|
||||||
~~~
|
|
||||||
|
|
||||||
***
|
|
||||||
|
|
||||||
Sources:
|
|
||||||
|
|
||||||
* <https://gist.github.com/gru-github/cf7c121e6b0e441676fb3263ebe02193>
|
|
||||||
* <https://unix.stackexchange.com/questions/39370/how-to-reload-udev-rules-without-reboot>
|
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 299 KiB After Width: | Height: | Size: 299 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 247 KiB |
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 190 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |