forked from RishiGupta12/SerialPundit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cp210x-unload-vcp-driver.sh
executable file
·29 lines (22 loc) · 1.17 KB
/
cp210x-unload-vcp-driver.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
#
# This file is part of SerialPundit.
#
# Copyright (C) 2014-2016, Rishi Gupta. All rights reserved.
#
# The SerialPundit is DUAL LICENSED. It is made available under the terms of the GNU Affero
# General Public License (AGPL) v3.0 for non-commercial use and under the terms of a commercial
# license for commercial use of this software.
#
# The SerialPundit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#################################################################################################
# Run this script as root user.
# When a CP210X device is connected to system linux kernel with udev tries to load appropriate VCP driver
# for connected device. If we do not want default driver, this script will unload default driver.
# Note that once the driver has been unloaded then if the device is un-plugged and plugged again into system
# default driver will get loaded again automatically by udev/kernel. So this script must be run each time
# USB-UART device is plugged into system.
set -e
modprobe -r cp210x
echo "default cp210x unloaded !"