From 18ea0eed3fc0ea3f26e12e70f26ae78c762ce12a Mon Sep 17 00:00:00 2001 From: Droid Sitebots Date: Thu, 6 May 2021 12:23:52 +0200 Subject: [PATCH] adding udev rule install for sixfab with quectel EC-25-E --- ppp_install_jetson.sh | 5 +++++ src/20-usb-bus.rules | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 src/20-usb-bus.rules diff --git a/ppp_install_jetson.sh b/ppp_install_jetson.sh index 25620b3..39c3f0e 100755 --- a/ppp_install_jetson.sh +++ b/ppp_install_jetson.sh @@ -15,6 +15,7 @@ SOURCE_PATH="$REPO_PATH/$BRANCH/src" SCRIPT_PATH="$REPO_PATH/$BRANCH/src/reconnect_scripts" MANAGER_SCRIPT_NAME="jetson_ppp_connection_manager.sh" SERVICE_NAME="jetson_ppp_connection_manager.service" +UDEV_RULE_NAME="20-usb-bus.rules" YELLOW='\033[1;33m' RED='\033[0;31m' @@ -163,6 +164,9 @@ do wget --no-check-certificate $SOURCE_PATH/$MANAGER_SCRIPT_NAME -O $MANAGER_SCRIPT_NAME if [[ $? -ne 0 ]]; then colored_echo "Download failed" ${RED}; exit 1; fi + + wget --no-check-certificate $SOURCE_PATH/$UDEV_RULE_NAME -O $UDEV_RULE_NAME + if [[ $? -ne 0 ]]; then colored_echo "Download failed" ${RED}; exit 1; fi # APN Configuration sed -i "s/SIM_APN/$carrierapn/" jetson_configure_modem.sh @@ -175,6 +179,7 @@ do mv jetson_configure_modem.sh $PPP_PATH mv $MANAGER_SCRIPT_NAME $PPP_PATH mv $SERVICE_NAME /etc/systemd/system/ + mv $UDEV_RULE_NAME /etc/udev/rules.d/ systemctl daemon-reload systemctl enable $SERVICE_NAME diff --git a/src/20-usb-bus.rules b/src/20-usb-bus.rules new file mode 100644 index 0000000..2f4de32 --- /dev/null +++ b/src/20-usb-bus.rules @@ -0,0 +1,3 @@ +# UDEV RULE FOR SIXFAB WITH EC-25-E +SUBSYSTEMS=="usb", ENV{ID_USB_INTERFACE_NUM}="$attr{bInterfaceNumber}" +SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="0125", SYMLINK+="sixfab$env{ID_USB_INTERFACE_NUM}", TAG+="systemd"