############################################################################
# 20-modem-ec21-rules
#
# Quectel EC21 Rules
#
# Find the PCIe 3G modem and create symlinks for it
# only works if we plug in a modem that will use the option linux module
#
# /dev/modemPPP = Modem PPP Data port, limited AT command support 
#                Used to instantiate a PPP data connection only
#
# /dev/modemAT  = Modem AT command port, all AT commands supported. 
#                Can be used when PPP Data port active.
#                Can also be used to instantiate a PPP data connection
#
# /dev/modemGPS = NEMA GPS Feed
#
#
# Author:       Andrew O'Connell
# Last Revised: 30th August 2016
# Created:      30th August 2016
############################################################################

#KERNELS=="1-1.4*",SUBSYSTEMS=="usb",ATTRS{idVendor}!="05c6",GOTO="modem_UC20_end"

KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="00",SYMLINK+="modemS0"
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="01",SYMLINK+="modemS1"
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="02",SYMLINK+="modemS2"
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="03",SYMLINK+="modemS3"
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="04",SYMLINK+="modemS4"

KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="02",SYMLINK+="modemPPP"
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="03",SYMLINK+="modemAT"
KERNELS=="1-1.4*",SUBSYSTEMS=="usb", DRIVERS=="option", ATTRS{bInterfaceNumber}=="01",SYMLINK+="modemGPS"


#LABEL="modem_UC20_end"
