adding udev rule install for sixfab with quectel EC-25-E

This commit is contained in:
Droid Sitebots 2021-05-06 12:23:52 +02:00
parent b81b3e676d
commit 18ea0eed3f
2 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,7 @@ SOURCE_PATH="$REPO_PATH/$BRANCH/src"
SCRIPT_PATH="$REPO_PATH/$BRANCH/src/reconnect_scripts" SCRIPT_PATH="$REPO_PATH/$BRANCH/src/reconnect_scripts"
MANAGER_SCRIPT_NAME="jetson_ppp_connection_manager.sh" MANAGER_SCRIPT_NAME="jetson_ppp_connection_manager.sh"
SERVICE_NAME="jetson_ppp_connection_manager.service" SERVICE_NAME="jetson_ppp_connection_manager.service"
UDEV_RULE_NAME="20-usb-bus.rules"
YELLOW='\033[1;33m' YELLOW='\033[1;33m'
RED='\033[0;31m' RED='\033[0;31m'
@ -164,6 +165,9 @@ do
wget --no-check-certificate $SOURCE_PATH/$MANAGER_SCRIPT_NAME -O $MANAGER_SCRIPT_NAME 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 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 # APN Configuration
sed -i "s/SIM_APN/$carrierapn/" jetson_configure_modem.sh sed -i "s/SIM_APN/$carrierapn/" jetson_configure_modem.sh
@ -175,6 +179,7 @@ do
mv jetson_configure_modem.sh $PPP_PATH mv jetson_configure_modem.sh $PPP_PATH
mv $MANAGER_SCRIPT_NAME $PPP_PATH mv $MANAGER_SCRIPT_NAME $PPP_PATH
mv $SERVICE_NAME /etc/systemd/system/ mv $SERVICE_NAME /etc/systemd/system/
mv $UDEV_RULE_NAME /etc/udev/rules.d/
systemctl daemon-reload systemctl daemon-reload
systemctl enable $SERVICE_NAME systemctl enable $SERVICE_NAME

3
src/20-usb-bus.rules Normal file
View File

@ -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"