Setup for OURLINK USB Wireless stopped working

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I bought one of the little cheap wirless usb sticks. Ubunbu would not find it and a kind person on this site supplied a script for setup. I had to run this after most or all reboots. I went through the procedure today. It produces errors and longer works. Any suggestions?



Script



#!/bin/bash
cd rtl8812AU
make clean
make
make install
modprobe 8812au

**bin bash**
#!/bin/bash
#
# Copyright (c) 2012
#
# Authors: Wild Man, Krytarik
# Helpers: chili555
#
# This script gathers the infos necessary for troubleshooting a wireless
# connection and saves them in a text file, wrapping it in an archive if it
# exceeds the 19.5 kB size limit for ".txt" attachments on the Ubuntu Forums.
#
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

SCRIPTDATE="2017-03-25 08:04 +0100"
FILEBASE="wireless-info"
OUTPUTDIR="$PWD"
OUTPUTDIRFB="/tmp"

MODMATCHES="(air|ar5|at7|ath[^3]?|b43|bcma|brcm|carl|ipw|iwl|ndis|r(818|8192[eu]|871|92su)|8(188|189|192|723|812)[acde][esu]|rt[23567]|rtl|ssb|wl|(cfg|mac)80211)"
LSMODMATCHES="(wmi|(dell|ideapad)[-_]laptop)"
IFACEMATCHES="(wlan[0-9]|eth[0-9])"
DMESGMATCHES="(firmware|[nN]etwork)"
NMPROFMATCHES="([connection]|id=|type=|permissions=|autoconnect=|[802-11-wireless]|[wifi]|ssid=|bssid=|mac-address(-blacklist)?=|mtu=|[802-1x]|[[:graph:]]*ca-certs?=|[ipv[46]]|method=)"

DMESGEXCL="apparmor|(cfg|mac)80211"
MODINFOEXCL="alias"
MODPROBEXCL="(alsa-base|blacklist-(firewire|framebuffer|modem|oss|watchdog)|fglrx|nvidia|fbdev|bumblebee)"
PMUTILSEXCL="/etc/pm/(power.d/(95hdparm-apm|intel-audio-powersave|sata_alpm)|sleep.d/(10_grub-common|10_unattended-upgrades.*|novatel_3g.*))"

NETMGRNAMES=("NetworkManager" "Wicd" "ConnMan")
NETMGRPATHS=("/usr/sbin/NetworkManager" "/usr/sbin/wicd" "/usr/sbin/connmand")
DEC2BI=(0..10..10..10..10..10..10..10..1)
DEC2HEX=($(printf "%02x " 0..255))

export LANG="en_US.UTF-8"
export LANGUAGE="en_US:en"
export LC_ALL="en_US.UTF-8"

if [ -t 0 ]; then
DIALOGAPP="terminal"
DIALOGBREAK=" "
TERMOUT="yes"
elif [ -x /usr/bin/zenity ]; then
DIALOGAPP="zenity"
DIALOGBREAK="n"
elif [ -x /usr/bin/kdialog ]; then
DIALOGAPP="kdialog"
DIALOGBREAK="n"
else
exit 1
fi

if [ -t 0 ]; then
SUDO="sudo"
elif [ -x /usr/bin/pkexec ]; then
SUDO="pkexec"
elif [ -x /usr/bin/gksudo ]; then
SUDO="gksudo"
GKSUDO="yes"
elif [ -x /usr/bin/kdesudo ]; then
SUDO="kdesudo"
KDESUDO="yes"
KDESUDOCMT=" needs administrative privileges. Please enter your password."
fi

dialog_info ()
case $DIALOGAPP in
terminal)
printf "%bn" "$1"
;;
zenity)
zenity --info --text="$1"
;;
kdialog)
kdialog --msgbox "$1"
;;
esac


dialog_error ()
case $DIALOGAPP in
terminal)
printf "%bn" "$1" >&2
;;
zenity)
zenity --error --text="$1"
;;
kdialog)
kdialog --error "$1"
;;
esac


dialog_question ()

ip6-mac () :)0+([[:alnum:]])/12/g;s/^([0:]+)/\(::\

exec 3>&1 4>&2
exec 1> "$OUTPUTDIR/$FILEBASE.txt" ||
dialog_error "$TERMOUT+nCannot write output file in "$OUTPUTDIR",$DIALOGBREAKtrying in "$OUTPUTDIRFB" instead.$TERMOUT+n"
OUTPUTDIR="$OUTPUTDIRFB"
exec 1> "$OUTPUTDIR/$FILEBASE.txt"
exec 2>&1

printf "n########## wireless info START ##########nn"
REPORTDATE=$(date +"%d %b %Y %H:%M %Z %z")
SCRIPTDATE=$(date -u -d "$SCRIPTDATE" +"%d %b %Y %H:%M %Z %z")
LASTBOOTDT=$(last -FRn 1 reboot | sed -n 's/.*system boot[ ]+(.+) - .*/1/p')
LASTBOOTDT=$(date -d "$LASTBOOTDT" +"%d %b %Y %H:%M %Z %z")
printf "Report from: %snn" "$REPORTDATE"
printf "Booted last: %snn" "$LASTBOOTDT"
printf "Script from: %sn" "$SCRIPTDATE"

printf "n##### release ###########################nn"
lsb_release -idrc

printf "n##### kernel ############################nn"
uname -srvmpio
echo
sed 's/root=[^ ]*//;s/[ ]+/, /g;s/^BOOT_IMAGE=[^ ]*/Parameters:/' /proc/cmdline

printf "n##### desktop ###########################nn"
if [ -n "$DESKTOP_SESSION" ]; then
DESKTOP="$DESKTOP_SESSION"
else
DESKTOP=$(sed -n 's/^Session=(.+)$/1/p' "$HOME/.dmrc")
DESKDMRC=" (from ~/.dmrc)"
fi
if [ -n "$DESKTOP" ]; then
if [ -f "/usr/share/xsessions/$DESKTOP.desktop" ]; then
DESKTOP=$(sed -n 's/^Name=(.+)$/1/p' "/usr/share/xsessions/$DESKTOP.desktop")
fi
echo "$DESKTOP/ Session/$DESKDMRC"
else
printf "nCould not be determined.n"
fi

printf "n##### lspci #############################nn"
lspci -nnk | grep -iA 2 '^[^[:space:]].*net' | sed '/^--$/d; /^[^[:space:]]/ i\'

printf "n##### lsusb #############################nn"
lsusb

printf "n##### PCMCIA card info ##################nn"
if [ -x /sbin/pccardctl ]; then
pccardctl info
else
echo "'pccardctl' is not installed (package "pcmciautils")."
fi

printf "n##### rfkill ############################nn"
rfkill list all

printf "n##### lsmod #############################nn"
LSMOD=$(lsmod | egrep "(^|[[:punct:] ])($MODMATCHES|$LSMODMATCHES)[^[:punct:] ]*([[:punct:] ]|$)")
echo "$LSMOD"

printf "n##### interfaces ########################nn"
sed '/^#/d;s/^wpa-psk [[:graph:]]+/wpa-psk <WPA key removed>/' /etc/network/interfaces

printf "n##### ifconfig ##########################nn"
if [ -x /sbin/ifconfig ]; then
IFCONFIG=$(ifconfig -a)
else
IFCONFIG=$(ip address show)
fi
echo "$IFCONFIG"
IFCONFIG=$(sed -n '1h; 1!H; $g;s/n /\ /g;p' <<< "$IFCONFIG")
IFACESETH=($(sed -n 's/^([^ ]+)[ ]+Link encap:Ethernet.*/1/p; s#^[0-9]+: ([^ :]+):.* link/ether.*#1#p' <<< "$IFCONFIG"))
if (( $#IFACESETH[@] > 0 )); then
IFETHMATCHES=$IFACESETH[@]
IFACEMATCHES="($IFACEMATCHES|($IFETHMATCHES// /))"
fi

printf "n##### iwconfig ##########################nn"
iwconfig

printf "n##### route #############################nn"
if [ -x /sbin/route ]; then
route -n
else
ip route show
fi

printf "n##### resolv.conf #######################nn"
grep -v '^#' /etc/resolv.conf

printf "n##### network managers ##################nn"
printf "Installed:nn"
for NETMGRNR in "$!NETMGRPATHS[@]"; do
if [ -f "$NETMGRPATHS[$NETMGRNR]" ]; then
NETMGRINST+=("$NETMGRNAMES[$NETMGRNR]")
fi
done
printf "t%sn" "$NETMGRINST[@]:-None found."
NETMGRMATCHES=$NETMGRPATHS[@]/#*//
NETMGRMATCHES=$NETMGRMATCHES//
NETMGRMATCHES="($)"
printf "nRunning:nn"
ps -ef | egrep "( |/)$NETMGRMATCHES($| )" || printf "tNone found.n"

printf "n##### NetworkManager info ###############nn"
if [ -x /usr/bin/nm-tool ]; then
nm-tool
elif [ -x /usr/bin/nmcli ]; then
nmcli -f all device show | sed '/^GENERAL.DEVICE:[ ]+lo$/,/^$/d; /^AP[[0-9]+]./d'
echo
nmcli -f SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY,ACTIVE,IN-USE device wifi list
else
echo "NetworkManager is not installed (package "network-manager")."
fi

printf "n##### NetworkManager.state ##############nn"
cat -s /var/lib/NetworkManager/NetworkManager.state

printf "n##### NetworkManager.conf ###############nn"
grep -v '^#' /etc/NetworkManager/NetworkManager.conf
if [ -f /etc/NetworkManager/nm-system-settings.conf ]; then
printf "nnm-system-settings.conf (used up to Ubuntu 10.04):nn"
grep -v '^#' /etc/NetworkManager/nm-system-settings.conf
fi

printf "n##### NetworkManager profiles ###########nn"
if [ -d /etc/NetworkManager/system-connections ]; then
if [ -n "$SUDO" ]; then
trap "" 2 3
NMPROFILES=$(find /etc/NetworkManager/system-connections -maxdepth 1 -type f -exec $SUDO$GKSUDO+ -D grep --$KDESUDO+ -d --comment "<b>grep</b>$KDESUDOCMT" -- grep -vH '^$' +) && SUDOSUCCESS="yes" || SUDOSUCCESS="no"
trap 2 3
if [ "$SUDOSUCCESS" = "yes" ]; then
ORIGIFS="$IFS"
IFS=$'n'
for NMWLPRFFILE in $(sed -n 's/^(.+):type=(802-11-wireless|wifi).*$/1/p' <<< "$NMPROFILES"); do
NMWLPRFFLPERMS=$(stat -c "%a %U" "$NMWLPRFFILE")
NMWLPROFILE=($(sed -n "s;^$NMWLPRFFILE:($NMPROFMATCHES.*)$;1 |;p" <<< "$NMPROFILES"))
NMWLPROFSOUT+="[[$NMWLPRFFILE]] ($NMWLPRFFLPERMS)"$'n'"$NMWLPROFILE[@]"$'nn'
done
IFS="$ORIGIFS"
sed 's# | [#n[#g;s#] |#]#g;s/ |$//' <<< "$NMWLPROFSOUT" | sed '/^[[^]]*]$/d'
else
printf "nAcquisition of admin privileges failed.n"
fi
else
echo "No way to acquire admin privileges found."
fi
else
echo "No NetworkManager profiles found."
fi

printf "n##### iw reg get ########################nn"
if [ -x /sbin/iw ]; then
if IWREGGET=$(iw reg get 2>&1) && [ -f /etc/timezone ]; then
REGION=$(cat /etc/timezone)
printf "Region: %s (based on set time zone)nn" "$REGION"
fi
echo "$IWREGGET"
else
echo "'iw' is not installed (package "iw")."
fi

printf "n##### iwlist channels ###################nn"
if [ -x /sbin/iwlist ]; then
iwlist chan
else
echo "'iwlist' is not installed (package "wireless-tools")."
fi

printf "n##### iwlist scan #######################nn"
if [ -x /sbin/iwlist ]; then
if [ -n "$SUDO" ]; then
trap "" 2 3
IWLISTSCAN=$($SUDO$KDESUDO+ -d iwlist scan) && SUDOSUCCESS="yes" || SUDOSUCCESS="no"
trap 2 3
if [ "$SUDOSUCCESS" = "yes" ]; then
if [[ $IWLISTSCAN = *Frequency:* ]]; then
printf "Channel occupancy:nn"
grep '^[ ]*Frequency:' <<< "$IWLISTSCAN" | sort | uniq -c | sed 's/^[ ]+([ ][0-9]+)[ ]+/ 1 APs on /'
echo
fi
grep -v '^[ ]*IE: Unknown:' <<< "$IWLISTSCAN"
else
printf "nAcquisition of admin privileges failed.n"
fi
else
echo "No way to acquire admin privileges found."
fi
else
echo "'iwlist' is not installed (package "wireless-tools")."
fi

printf "n##### module infos ######################nn"
MODULES=$(egrep -o "^$MODMATCHES[^ ]*" <<< "$LSMOD")
for MODULE in $MODULES; do
MODINFO=$(modinfo $MODULE | egrep -v "^$MODINFOEXCL:")
printf "[%s]n%snn" "$MODULE" "$MODINFO"
done

printf "n##### module parameters #################nn"
for MODULE in $MODULES; do
if [ -d /sys/module/$MODULE/parameters ]; then
MODPARAMS=$(grep -H '^[[:graph:]]' /sys/module/$MODULE/parameters/* | sed 's#^.*/##;s/:/: /')
printf "[%s]n%snn" "$MODULE" "$MODPARAMS"
fi
done

printf "n##### /etc/modules ######################nn"
grep -v '^#' /etc/modules

printf "n##### modprobe options ##################nn"
for MODPROBEFILE in $(find /etc/modprobe.conf,d -name "*.conf" -regextype posix-egrep -not -regex ".*$MODPROBEXCL.*" 2> /dev/null | sort); do
MODPROBEOPTS=$(egrep -v '^(#|$)' $MODPROBEFILE)
if [ -n "$MODPROBEOPTS" ]; then
printf "[%s]n%snn" "$MODPROBEFILE" "$MODPROBEOPTS"
fi
done

printf "n##### rc.local ##########################nn"
grep -v '^#' /etc/rc.local

printf "n##### pm-utils ##########################nn"
for PMUTILSFILE in $(find /etc/pm/*.d ( -type f -o -type l ) -regextype posix-egrep -not -regex "$PMUTILSEXCL" | sort); do
PMUTFLCONT=$(egrep -v '^(#|$)' $PMUTILSFILE)
if [ -n "$PMUTFLCONT" ]; then
PMUTFLPERMS=$(stat -c "%a %U" $PMUTILSFILE)
printf "[%s] (%s)n%snn" "$PMUTILSFILE" "$PMUTFLPERMS" "$PMUTFLCONT"
fi
done

printf "n##### udev rules ########################nn"
for UDEVRLFILE in $(find /etc/udev/rules.d -name "*net*.rules" | sort); do
UDEVRULES=$(grep -B1 '^[^#]' $UDEVRLFILE | egrep -v '^(--)?$')
if [ -n "$UDEVRULES" ]; then
printf "[%s]n%snn" "$UDEVRLFILE" "$UDEVRULES"
fi
done

printf "n##### dmesg #############################nn"
dmesg | tail -n 100 | egrep "[[:punct:] ]($MODMATCHES|$IFACEMATCHES|$DMESGMATCHES)[^[:punct:] ]*[[:punct:] ]" | egrep -v "$DMESGEXCL" | uniq -cf 2 | sed 's/^[ ]+1[ ]+//;s/^[ ]+([0-9]+)[ ]+(.+)$/2 (repeated 1 times)/'

printf "n########## wireless info END ############nn"

exec 2>&4 4>&-
exec 1>&3 3>&-

##### MAC address masking #####

RESULTS=$(cat -s "$OUTPUTDIR/$FILEBASE.txt")$'n'

ORIGIFS="$IFS"
IFS=$'n'

IFACESIDS=($(sed -n "/([[:alnum:]]2:)5[[:alnum:]]2/ /(00:)500/! s/^([^ ]+)[ ]+.*HWaddr.*/'1'/p; s/^[0-9]+: ([^ :]+):.*/'1'/p" <<< "$IFCONFIG"))
IFACESMACS=($(sed -n '/(00:)500/! s#.*(HWaddr|link/[^ ]+) (([[:alnum:]]2:)5[[:alnum:]]2).*#2#p' <<< "$IFCONFIG"))
IFACESIP6S=($(ip6-mac "$IFACESMACS[@]"))

WLAPSIWLIDS=($(sed -n "/^[ ]*Cell [0-9]+/,/^[ ]*ESSID:/ /^[ ]*Cell [0-9]+/h; /^[ ]*ESSID:/ H;g;s/^[ ]*Cell 0?([0-9]+).*ESSID:"(.*)"$/'2' [AC1]/p" <<< "$IWLISTSCAN"))
WLAPSIWLMACS=($(sed -n 's/^[ ]*Cell [0-9]+.*Address: ([^ ]+)/1/p' <<< "$IWLISTSCAN"))
WLAPSIWLIP6S=($(ip6-mac "$WLAPSIWLMACS[@]"))

WLAPSNMRAW=$(sed -n '/^##### NetworkManager info #####/,/^##### / /^[ ]*Wireless Access Points/,/^$/ /Wireless Access Points/d;s/^[ ]+*?//;s/:[ ]+/t/;p; /^SSID[ ]+BSSID[ ]+/,/^$/ /^SSID[ ]2,BSSID[ ]2,/d;s/[ ]2,/t/;p' <<< "$RESULTS")
WLAPSNMIDS=($(awk -F 't' 'print "'''" $1 "'''"' <<< "$WLAPSNMRAW"))
WLAPSNMMACS=($(grep -o '([[:alnum:]]2:)5[[:alnum:]]2' <<< "$WLAPSNMRAW"))
WLAPSNMIP6S=($(ip6-mac "$WLAPSNMMACS[@]"))

IFS="$ORIGIFS"

for IFACENR in "$!IFACESMACS[@]"; do
MACMASKSED+="s;$IFACESMACS[$IFACENR];<MAC $IFACESIDS[$IFACENR] [IF$(($IFACENR + 1))]>;I;"
MACMASKSED+=" /$IFACESIP6S[$IFACENR]/ s;$IFACESIP6S[$IFACENR]/#\(::/(;<IP6 $IFACESIDS[$IFACENR] [IF$(($IFACENR + 1))]>;I;"
IFACEMACC=$IFACESMACS[$IFACENR]//:/
if [[ $IFACESIDS[$IFACENR],, =~ $IFACEMACC,, ]]; then
MACMASKSED+="s;($IFACESIDS[$IFACENR]:1:3)$IFACEMACC;1<IF from MAC [IF$(($IFACENR + 1))]>;Ig;"
fi
done

for WLAPIWLNR in "$!WLAPSIWLMACS[@]"; do
MACMASKSED+="s;$WLAPSIWLMACS[$WLAPIWLNR];<MAC $WLAPSIWLIDS[$WLAPIWLNR]>;I;"
MACMASKSED+=" /$WLAPSIWLIP6S[$WLAPIWLNR]/ s;$WLAPSIWLIP6S[$WLAPIWLNR]/#\(::/(;<IP6 $WLAPSIWLIDS[$WLAPIWLNR]>;I;"
done

for WLAPNMNR in "$!WLAPSNMMACS[@]"; do
MACMASKSED+="s;$WLAPSNMMACS[$WLAPNMNR];<MAC $WLAPSNMIDS[$WLAPNMNR] [AN$(($WLAPNMNR + 1))]>;I;"
MACMASKSED+=" /$WLAPSNMIP6S[$WLAPNMNR]/ s;$WLAPSNMIP6S[$WLAPNMNR]/#\(::/(;<IP6 $WLAPSNMIDS[$WLAPNMNR] [AN$(($WLAPNMNR + 1))]>;I;"
done

sed "$MACMASKSED /([[:alnum:]]2:)6,/! s/([[:alnum:]]2:)5[[:alnum:]]2/<MAC address>/" <<< "$RESULTS" > "$OUTPUTDIR/$FILEBASE.txt"

##### The End #####

dialog_info "$TERMOUT+nResults saved in "$OUTPUTDIR/$FILEBASE.txt".$TERMOUT+n"

if (( $(stat -c %s "$OUTPUTDIR/$FILEBASE.txt") > 19968 )); then
tar -czf "$OUTPUTDIR/$FILEBASE.tar.gz" -C "$OUTPUTDIR" "$FILEBASE.txt" &&
dialog_info "Results also archived in "$OUTPUTDIR/$FILEBASE.tar.gz",$DIALOGBREAKas they exceed the 19.5 kB size limit for ".txt" attachments$DIALOGBREAKon the Ubuntu Forums.$TERMOUT+n" ||
dialog_error "Results exceed the 19.5 kB size limit for ".txt" attachments$DIALOGBREAKon the Ubuntu Forums, but archive could not be created.$TERMOUT+n"
fi

if [ -x /usr/bin/pastebinit ] && ping -nc 3 -w 6 -i 0.2 paste.ubuntu.com > /dev/null 2>&1; then
PASTEBIN=$(dialog_question "Do you also want to post them$DIALOGBREAKto your default 'pastebinit' provider?")
if [[ ! $PASTEBIN =~ ^no?$ ]]; then
PASTERESULT=$(pastebinit -i "$OUTPUTDIR/$FILEBASE.txt" -f text 2>&1) && PASTESUCCESS="yes"
if [ "$PASTESUCCESS" = "yes" ]; then
dialog_info "$TERMOUT+nPastebin successful:nn$PASTERESULT$TERMOUT+n"
else
if [ -n "$PASTERESULT" ]; then
dialog_error "$TERMOUT+nPastebin failed, error message is:nn$PASTERESULT$TERMOUT+n"
else
dialog_error "$TERMOUT+nPastebin failed, no error message given.$TERMOUT+n"
fi
fi
else
echo
fi
fi


Result



dan@Pavilion:~$ sudo ./sudoWIFI.sh
[sudo] password for dan:
cd hal/OUTSRC/ ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/led ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko
cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.13.0-32-generic/build M=/home/dan/rtl8812AU modules
make[1]: Entering directory '/usr/src/linux-headers-4.13.0-32-generic'
CC [M] /home/dan/rtl8812AU/core/rtw_cmd.o
In file included from /home/dan/rtl8812AU/include/drv_types.h:32:0,
from /home/dan/rtl8812AU/core/rtw_cmd.c:22:
/home/dan/rtl8812AU/include/osdep_service.h: In function ‘thread_enter’:
/home/dan/rtl8812AU/include/osdep_service.h:343:2: error: implicit declaration of function ‘allow_signal’ [-Werror=implicit-function-declaration]
allow_signal(SIGTERM);
^
/home/dan/rtl8812AU/include/osdep_service.h: In function ‘flush_signals_thread’:
/home/dan/rtl8812AU/include/osdep_service.h:353:6: error: implicit declaration of function ‘signal_pending’ [-Werror=implicit-function-declaration]
if (signal_pending (current))
^
/home/dan/rtl8812AU/include/osdep_service.h:355:3: error: implicit declaration of function ‘flush_signals’ [-Werror=implicit-function-declaration]
flush_signals(current);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target '/home/dan/rtl8812AU/core/rtw_cmd.o' failed
make[2]: *** [/home/dan/rtl8812AU/core/rtw_cmd.o] Error 1
Makefile:1550: recipe for target '_module_/home/dan/rtl8812AU' failed
make[1]: *** [_module_/home/dan/rtl8812AU] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-32-generic'
Makefile:1576: recipe for target 'modules' failed
make: *** [modules] Error 2
install -p -m 644 8812au.ko /lib/modules/4.13.0-32-generic/kernel/drivers/net/wireless/
install: cannot stat '8812au.ko': No such file or directory
Makefile:1582: recipe for target 'install' failed
make: *** [install] Error 1
modprobe: FATAL: Module 8812au not found in directory /lib/modules/4.13.0-32-generic









share|improve this question























  • Looking at this from another direction, is there a list of wireless adapters that are supported natively in Ubuntu. I just looked at Frys and non said Ubuntu compatible. Some say Linux compatible but the one I have says that too. This is for a desktop so a n internal card works too.
    – Dan
    Feb 2 at 20:00














up vote
0
down vote

favorite












I bought one of the little cheap wirless usb sticks. Ubunbu would not find it and a kind person on this site supplied a script for setup. I had to run this after most or all reboots. I went through the procedure today. It produces errors and longer works. Any suggestions?



Script



#!/bin/bash
cd rtl8812AU
make clean
make
make install
modprobe 8812au

**bin bash**
#!/bin/bash
#
# Copyright (c) 2012
#
# Authors: Wild Man, Krytarik
# Helpers: chili555
#
# This script gathers the infos necessary for troubleshooting a wireless
# connection and saves them in a text file, wrapping it in an archive if it
# exceeds the 19.5 kB size limit for ".txt" attachments on the Ubuntu Forums.
#
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

SCRIPTDATE="2017-03-25 08:04 +0100"
FILEBASE="wireless-info"
OUTPUTDIR="$PWD"
OUTPUTDIRFB="/tmp"

MODMATCHES="(air|ar5|at7|ath[^3]?|b43|bcma|brcm|carl|ipw|iwl|ndis|r(818|8192[eu]|871|92su)|8(188|189|192|723|812)[acde][esu]|rt[23567]|rtl|ssb|wl|(cfg|mac)80211)"
LSMODMATCHES="(wmi|(dell|ideapad)[-_]laptop)"
IFACEMATCHES="(wlan[0-9]|eth[0-9])"
DMESGMATCHES="(firmware|[nN]etwork)"
NMPROFMATCHES="([connection]|id=|type=|permissions=|autoconnect=|[802-11-wireless]|[wifi]|ssid=|bssid=|mac-address(-blacklist)?=|mtu=|[802-1x]|[[:graph:]]*ca-certs?=|[ipv[46]]|method=)"

DMESGEXCL="apparmor|(cfg|mac)80211"
MODINFOEXCL="alias"
MODPROBEXCL="(alsa-base|blacklist-(firewire|framebuffer|modem|oss|watchdog)|fglrx|nvidia|fbdev|bumblebee)"
PMUTILSEXCL="/etc/pm/(power.d/(95hdparm-apm|intel-audio-powersave|sata_alpm)|sleep.d/(10_grub-common|10_unattended-upgrades.*|novatel_3g.*))"

NETMGRNAMES=("NetworkManager" "Wicd" "ConnMan")
NETMGRPATHS=("/usr/sbin/NetworkManager" "/usr/sbin/wicd" "/usr/sbin/connmand")
DEC2BI=(0..10..10..10..10..10..10..10..1)
DEC2HEX=($(printf "%02x " 0..255))

export LANG="en_US.UTF-8"
export LANGUAGE="en_US:en"
export LC_ALL="en_US.UTF-8"

if [ -t 0 ]; then
DIALOGAPP="terminal"
DIALOGBREAK=" "
TERMOUT="yes"
elif [ -x /usr/bin/zenity ]; then
DIALOGAPP="zenity"
DIALOGBREAK="n"
elif [ -x /usr/bin/kdialog ]; then
DIALOGAPP="kdialog"
DIALOGBREAK="n"
else
exit 1
fi

if [ -t 0 ]; then
SUDO="sudo"
elif [ -x /usr/bin/pkexec ]; then
SUDO="pkexec"
elif [ -x /usr/bin/gksudo ]; then
SUDO="gksudo"
GKSUDO="yes"
elif [ -x /usr/bin/kdesudo ]; then
SUDO="kdesudo"
KDESUDO="yes"
KDESUDOCMT=" needs administrative privileges. Please enter your password."
fi

dialog_info ()
case $DIALOGAPP in
terminal)
printf "%bn" "$1"
;;
zenity)
zenity --info --text="$1"
;;
kdialog)
kdialog --msgbox "$1"
;;
esac


dialog_error ()
case $DIALOGAPP in
terminal)
printf "%bn" "$1" >&2
;;
zenity)
zenity --error --text="$1"
;;
kdialog)
kdialog --error "$1"
;;
esac


dialog_question ()

ip6-mac () :)0+([[:alnum:]])/12/g;s/^([0:]+)/\(::\

exec 3>&1 4>&2
exec 1> "$OUTPUTDIR/$FILEBASE.txt" ||
dialog_error "$TERMOUT+nCannot write output file in "$OUTPUTDIR",$DIALOGBREAKtrying in "$OUTPUTDIRFB" instead.$TERMOUT+n"
OUTPUTDIR="$OUTPUTDIRFB"
exec 1> "$OUTPUTDIR/$FILEBASE.txt"
exec 2>&1

printf "n########## wireless info START ##########nn"
REPORTDATE=$(date +"%d %b %Y %H:%M %Z %z")
SCRIPTDATE=$(date -u -d "$SCRIPTDATE" +"%d %b %Y %H:%M %Z %z")
LASTBOOTDT=$(last -FRn 1 reboot | sed -n 's/.*system boot[ ]+(.+) - .*/1/p')
LASTBOOTDT=$(date -d "$LASTBOOTDT" +"%d %b %Y %H:%M %Z %z")
printf "Report from: %snn" "$REPORTDATE"
printf "Booted last: %snn" "$LASTBOOTDT"
printf "Script from: %sn" "$SCRIPTDATE"

printf "n##### release ###########################nn"
lsb_release -idrc

printf "n##### kernel ############################nn"
uname -srvmpio
echo
sed 's/root=[^ ]*//;s/[ ]+/, /g;s/^BOOT_IMAGE=[^ ]*/Parameters:/' /proc/cmdline

printf "n##### desktop ###########################nn"
if [ -n "$DESKTOP_SESSION" ]; then
DESKTOP="$DESKTOP_SESSION"
else
DESKTOP=$(sed -n 's/^Session=(.+)$/1/p' "$HOME/.dmrc")
DESKDMRC=" (from ~/.dmrc)"
fi
if [ -n "$DESKTOP" ]; then
if [ -f "/usr/share/xsessions/$DESKTOP.desktop" ]; then
DESKTOP=$(sed -n 's/^Name=(.+)$/1/p' "/usr/share/xsessions/$DESKTOP.desktop")
fi
echo "$DESKTOP/ Session/$DESKDMRC"
else
printf "nCould not be determined.n"
fi

printf "n##### lspci #############################nn"
lspci -nnk | grep -iA 2 '^[^[:space:]].*net' | sed '/^--$/d; /^[^[:space:]]/ i\'

printf "n##### lsusb #############################nn"
lsusb

printf "n##### PCMCIA card info ##################nn"
if [ -x /sbin/pccardctl ]; then
pccardctl info
else
echo "'pccardctl' is not installed (package "pcmciautils")."
fi

printf "n##### rfkill ############################nn"
rfkill list all

printf "n##### lsmod #############################nn"
LSMOD=$(lsmod | egrep "(^|[[:punct:] ])($MODMATCHES|$LSMODMATCHES)[^[:punct:] ]*([[:punct:] ]|$)")
echo "$LSMOD"

printf "n##### interfaces ########################nn"
sed '/^#/d;s/^wpa-psk [[:graph:]]+/wpa-psk <WPA key removed>/' /etc/network/interfaces

printf "n##### ifconfig ##########################nn"
if [ -x /sbin/ifconfig ]; then
IFCONFIG=$(ifconfig -a)
else
IFCONFIG=$(ip address show)
fi
echo "$IFCONFIG"
IFCONFIG=$(sed -n '1h; 1!H; $g;s/n /\ /g;p' <<< "$IFCONFIG")
IFACESETH=($(sed -n 's/^([^ ]+)[ ]+Link encap:Ethernet.*/1/p; s#^[0-9]+: ([^ :]+):.* link/ether.*#1#p' <<< "$IFCONFIG"))
if (( $#IFACESETH[@] > 0 )); then
IFETHMATCHES=$IFACESETH[@]
IFACEMATCHES="($IFACEMATCHES|($IFETHMATCHES// /))"
fi

printf "n##### iwconfig ##########################nn"
iwconfig

printf "n##### route #############################nn"
if [ -x /sbin/route ]; then
route -n
else
ip route show
fi

printf "n##### resolv.conf #######################nn"
grep -v '^#' /etc/resolv.conf

printf "n##### network managers ##################nn"
printf "Installed:nn"
for NETMGRNR in "$!NETMGRPATHS[@]"; do
if [ -f "$NETMGRPATHS[$NETMGRNR]" ]; then
NETMGRINST+=("$NETMGRNAMES[$NETMGRNR]")
fi
done
printf "t%sn" "$NETMGRINST[@]:-None found."
NETMGRMATCHES=$NETMGRPATHS[@]/#*//
NETMGRMATCHES=$NETMGRMATCHES//
NETMGRMATCHES="($)"
printf "nRunning:nn"
ps -ef | egrep "( |/)$NETMGRMATCHES($| )" || printf "tNone found.n"

printf "n##### NetworkManager info ###############nn"
if [ -x /usr/bin/nm-tool ]; then
nm-tool
elif [ -x /usr/bin/nmcli ]; then
nmcli -f all device show | sed '/^GENERAL.DEVICE:[ ]+lo$/,/^$/d; /^AP[[0-9]+]./d'
echo
nmcli -f SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY,ACTIVE,IN-USE device wifi list
else
echo "NetworkManager is not installed (package "network-manager")."
fi

printf "n##### NetworkManager.state ##############nn"
cat -s /var/lib/NetworkManager/NetworkManager.state

printf "n##### NetworkManager.conf ###############nn"
grep -v '^#' /etc/NetworkManager/NetworkManager.conf
if [ -f /etc/NetworkManager/nm-system-settings.conf ]; then
printf "nnm-system-settings.conf (used up to Ubuntu 10.04):nn"
grep -v '^#' /etc/NetworkManager/nm-system-settings.conf
fi

printf "n##### NetworkManager profiles ###########nn"
if [ -d /etc/NetworkManager/system-connections ]; then
if [ -n "$SUDO" ]; then
trap "" 2 3
NMPROFILES=$(find /etc/NetworkManager/system-connections -maxdepth 1 -type f -exec $SUDO$GKSUDO+ -D grep --$KDESUDO+ -d --comment "<b>grep</b>$KDESUDOCMT" -- grep -vH '^$' +) && SUDOSUCCESS="yes" || SUDOSUCCESS="no"
trap 2 3
if [ "$SUDOSUCCESS" = "yes" ]; then
ORIGIFS="$IFS"
IFS=$'n'
for NMWLPRFFILE in $(sed -n 's/^(.+):type=(802-11-wireless|wifi).*$/1/p' <<< "$NMPROFILES"); do
NMWLPRFFLPERMS=$(stat -c "%a %U" "$NMWLPRFFILE")
NMWLPROFILE=($(sed -n "s;^$NMWLPRFFILE:($NMPROFMATCHES.*)$;1 |;p" <<< "$NMPROFILES"))
NMWLPROFSOUT+="[[$NMWLPRFFILE]] ($NMWLPRFFLPERMS)"$'n'"$NMWLPROFILE[@]"$'nn'
done
IFS="$ORIGIFS"
sed 's# | [#n[#g;s#] |#]#g;s/ |$//' <<< "$NMWLPROFSOUT" | sed '/^[[^]]*]$/d'
else
printf "nAcquisition of admin privileges failed.n"
fi
else
echo "No way to acquire admin privileges found."
fi
else
echo "No NetworkManager profiles found."
fi

printf "n##### iw reg get ########################nn"
if [ -x /sbin/iw ]; then
if IWREGGET=$(iw reg get 2>&1) && [ -f /etc/timezone ]; then
REGION=$(cat /etc/timezone)
printf "Region: %s (based on set time zone)nn" "$REGION"
fi
echo "$IWREGGET"
else
echo "'iw' is not installed (package "iw")."
fi

printf "n##### iwlist channels ###################nn"
if [ -x /sbin/iwlist ]; then
iwlist chan
else
echo "'iwlist' is not installed (package "wireless-tools")."
fi

printf "n##### iwlist scan #######################nn"
if [ -x /sbin/iwlist ]; then
if [ -n "$SUDO" ]; then
trap "" 2 3
IWLISTSCAN=$($SUDO$KDESUDO+ -d iwlist scan) && SUDOSUCCESS="yes" || SUDOSUCCESS="no"
trap 2 3
if [ "$SUDOSUCCESS" = "yes" ]; then
if [[ $IWLISTSCAN = *Frequency:* ]]; then
printf "Channel occupancy:nn"
grep '^[ ]*Frequency:' <<< "$IWLISTSCAN" | sort | uniq -c | sed 's/^[ ]+([ ][0-9]+)[ ]+/ 1 APs on /'
echo
fi
grep -v '^[ ]*IE: Unknown:' <<< "$IWLISTSCAN"
else
printf "nAcquisition of admin privileges failed.n"
fi
else
echo "No way to acquire admin privileges found."
fi
else
echo "'iwlist' is not installed (package "wireless-tools")."
fi

printf "n##### module infos ######################nn"
MODULES=$(egrep -o "^$MODMATCHES[^ ]*" <<< "$LSMOD")
for MODULE in $MODULES; do
MODINFO=$(modinfo $MODULE | egrep -v "^$MODINFOEXCL:")
printf "[%s]n%snn" "$MODULE" "$MODINFO"
done

printf "n##### module parameters #################nn"
for MODULE in $MODULES; do
if [ -d /sys/module/$MODULE/parameters ]; then
MODPARAMS=$(grep -H '^[[:graph:]]' /sys/module/$MODULE/parameters/* | sed 's#^.*/##;s/:/: /')
printf "[%s]n%snn" "$MODULE" "$MODPARAMS"
fi
done

printf "n##### /etc/modules ######################nn"
grep -v '^#' /etc/modules

printf "n##### modprobe options ##################nn"
for MODPROBEFILE in $(find /etc/modprobe.conf,d -name "*.conf" -regextype posix-egrep -not -regex ".*$MODPROBEXCL.*" 2> /dev/null | sort); do
MODPROBEOPTS=$(egrep -v '^(#|$)' $MODPROBEFILE)
if [ -n "$MODPROBEOPTS" ]; then
printf "[%s]n%snn" "$MODPROBEFILE" "$MODPROBEOPTS"
fi
done

printf "n##### rc.local ##########################nn"
grep -v '^#' /etc/rc.local

printf "n##### pm-utils ##########################nn"
for PMUTILSFILE in $(find /etc/pm/*.d ( -type f -o -type l ) -regextype posix-egrep -not -regex "$PMUTILSEXCL" | sort); do
PMUTFLCONT=$(egrep -v '^(#|$)' $PMUTILSFILE)
if [ -n "$PMUTFLCONT" ]; then
PMUTFLPERMS=$(stat -c "%a %U" $PMUTILSFILE)
printf "[%s] (%s)n%snn" "$PMUTILSFILE" "$PMUTFLPERMS" "$PMUTFLCONT"
fi
done

printf "n##### udev rules ########################nn"
for UDEVRLFILE in $(find /etc/udev/rules.d -name "*net*.rules" | sort); do
UDEVRULES=$(grep -B1 '^[^#]' $UDEVRLFILE | egrep -v '^(--)?$')
if [ -n "$UDEVRULES" ]; then
printf "[%s]n%snn" "$UDEVRLFILE" "$UDEVRULES"
fi
done

printf "n##### dmesg #############################nn"
dmesg | tail -n 100 | egrep "[[:punct:] ]($MODMATCHES|$IFACEMATCHES|$DMESGMATCHES)[^[:punct:] ]*[[:punct:] ]" | egrep -v "$DMESGEXCL" | uniq -cf 2 | sed 's/^[ ]+1[ ]+//;s/^[ ]+([0-9]+)[ ]+(.+)$/2 (repeated 1 times)/'

printf "n########## wireless info END ############nn"

exec 2>&4 4>&-
exec 1>&3 3>&-

##### MAC address masking #####

RESULTS=$(cat -s "$OUTPUTDIR/$FILEBASE.txt")$'n'

ORIGIFS="$IFS"
IFS=$'n'

IFACESIDS=($(sed -n "/([[:alnum:]]2:)5[[:alnum:]]2/ /(00:)500/! s/^([^ ]+)[ ]+.*HWaddr.*/'1'/p; s/^[0-9]+: ([^ :]+):.*/'1'/p" <<< "$IFCONFIG"))
IFACESMACS=($(sed -n '/(00:)500/! s#.*(HWaddr|link/[^ ]+) (([[:alnum:]]2:)5[[:alnum:]]2).*#2#p' <<< "$IFCONFIG"))
IFACESIP6S=($(ip6-mac "$IFACESMACS[@]"))

WLAPSIWLIDS=($(sed -n "/^[ ]*Cell [0-9]+/,/^[ ]*ESSID:/ /^[ ]*Cell [0-9]+/h; /^[ ]*ESSID:/ H;g;s/^[ ]*Cell 0?([0-9]+).*ESSID:"(.*)"$/'2' [AC1]/p" <<< "$IWLISTSCAN"))
WLAPSIWLMACS=($(sed -n 's/^[ ]*Cell [0-9]+.*Address: ([^ ]+)/1/p' <<< "$IWLISTSCAN"))
WLAPSIWLIP6S=($(ip6-mac "$WLAPSIWLMACS[@]"))

WLAPSNMRAW=$(sed -n '/^##### NetworkManager info #####/,/^##### / /^[ ]*Wireless Access Points/,/^$/ /Wireless Access Points/d;s/^[ ]+*?//;s/:[ ]+/t/;p; /^SSID[ ]+BSSID[ ]+/,/^$/ /^SSID[ ]2,BSSID[ ]2,/d;s/[ ]2,/t/;p' <<< "$RESULTS")
WLAPSNMIDS=($(awk -F 't' 'print "'''" $1 "'''"' <<< "$WLAPSNMRAW"))
WLAPSNMMACS=($(grep -o '([[:alnum:]]2:)5[[:alnum:]]2' <<< "$WLAPSNMRAW"))
WLAPSNMIP6S=($(ip6-mac "$WLAPSNMMACS[@]"))

IFS="$ORIGIFS"

for IFACENR in "$!IFACESMACS[@]"; do
MACMASKSED+="s;$IFACESMACS[$IFACENR];<MAC $IFACESIDS[$IFACENR] [IF$(($IFACENR + 1))]>;I;"
MACMASKSED+=" /$IFACESIP6S[$IFACENR]/ s;$IFACESIP6S[$IFACENR]/#\(::/(;<IP6 $IFACESIDS[$IFACENR] [IF$(($IFACENR + 1))]>;I;"
IFACEMACC=$IFACESMACS[$IFACENR]//:/
if [[ $IFACESIDS[$IFACENR],, =~ $IFACEMACC,, ]]; then
MACMASKSED+="s;($IFACESIDS[$IFACENR]:1:3)$IFACEMACC;1<IF from MAC [IF$(($IFACENR + 1))]>;Ig;"
fi
done

for WLAPIWLNR in "$!WLAPSIWLMACS[@]"; do
MACMASKSED+="s;$WLAPSIWLMACS[$WLAPIWLNR];<MAC $WLAPSIWLIDS[$WLAPIWLNR]>;I;"
MACMASKSED+=" /$WLAPSIWLIP6S[$WLAPIWLNR]/ s;$WLAPSIWLIP6S[$WLAPIWLNR]/#\(::/(;<IP6 $WLAPSIWLIDS[$WLAPIWLNR]>;I;"
done

for WLAPNMNR in "$!WLAPSNMMACS[@]"; do
MACMASKSED+="s;$WLAPSNMMACS[$WLAPNMNR];<MAC $WLAPSNMIDS[$WLAPNMNR] [AN$(($WLAPNMNR + 1))]>;I;"
MACMASKSED+=" /$WLAPSNMIP6S[$WLAPNMNR]/ s;$WLAPSNMIP6S[$WLAPNMNR]/#\(::/(;<IP6 $WLAPSNMIDS[$WLAPNMNR] [AN$(($WLAPNMNR + 1))]>;I;"
done

sed "$MACMASKSED /([[:alnum:]]2:)6,/! s/([[:alnum:]]2:)5[[:alnum:]]2/<MAC address>/" <<< "$RESULTS" > "$OUTPUTDIR/$FILEBASE.txt"

##### The End #####

dialog_info "$TERMOUT+nResults saved in "$OUTPUTDIR/$FILEBASE.txt".$TERMOUT+n"

if (( $(stat -c %s "$OUTPUTDIR/$FILEBASE.txt") > 19968 )); then
tar -czf "$OUTPUTDIR/$FILEBASE.tar.gz" -C "$OUTPUTDIR" "$FILEBASE.txt" &&
dialog_info "Results also archived in "$OUTPUTDIR/$FILEBASE.tar.gz",$DIALOGBREAKas they exceed the 19.5 kB size limit for ".txt" attachments$DIALOGBREAKon the Ubuntu Forums.$TERMOUT+n" ||
dialog_error "Results exceed the 19.5 kB size limit for ".txt" attachments$DIALOGBREAKon the Ubuntu Forums, but archive could not be created.$TERMOUT+n"
fi

if [ -x /usr/bin/pastebinit ] && ping -nc 3 -w 6 -i 0.2 paste.ubuntu.com > /dev/null 2>&1; then
PASTEBIN=$(dialog_question "Do you also want to post them$DIALOGBREAKto your default 'pastebinit' provider?")
if [[ ! $PASTEBIN =~ ^no?$ ]]; then
PASTERESULT=$(pastebinit -i "$OUTPUTDIR/$FILEBASE.txt" -f text 2>&1) && PASTESUCCESS="yes"
if [ "$PASTESUCCESS" = "yes" ]; then
dialog_info "$TERMOUT+nPastebin successful:nn$PASTERESULT$TERMOUT+n"
else
if [ -n "$PASTERESULT" ]; then
dialog_error "$TERMOUT+nPastebin failed, error message is:nn$PASTERESULT$TERMOUT+n"
else
dialog_error "$TERMOUT+nPastebin failed, no error message given.$TERMOUT+n"
fi
fi
else
echo
fi
fi


Result



dan@Pavilion:~$ sudo ./sudoWIFI.sh
[sudo] password for dan:
cd hal/OUTSRC/ ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/led ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko
cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.13.0-32-generic/build M=/home/dan/rtl8812AU modules
make[1]: Entering directory '/usr/src/linux-headers-4.13.0-32-generic'
CC [M] /home/dan/rtl8812AU/core/rtw_cmd.o
In file included from /home/dan/rtl8812AU/include/drv_types.h:32:0,
from /home/dan/rtl8812AU/core/rtw_cmd.c:22:
/home/dan/rtl8812AU/include/osdep_service.h: In function ‘thread_enter’:
/home/dan/rtl8812AU/include/osdep_service.h:343:2: error: implicit declaration of function ‘allow_signal’ [-Werror=implicit-function-declaration]
allow_signal(SIGTERM);
^
/home/dan/rtl8812AU/include/osdep_service.h: In function ‘flush_signals_thread’:
/home/dan/rtl8812AU/include/osdep_service.h:353:6: error: implicit declaration of function ‘signal_pending’ [-Werror=implicit-function-declaration]
if (signal_pending (current))
^
/home/dan/rtl8812AU/include/osdep_service.h:355:3: error: implicit declaration of function ‘flush_signals’ [-Werror=implicit-function-declaration]
flush_signals(current);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target '/home/dan/rtl8812AU/core/rtw_cmd.o' failed
make[2]: *** [/home/dan/rtl8812AU/core/rtw_cmd.o] Error 1
Makefile:1550: recipe for target '_module_/home/dan/rtl8812AU' failed
make[1]: *** [_module_/home/dan/rtl8812AU] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-32-generic'
Makefile:1576: recipe for target 'modules' failed
make: *** [modules] Error 2
install -p -m 644 8812au.ko /lib/modules/4.13.0-32-generic/kernel/drivers/net/wireless/
install: cannot stat '8812au.ko': No such file or directory
Makefile:1582: recipe for target 'install' failed
make: *** [install] Error 1
modprobe: FATAL: Module 8812au not found in directory /lib/modules/4.13.0-32-generic









share|improve this question























  • Looking at this from another direction, is there a list of wireless adapters that are supported natively in Ubuntu. I just looked at Frys and non said Ubuntu compatible. Some say Linux compatible but the one I have says that too. This is for a desktop so a n internal card works too.
    – Dan
    Feb 2 at 20:00












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I bought one of the little cheap wirless usb sticks. Ubunbu would not find it and a kind person on this site supplied a script for setup. I had to run this after most or all reboots. I went through the procedure today. It produces errors and longer works. Any suggestions?



Script



#!/bin/bash
cd rtl8812AU
make clean
make
make install
modprobe 8812au

**bin bash**
#!/bin/bash
#
# Copyright (c) 2012
#
# Authors: Wild Man, Krytarik
# Helpers: chili555
#
# This script gathers the infos necessary for troubleshooting a wireless
# connection and saves them in a text file, wrapping it in an archive if it
# exceeds the 19.5 kB size limit for ".txt" attachments on the Ubuntu Forums.
#
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

SCRIPTDATE="2017-03-25 08:04 +0100"
FILEBASE="wireless-info"
OUTPUTDIR="$PWD"
OUTPUTDIRFB="/tmp"

MODMATCHES="(air|ar5|at7|ath[^3]?|b43|bcma|brcm|carl|ipw|iwl|ndis|r(818|8192[eu]|871|92su)|8(188|189|192|723|812)[acde][esu]|rt[23567]|rtl|ssb|wl|(cfg|mac)80211)"
LSMODMATCHES="(wmi|(dell|ideapad)[-_]laptop)"
IFACEMATCHES="(wlan[0-9]|eth[0-9])"
DMESGMATCHES="(firmware|[nN]etwork)"
NMPROFMATCHES="([connection]|id=|type=|permissions=|autoconnect=|[802-11-wireless]|[wifi]|ssid=|bssid=|mac-address(-blacklist)?=|mtu=|[802-1x]|[[:graph:]]*ca-certs?=|[ipv[46]]|method=)"

DMESGEXCL="apparmor|(cfg|mac)80211"
MODINFOEXCL="alias"
MODPROBEXCL="(alsa-base|blacklist-(firewire|framebuffer|modem|oss|watchdog)|fglrx|nvidia|fbdev|bumblebee)"
PMUTILSEXCL="/etc/pm/(power.d/(95hdparm-apm|intel-audio-powersave|sata_alpm)|sleep.d/(10_grub-common|10_unattended-upgrades.*|novatel_3g.*))"

NETMGRNAMES=("NetworkManager" "Wicd" "ConnMan")
NETMGRPATHS=("/usr/sbin/NetworkManager" "/usr/sbin/wicd" "/usr/sbin/connmand")
DEC2BI=(0..10..10..10..10..10..10..10..1)
DEC2HEX=($(printf "%02x " 0..255))

export LANG="en_US.UTF-8"
export LANGUAGE="en_US:en"
export LC_ALL="en_US.UTF-8"

if [ -t 0 ]; then
DIALOGAPP="terminal"
DIALOGBREAK=" "
TERMOUT="yes"
elif [ -x /usr/bin/zenity ]; then
DIALOGAPP="zenity"
DIALOGBREAK="n"
elif [ -x /usr/bin/kdialog ]; then
DIALOGAPP="kdialog"
DIALOGBREAK="n"
else
exit 1
fi

if [ -t 0 ]; then
SUDO="sudo"
elif [ -x /usr/bin/pkexec ]; then
SUDO="pkexec"
elif [ -x /usr/bin/gksudo ]; then
SUDO="gksudo"
GKSUDO="yes"
elif [ -x /usr/bin/kdesudo ]; then
SUDO="kdesudo"
KDESUDO="yes"
KDESUDOCMT=" needs administrative privileges. Please enter your password."
fi

dialog_info ()
case $DIALOGAPP in
terminal)
printf "%bn" "$1"
;;
zenity)
zenity --info --text="$1"
;;
kdialog)
kdialog --msgbox "$1"
;;
esac


dialog_error ()
case $DIALOGAPP in
terminal)
printf "%bn" "$1" >&2
;;
zenity)
zenity --error --text="$1"
;;
kdialog)
kdialog --error "$1"
;;
esac


dialog_question ()

ip6-mac () :)0+([[:alnum:]])/12/g;s/^([0:]+)/\(::\

exec 3>&1 4>&2
exec 1> "$OUTPUTDIR/$FILEBASE.txt" ||
dialog_error "$TERMOUT+nCannot write output file in "$OUTPUTDIR",$DIALOGBREAKtrying in "$OUTPUTDIRFB" instead.$TERMOUT+n"
OUTPUTDIR="$OUTPUTDIRFB"
exec 1> "$OUTPUTDIR/$FILEBASE.txt"
exec 2>&1

printf "n########## wireless info START ##########nn"
REPORTDATE=$(date +"%d %b %Y %H:%M %Z %z")
SCRIPTDATE=$(date -u -d "$SCRIPTDATE" +"%d %b %Y %H:%M %Z %z")
LASTBOOTDT=$(last -FRn 1 reboot | sed -n 's/.*system boot[ ]+(.+) - .*/1/p')
LASTBOOTDT=$(date -d "$LASTBOOTDT" +"%d %b %Y %H:%M %Z %z")
printf "Report from: %snn" "$REPORTDATE"
printf "Booted last: %snn" "$LASTBOOTDT"
printf "Script from: %sn" "$SCRIPTDATE"

printf "n##### release ###########################nn"
lsb_release -idrc

printf "n##### kernel ############################nn"
uname -srvmpio
echo
sed 's/root=[^ ]*//;s/[ ]+/, /g;s/^BOOT_IMAGE=[^ ]*/Parameters:/' /proc/cmdline

printf "n##### desktop ###########################nn"
if [ -n "$DESKTOP_SESSION" ]; then
DESKTOP="$DESKTOP_SESSION"
else
DESKTOP=$(sed -n 's/^Session=(.+)$/1/p' "$HOME/.dmrc")
DESKDMRC=" (from ~/.dmrc)"
fi
if [ -n "$DESKTOP" ]; then
if [ -f "/usr/share/xsessions/$DESKTOP.desktop" ]; then
DESKTOP=$(sed -n 's/^Name=(.+)$/1/p' "/usr/share/xsessions/$DESKTOP.desktop")
fi
echo "$DESKTOP/ Session/$DESKDMRC"
else
printf "nCould not be determined.n"
fi

printf "n##### lspci #############################nn"
lspci -nnk | grep -iA 2 '^[^[:space:]].*net' | sed '/^--$/d; /^[^[:space:]]/ i\'

printf "n##### lsusb #############################nn"
lsusb

printf "n##### PCMCIA card info ##################nn"
if [ -x /sbin/pccardctl ]; then
pccardctl info
else
echo "'pccardctl' is not installed (package "pcmciautils")."
fi

printf "n##### rfkill ############################nn"
rfkill list all

printf "n##### lsmod #############################nn"
LSMOD=$(lsmod | egrep "(^|[[:punct:] ])($MODMATCHES|$LSMODMATCHES)[^[:punct:] ]*([[:punct:] ]|$)")
echo "$LSMOD"

printf "n##### interfaces ########################nn"
sed '/^#/d;s/^wpa-psk [[:graph:]]+/wpa-psk <WPA key removed>/' /etc/network/interfaces

printf "n##### ifconfig ##########################nn"
if [ -x /sbin/ifconfig ]; then
IFCONFIG=$(ifconfig -a)
else
IFCONFIG=$(ip address show)
fi
echo "$IFCONFIG"
IFCONFIG=$(sed -n '1h; 1!H; $g;s/n /\ /g;p' <<< "$IFCONFIG")
IFACESETH=($(sed -n 's/^([^ ]+)[ ]+Link encap:Ethernet.*/1/p; s#^[0-9]+: ([^ :]+):.* link/ether.*#1#p' <<< "$IFCONFIG"))
if (( $#IFACESETH[@] > 0 )); then
IFETHMATCHES=$IFACESETH[@]
IFACEMATCHES="($IFACEMATCHES|($IFETHMATCHES// /))"
fi

printf "n##### iwconfig ##########################nn"
iwconfig

printf "n##### route #############################nn"
if [ -x /sbin/route ]; then
route -n
else
ip route show
fi

printf "n##### resolv.conf #######################nn"
grep -v '^#' /etc/resolv.conf

printf "n##### network managers ##################nn"
printf "Installed:nn"
for NETMGRNR in "$!NETMGRPATHS[@]"; do
if [ -f "$NETMGRPATHS[$NETMGRNR]" ]; then
NETMGRINST+=("$NETMGRNAMES[$NETMGRNR]")
fi
done
printf "t%sn" "$NETMGRINST[@]:-None found."
NETMGRMATCHES=$NETMGRPATHS[@]/#*//
NETMGRMATCHES=$NETMGRMATCHES//
NETMGRMATCHES="($)"
printf "nRunning:nn"
ps -ef | egrep "( |/)$NETMGRMATCHES($| )" || printf "tNone found.n"

printf "n##### NetworkManager info ###############nn"
if [ -x /usr/bin/nm-tool ]; then
nm-tool
elif [ -x /usr/bin/nmcli ]; then
nmcli -f all device show | sed '/^GENERAL.DEVICE:[ ]+lo$/,/^$/d; /^AP[[0-9]+]./d'
echo
nmcli -f SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY,ACTIVE,IN-USE device wifi list
else
echo "NetworkManager is not installed (package "network-manager")."
fi

printf "n##### NetworkManager.state ##############nn"
cat -s /var/lib/NetworkManager/NetworkManager.state

printf "n##### NetworkManager.conf ###############nn"
grep -v '^#' /etc/NetworkManager/NetworkManager.conf
if [ -f /etc/NetworkManager/nm-system-settings.conf ]; then
printf "nnm-system-settings.conf (used up to Ubuntu 10.04):nn"
grep -v '^#' /etc/NetworkManager/nm-system-settings.conf
fi

printf "n##### NetworkManager profiles ###########nn"
if [ -d /etc/NetworkManager/system-connections ]; then
if [ -n "$SUDO" ]; then
trap "" 2 3
NMPROFILES=$(find /etc/NetworkManager/system-connections -maxdepth 1 -type f -exec $SUDO$GKSUDO+ -D grep --$KDESUDO+ -d --comment "<b>grep</b>$KDESUDOCMT" -- grep -vH '^$' +) && SUDOSUCCESS="yes" || SUDOSUCCESS="no"
trap 2 3
if [ "$SUDOSUCCESS" = "yes" ]; then
ORIGIFS="$IFS"
IFS=$'n'
for NMWLPRFFILE in $(sed -n 's/^(.+):type=(802-11-wireless|wifi).*$/1/p' <<< "$NMPROFILES"); do
NMWLPRFFLPERMS=$(stat -c "%a %U" "$NMWLPRFFILE")
NMWLPROFILE=($(sed -n "s;^$NMWLPRFFILE:($NMPROFMATCHES.*)$;1 |;p" <<< "$NMPROFILES"))
NMWLPROFSOUT+="[[$NMWLPRFFILE]] ($NMWLPRFFLPERMS)"$'n'"$NMWLPROFILE[@]"$'nn'
done
IFS="$ORIGIFS"
sed 's# | [#n[#g;s#] |#]#g;s/ |$//' <<< "$NMWLPROFSOUT" | sed '/^[[^]]*]$/d'
else
printf "nAcquisition of admin privileges failed.n"
fi
else
echo "No way to acquire admin privileges found."
fi
else
echo "No NetworkManager profiles found."
fi

printf "n##### iw reg get ########################nn"
if [ -x /sbin/iw ]; then
if IWREGGET=$(iw reg get 2>&1) && [ -f /etc/timezone ]; then
REGION=$(cat /etc/timezone)
printf "Region: %s (based on set time zone)nn" "$REGION"
fi
echo "$IWREGGET"
else
echo "'iw' is not installed (package "iw")."
fi

printf "n##### iwlist channels ###################nn"
if [ -x /sbin/iwlist ]; then
iwlist chan
else
echo "'iwlist' is not installed (package "wireless-tools")."
fi

printf "n##### iwlist scan #######################nn"
if [ -x /sbin/iwlist ]; then
if [ -n "$SUDO" ]; then
trap "" 2 3
IWLISTSCAN=$($SUDO$KDESUDO+ -d iwlist scan) && SUDOSUCCESS="yes" || SUDOSUCCESS="no"
trap 2 3
if [ "$SUDOSUCCESS" = "yes" ]; then
if [[ $IWLISTSCAN = *Frequency:* ]]; then
printf "Channel occupancy:nn"
grep '^[ ]*Frequency:' <<< "$IWLISTSCAN" | sort | uniq -c | sed 's/^[ ]+([ ][0-9]+)[ ]+/ 1 APs on /'
echo
fi
grep -v '^[ ]*IE: Unknown:' <<< "$IWLISTSCAN"
else
printf "nAcquisition of admin privileges failed.n"
fi
else
echo "No way to acquire admin privileges found."
fi
else
echo "'iwlist' is not installed (package "wireless-tools")."
fi

printf "n##### module infos ######################nn"
MODULES=$(egrep -o "^$MODMATCHES[^ ]*" <<< "$LSMOD")
for MODULE in $MODULES; do
MODINFO=$(modinfo $MODULE | egrep -v "^$MODINFOEXCL:")
printf "[%s]n%snn" "$MODULE" "$MODINFO"
done

printf "n##### module parameters #################nn"
for MODULE in $MODULES; do
if [ -d /sys/module/$MODULE/parameters ]; then
MODPARAMS=$(grep -H '^[[:graph:]]' /sys/module/$MODULE/parameters/* | sed 's#^.*/##;s/:/: /')
printf "[%s]n%snn" "$MODULE" "$MODPARAMS"
fi
done

printf "n##### /etc/modules ######################nn"
grep -v '^#' /etc/modules

printf "n##### modprobe options ##################nn"
for MODPROBEFILE in $(find /etc/modprobe.conf,d -name "*.conf" -regextype posix-egrep -not -regex ".*$MODPROBEXCL.*" 2> /dev/null | sort); do
MODPROBEOPTS=$(egrep -v '^(#|$)' $MODPROBEFILE)
if [ -n "$MODPROBEOPTS" ]; then
printf "[%s]n%snn" "$MODPROBEFILE" "$MODPROBEOPTS"
fi
done

printf "n##### rc.local ##########################nn"
grep -v '^#' /etc/rc.local

printf "n##### pm-utils ##########################nn"
for PMUTILSFILE in $(find /etc/pm/*.d ( -type f -o -type l ) -regextype posix-egrep -not -regex "$PMUTILSEXCL" | sort); do
PMUTFLCONT=$(egrep -v '^(#|$)' $PMUTILSFILE)
if [ -n "$PMUTFLCONT" ]; then
PMUTFLPERMS=$(stat -c "%a %U" $PMUTILSFILE)
printf "[%s] (%s)n%snn" "$PMUTILSFILE" "$PMUTFLPERMS" "$PMUTFLCONT"
fi
done

printf "n##### udev rules ########################nn"
for UDEVRLFILE in $(find /etc/udev/rules.d -name "*net*.rules" | sort); do
UDEVRULES=$(grep -B1 '^[^#]' $UDEVRLFILE | egrep -v '^(--)?$')
if [ -n "$UDEVRULES" ]; then
printf "[%s]n%snn" "$UDEVRLFILE" "$UDEVRULES"
fi
done

printf "n##### dmesg #############################nn"
dmesg | tail -n 100 | egrep "[[:punct:] ]($MODMATCHES|$IFACEMATCHES|$DMESGMATCHES)[^[:punct:] ]*[[:punct:] ]" | egrep -v "$DMESGEXCL" | uniq -cf 2 | sed 's/^[ ]+1[ ]+//;s/^[ ]+([0-9]+)[ ]+(.+)$/2 (repeated 1 times)/'

printf "n########## wireless info END ############nn"

exec 2>&4 4>&-
exec 1>&3 3>&-

##### MAC address masking #####

RESULTS=$(cat -s "$OUTPUTDIR/$FILEBASE.txt")$'n'

ORIGIFS="$IFS"
IFS=$'n'

IFACESIDS=($(sed -n "/([[:alnum:]]2:)5[[:alnum:]]2/ /(00:)500/! s/^([^ ]+)[ ]+.*HWaddr.*/'1'/p; s/^[0-9]+: ([^ :]+):.*/'1'/p" <<< "$IFCONFIG"))
IFACESMACS=($(sed -n '/(00:)500/! s#.*(HWaddr|link/[^ ]+) (([[:alnum:]]2:)5[[:alnum:]]2).*#2#p' <<< "$IFCONFIG"))
IFACESIP6S=($(ip6-mac "$IFACESMACS[@]"))

WLAPSIWLIDS=($(sed -n "/^[ ]*Cell [0-9]+/,/^[ ]*ESSID:/ /^[ ]*Cell [0-9]+/h; /^[ ]*ESSID:/ H;g;s/^[ ]*Cell 0?([0-9]+).*ESSID:"(.*)"$/'2' [AC1]/p" <<< "$IWLISTSCAN"))
WLAPSIWLMACS=($(sed -n 's/^[ ]*Cell [0-9]+.*Address: ([^ ]+)/1/p' <<< "$IWLISTSCAN"))
WLAPSIWLIP6S=($(ip6-mac "$WLAPSIWLMACS[@]"))

WLAPSNMRAW=$(sed -n '/^##### NetworkManager info #####/,/^##### / /^[ ]*Wireless Access Points/,/^$/ /Wireless Access Points/d;s/^[ ]+*?//;s/:[ ]+/t/;p; /^SSID[ ]+BSSID[ ]+/,/^$/ /^SSID[ ]2,BSSID[ ]2,/d;s/[ ]2,/t/;p' <<< "$RESULTS")
WLAPSNMIDS=($(awk -F 't' 'print "'''" $1 "'''"' <<< "$WLAPSNMRAW"))
WLAPSNMMACS=($(grep -o '([[:alnum:]]2:)5[[:alnum:]]2' <<< "$WLAPSNMRAW"))
WLAPSNMIP6S=($(ip6-mac "$WLAPSNMMACS[@]"))

IFS="$ORIGIFS"

for IFACENR in "$!IFACESMACS[@]"; do
MACMASKSED+="s;$IFACESMACS[$IFACENR];<MAC $IFACESIDS[$IFACENR] [IF$(($IFACENR + 1))]>;I;"
MACMASKSED+=" /$IFACESIP6S[$IFACENR]/ s;$IFACESIP6S[$IFACENR]/#\(::/(;<IP6 $IFACESIDS[$IFACENR] [IF$(($IFACENR + 1))]>;I;"
IFACEMACC=$IFACESMACS[$IFACENR]//:/
if [[ $IFACESIDS[$IFACENR],, =~ $IFACEMACC,, ]]; then
MACMASKSED+="s;($IFACESIDS[$IFACENR]:1:3)$IFACEMACC;1<IF from MAC [IF$(($IFACENR + 1))]>;Ig;"
fi
done

for WLAPIWLNR in "$!WLAPSIWLMACS[@]"; do
MACMASKSED+="s;$WLAPSIWLMACS[$WLAPIWLNR];<MAC $WLAPSIWLIDS[$WLAPIWLNR]>;I;"
MACMASKSED+=" /$WLAPSIWLIP6S[$WLAPIWLNR]/ s;$WLAPSIWLIP6S[$WLAPIWLNR]/#\(::/(;<IP6 $WLAPSIWLIDS[$WLAPIWLNR]>;I;"
done

for WLAPNMNR in "$!WLAPSNMMACS[@]"; do
MACMASKSED+="s;$WLAPSNMMACS[$WLAPNMNR];<MAC $WLAPSNMIDS[$WLAPNMNR] [AN$(($WLAPNMNR + 1))]>;I;"
MACMASKSED+=" /$WLAPSNMIP6S[$WLAPNMNR]/ s;$WLAPSNMIP6S[$WLAPNMNR]/#\(::/(;<IP6 $WLAPSNMIDS[$WLAPNMNR] [AN$(($WLAPNMNR + 1))]>;I;"
done

sed "$MACMASKSED /([[:alnum:]]2:)6,/! s/([[:alnum:]]2:)5[[:alnum:]]2/<MAC address>/" <<< "$RESULTS" > "$OUTPUTDIR/$FILEBASE.txt"

##### The End #####

dialog_info "$TERMOUT+nResults saved in "$OUTPUTDIR/$FILEBASE.txt".$TERMOUT+n"

if (( $(stat -c %s "$OUTPUTDIR/$FILEBASE.txt") > 19968 )); then
tar -czf "$OUTPUTDIR/$FILEBASE.tar.gz" -C "$OUTPUTDIR" "$FILEBASE.txt" &&
dialog_info "Results also archived in "$OUTPUTDIR/$FILEBASE.tar.gz",$DIALOGBREAKas they exceed the 19.5 kB size limit for ".txt" attachments$DIALOGBREAKon the Ubuntu Forums.$TERMOUT+n" ||
dialog_error "Results exceed the 19.5 kB size limit for ".txt" attachments$DIALOGBREAKon the Ubuntu Forums, but archive could not be created.$TERMOUT+n"
fi

if [ -x /usr/bin/pastebinit ] && ping -nc 3 -w 6 -i 0.2 paste.ubuntu.com > /dev/null 2>&1; then
PASTEBIN=$(dialog_question "Do you also want to post them$DIALOGBREAKto your default 'pastebinit' provider?")
if [[ ! $PASTEBIN =~ ^no?$ ]]; then
PASTERESULT=$(pastebinit -i "$OUTPUTDIR/$FILEBASE.txt" -f text 2>&1) && PASTESUCCESS="yes"
if [ "$PASTESUCCESS" = "yes" ]; then
dialog_info "$TERMOUT+nPastebin successful:nn$PASTERESULT$TERMOUT+n"
else
if [ -n "$PASTERESULT" ]; then
dialog_error "$TERMOUT+nPastebin failed, error message is:nn$PASTERESULT$TERMOUT+n"
else
dialog_error "$TERMOUT+nPastebin failed, no error message given.$TERMOUT+n"
fi
fi
else
echo
fi
fi


Result



dan@Pavilion:~$ sudo ./sudoWIFI.sh
[sudo] password for dan:
cd hal/OUTSRC/ ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/led ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko
cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.13.0-32-generic/build M=/home/dan/rtl8812AU modules
make[1]: Entering directory '/usr/src/linux-headers-4.13.0-32-generic'
CC [M] /home/dan/rtl8812AU/core/rtw_cmd.o
In file included from /home/dan/rtl8812AU/include/drv_types.h:32:0,
from /home/dan/rtl8812AU/core/rtw_cmd.c:22:
/home/dan/rtl8812AU/include/osdep_service.h: In function ‘thread_enter’:
/home/dan/rtl8812AU/include/osdep_service.h:343:2: error: implicit declaration of function ‘allow_signal’ [-Werror=implicit-function-declaration]
allow_signal(SIGTERM);
^
/home/dan/rtl8812AU/include/osdep_service.h: In function ‘flush_signals_thread’:
/home/dan/rtl8812AU/include/osdep_service.h:353:6: error: implicit declaration of function ‘signal_pending’ [-Werror=implicit-function-declaration]
if (signal_pending (current))
^
/home/dan/rtl8812AU/include/osdep_service.h:355:3: error: implicit declaration of function ‘flush_signals’ [-Werror=implicit-function-declaration]
flush_signals(current);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target '/home/dan/rtl8812AU/core/rtw_cmd.o' failed
make[2]: *** [/home/dan/rtl8812AU/core/rtw_cmd.o] Error 1
Makefile:1550: recipe for target '_module_/home/dan/rtl8812AU' failed
make[1]: *** [_module_/home/dan/rtl8812AU] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-32-generic'
Makefile:1576: recipe for target 'modules' failed
make: *** [modules] Error 2
install -p -m 644 8812au.ko /lib/modules/4.13.0-32-generic/kernel/drivers/net/wireless/
install: cannot stat '8812au.ko': No such file or directory
Makefile:1582: recipe for target 'install' failed
make: *** [install] Error 1
modprobe: FATAL: Module 8812au not found in directory /lib/modules/4.13.0-32-generic









share|improve this question















I bought one of the little cheap wirless usb sticks. Ubunbu would not find it and a kind person on this site supplied a script for setup. I had to run this after most or all reboots. I went through the procedure today. It produces errors and longer works. Any suggestions?



Script



#!/bin/bash
cd rtl8812AU
make clean
make
make install
modprobe 8812au

**bin bash**
#!/bin/bash
#
# Copyright (c) 2012
#
# Authors: Wild Man, Krytarik
# Helpers: chili555
#
# This script gathers the infos necessary for troubleshooting a wireless
# connection and saves them in a text file, wrapping it in an archive if it
# exceeds the 19.5 kB size limit for ".txt" attachments on the Ubuntu Forums.
#
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

SCRIPTDATE="2017-03-25 08:04 +0100"
FILEBASE="wireless-info"
OUTPUTDIR="$PWD"
OUTPUTDIRFB="/tmp"

MODMATCHES="(air|ar5|at7|ath[^3]?|b43|bcma|brcm|carl|ipw|iwl|ndis|r(818|8192[eu]|871|92su)|8(188|189|192|723|812)[acde][esu]|rt[23567]|rtl|ssb|wl|(cfg|mac)80211)"
LSMODMATCHES="(wmi|(dell|ideapad)[-_]laptop)"
IFACEMATCHES="(wlan[0-9]|eth[0-9])"
DMESGMATCHES="(firmware|[nN]etwork)"
NMPROFMATCHES="([connection]|id=|type=|permissions=|autoconnect=|[802-11-wireless]|[wifi]|ssid=|bssid=|mac-address(-blacklist)?=|mtu=|[802-1x]|[[:graph:]]*ca-certs?=|[ipv[46]]|method=)"

DMESGEXCL="apparmor|(cfg|mac)80211"
MODINFOEXCL="alias"
MODPROBEXCL="(alsa-base|blacklist-(firewire|framebuffer|modem|oss|watchdog)|fglrx|nvidia|fbdev|bumblebee)"
PMUTILSEXCL="/etc/pm/(power.d/(95hdparm-apm|intel-audio-powersave|sata_alpm)|sleep.d/(10_grub-common|10_unattended-upgrades.*|novatel_3g.*))"

NETMGRNAMES=("NetworkManager" "Wicd" "ConnMan")
NETMGRPATHS=("/usr/sbin/NetworkManager" "/usr/sbin/wicd" "/usr/sbin/connmand")
DEC2BI=(0..10..10..10..10..10..10..10..1)
DEC2HEX=($(printf "%02x " 0..255))

export LANG="en_US.UTF-8"
export LANGUAGE="en_US:en"
export LC_ALL="en_US.UTF-8"

if [ -t 0 ]; then
DIALOGAPP="terminal"
DIALOGBREAK=" "
TERMOUT="yes"
elif [ -x /usr/bin/zenity ]; then
DIALOGAPP="zenity"
DIALOGBREAK="n"
elif [ -x /usr/bin/kdialog ]; then
DIALOGAPP="kdialog"
DIALOGBREAK="n"
else
exit 1
fi

if [ -t 0 ]; then
SUDO="sudo"
elif [ -x /usr/bin/pkexec ]; then
SUDO="pkexec"
elif [ -x /usr/bin/gksudo ]; then
SUDO="gksudo"
GKSUDO="yes"
elif [ -x /usr/bin/kdesudo ]; then
SUDO="kdesudo"
KDESUDO="yes"
KDESUDOCMT=" needs administrative privileges. Please enter your password."
fi

dialog_info ()
case $DIALOGAPP in
terminal)
printf "%bn" "$1"
;;
zenity)
zenity --info --text="$1"
;;
kdialog)
kdialog --msgbox "$1"
;;
esac


dialog_error ()
case $DIALOGAPP in
terminal)
printf "%bn" "$1" >&2
;;
zenity)
zenity --error --text="$1"
;;
kdialog)
kdialog --error "$1"
;;
esac


dialog_question ()

ip6-mac () :)0+([[:alnum:]])/12/g;s/^([0:]+)/\(::\

exec 3>&1 4>&2
exec 1> "$OUTPUTDIR/$FILEBASE.txt" ||
dialog_error "$TERMOUT+nCannot write output file in "$OUTPUTDIR",$DIALOGBREAKtrying in "$OUTPUTDIRFB" instead.$TERMOUT+n"
OUTPUTDIR="$OUTPUTDIRFB"
exec 1> "$OUTPUTDIR/$FILEBASE.txt"
exec 2>&1

printf "n########## wireless info START ##########nn"
REPORTDATE=$(date +"%d %b %Y %H:%M %Z %z")
SCRIPTDATE=$(date -u -d "$SCRIPTDATE" +"%d %b %Y %H:%M %Z %z")
LASTBOOTDT=$(last -FRn 1 reboot | sed -n 's/.*system boot[ ]+(.+) - .*/1/p')
LASTBOOTDT=$(date -d "$LASTBOOTDT" +"%d %b %Y %H:%M %Z %z")
printf "Report from: %snn" "$REPORTDATE"
printf "Booted last: %snn" "$LASTBOOTDT"
printf "Script from: %sn" "$SCRIPTDATE"

printf "n##### release ###########################nn"
lsb_release -idrc

printf "n##### kernel ############################nn"
uname -srvmpio
echo
sed 's/root=[^ ]*//;s/[ ]+/, /g;s/^BOOT_IMAGE=[^ ]*/Parameters:/' /proc/cmdline

printf "n##### desktop ###########################nn"
if [ -n "$DESKTOP_SESSION" ]; then
DESKTOP="$DESKTOP_SESSION"
else
DESKTOP=$(sed -n 's/^Session=(.+)$/1/p' "$HOME/.dmrc")
DESKDMRC=" (from ~/.dmrc)"
fi
if [ -n "$DESKTOP" ]; then
if [ -f "/usr/share/xsessions/$DESKTOP.desktop" ]; then
DESKTOP=$(sed -n 's/^Name=(.+)$/1/p' "/usr/share/xsessions/$DESKTOP.desktop")
fi
echo "$DESKTOP/ Session/$DESKDMRC"
else
printf "nCould not be determined.n"
fi

printf "n##### lspci #############################nn"
lspci -nnk | grep -iA 2 '^[^[:space:]].*net' | sed '/^--$/d; /^[^[:space:]]/ i\'

printf "n##### lsusb #############################nn"
lsusb

printf "n##### PCMCIA card info ##################nn"
if [ -x /sbin/pccardctl ]; then
pccardctl info
else
echo "'pccardctl' is not installed (package "pcmciautils")."
fi

printf "n##### rfkill ############################nn"
rfkill list all

printf "n##### lsmod #############################nn"
LSMOD=$(lsmod | egrep "(^|[[:punct:] ])($MODMATCHES|$LSMODMATCHES)[^[:punct:] ]*([[:punct:] ]|$)")
echo "$LSMOD"

printf "n##### interfaces ########################nn"
sed '/^#/d;s/^wpa-psk [[:graph:]]+/wpa-psk <WPA key removed>/' /etc/network/interfaces

printf "n##### ifconfig ##########################nn"
if [ -x /sbin/ifconfig ]; then
IFCONFIG=$(ifconfig -a)
else
IFCONFIG=$(ip address show)
fi
echo "$IFCONFIG"
IFCONFIG=$(sed -n '1h; 1!H; $g;s/n /\ /g;p' <<< "$IFCONFIG")
IFACESETH=($(sed -n 's/^([^ ]+)[ ]+Link encap:Ethernet.*/1/p; s#^[0-9]+: ([^ :]+):.* link/ether.*#1#p' <<< "$IFCONFIG"))
if (( $#IFACESETH[@] > 0 )); then
IFETHMATCHES=$IFACESETH[@]
IFACEMATCHES="($IFACEMATCHES|($IFETHMATCHES// /))"
fi

printf "n##### iwconfig ##########################nn"
iwconfig

printf "n##### route #############################nn"
if [ -x /sbin/route ]; then
route -n
else
ip route show
fi

printf "n##### resolv.conf #######################nn"
grep -v '^#' /etc/resolv.conf

printf "n##### network managers ##################nn"
printf "Installed:nn"
for NETMGRNR in "$!NETMGRPATHS[@]"; do
if [ -f "$NETMGRPATHS[$NETMGRNR]" ]; then
NETMGRINST+=("$NETMGRNAMES[$NETMGRNR]")
fi
done
printf "t%sn" "$NETMGRINST[@]:-None found."
NETMGRMATCHES=$NETMGRPATHS[@]/#*//
NETMGRMATCHES=$NETMGRMATCHES//
NETMGRMATCHES="($)"
printf "nRunning:nn"
ps -ef | egrep "( |/)$NETMGRMATCHES($| )" || printf "tNone found.n"

printf "n##### NetworkManager info ###############nn"
if [ -x /usr/bin/nm-tool ]; then
nm-tool
elif [ -x /usr/bin/nmcli ]; then
nmcli -f all device show | sed '/^GENERAL.DEVICE:[ ]+lo$/,/^$/d; /^AP[[0-9]+]./d'
echo
nmcli -f SSID,BSSID,MODE,CHAN,FREQ,RATE,SIGNAL,BARS,SECURITY,ACTIVE,IN-USE device wifi list
else
echo "NetworkManager is not installed (package "network-manager")."
fi

printf "n##### NetworkManager.state ##############nn"
cat -s /var/lib/NetworkManager/NetworkManager.state

printf "n##### NetworkManager.conf ###############nn"
grep -v '^#' /etc/NetworkManager/NetworkManager.conf
if [ -f /etc/NetworkManager/nm-system-settings.conf ]; then
printf "nnm-system-settings.conf (used up to Ubuntu 10.04):nn"
grep -v '^#' /etc/NetworkManager/nm-system-settings.conf
fi

printf "n##### NetworkManager profiles ###########nn"
if [ -d /etc/NetworkManager/system-connections ]; then
if [ -n "$SUDO" ]; then
trap "" 2 3
NMPROFILES=$(find /etc/NetworkManager/system-connections -maxdepth 1 -type f -exec $SUDO$GKSUDO+ -D grep --$KDESUDO+ -d --comment "<b>grep</b>$KDESUDOCMT" -- grep -vH '^$' +) && SUDOSUCCESS="yes" || SUDOSUCCESS="no"
trap 2 3
if [ "$SUDOSUCCESS" = "yes" ]; then
ORIGIFS="$IFS"
IFS=$'n'
for NMWLPRFFILE in $(sed -n 's/^(.+):type=(802-11-wireless|wifi).*$/1/p' <<< "$NMPROFILES"); do
NMWLPRFFLPERMS=$(stat -c "%a %U" "$NMWLPRFFILE")
NMWLPROFILE=($(sed -n "s;^$NMWLPRFFILE:($NMPROFMATCHES.*)$;1 |;p" <<< "$NMPROFILES"))
NMWLPROFSOUT+="[[$NMWLPRFFILE]] ($NMWLPRFFLPERMS)"$'n'"$NMWLPROFILE[@]"$'nn'
done
IFS="$ORIGIFS"
sed 's# | [#n[#g;s#] |#]#g;s/ |$//' <<< "$NMWLPROFSOUT" | sed '/^[[^]]*]$/d'
else
printf "nAcquisition of admin privileges failed.n"
fi
else
echo "No way to acquire admin privileges found."
fi
else
echo "No NetworkManager profiles found."
fi

printf "n##### iw reg get ########################nn"
if [ -x /sbin/iw ]; then
if IWREGGET=$(iw reg get 2>&1) && [ -f /etc/timezone ]; then
REGION=$(cat /etc/timezone)
printf "Region: %s (based on set time zone)nn" "$REGION"
fi
echo "$IWREGGET"
else
echo "'iw' is not installed (package "iw")."
fi

printf "n##### iwlist channels ###################nn"
if [ -x /sbin/iwlist ]; then
iwlist chan
else
echo "'iwlist' is not installed (package "wireless-tools")."
fi

printf "n##### iwlist scan #######################nn"
if [ -x /sbin/iwlist ]; then
if [ -n "$SUDO" ]; then
trap "" 2 3
IWLISTSCAN=$($SUDO$KDESUDO+ -d iwlist scan) && SUDOSUCCESS="yes" || SUDOSUCCESS="no"
trap 2 3
if [ "$SUDOSUCCESS" = "yes" ]; then
if [[ $IWLISTSCAN = *Frequency:* ]]; then
printf "Channel occupancy:nn"
grep '^[ ]*Frequency:' <<< "$IWLISTSCAN" | sort | uniq -c | sed 's/^[ ]+([ ][0-9]+)[ ]+/ 1 APs on /'
echo
fi
grep -v '^[ ]*IE: Unknown:' <<< "$IWLISTSCAN"
else
printf "nAcquisition of admin privileges failed.n"
fi
else
echo "No way to acquire admin privileges found."
fi
else
echo "'iwlist' is not installed (package "wireless-tools")."
fi

printf "n##### module infos ######################nn"
MODULES=$(egrep -o "^$MODMATCHES[^ ]*" <<< "$LSMOD")
for MODULE in $MODULES; do
MODINFO=$(modinfo $MODULE | egrep -v "^$MODINFOEXCL:")
printf "[%s]n%snn" "$MODULE" "$MODINFO"
done

printf "n##### module parameters #################nn"
for MODULE in $MODULES; do
if [ -d /sys/module/$MODULE/parameters ]; then
MODPARAMS=$(grep -H '^[[:graph:]]' /sys/module/$MODULE/parameters/* | sed 's#^.*/##;s/:/: /')
printf "[%s]n%snn" "$MODULE" "$MODPARAMS"
fi
done

printf "n##### /etc/modules ######################nn"
grep -v '^#' /etc/modules

printf "n##### modprobe options ##################nn"
for MODPROBEFILE in $(find /etc/modprobe.conf,d -name "*.conf" -regextype posix-egrep -not -regex ".*$MODPROBEXCL.*" 2> /dev/null | sort); do
MODPROBEOPTS=$(egrep -v '^(#|$)' $MODPROBEFILE)
if [ -n "$MODPROBEOPTS" ]; then
printf "[%s]n%snn" "$MODPROBEFILE" "$MODPROBEOPTS"
fi
done

printf "n##### rc.local ##########################nn"
grep -v '^#' /etc/rc.local

printf "n##### pm-utils ##########################nn"
for PMUTILSFILE in $(find /etc/pm/*.d ( -type f -o -type l ) -regextype posix-egrep -not -regex "$PMUTILSEXCL" | sort); do
PMUTFLCONT=$(egrep -v '^(#|$)' $PMUTILSFILE)
if [ -n "$PMUTFLCONT" ]; then
PMUTFLPERMS=$(stat -c "%a %U" $PMUTILSFILE)
printf "[%s] (%s)n%snn" "$PMUTILSFILE" "$PMUTFLPERMS" "$PMUTFLCONT"
fi
done

printf "n##### udev rules ########################nn"
for UDEVRLFILE in $(find /etc/udev/rules.d -name "*net*.rules" | sort); do
UDEVRULES=$(grep -B1 '^[^#]' $UDEVRLFILE | egrep -v '^(--)?$')
if [ -n "$UDEVRULES" ]; then
printf "[%s]n%snn" "$UDEVRLFILE" "$UDEVRULES"
fi
done

printf "n##### dmesg #############################nn"
dmesg | tail -n 100 | egrep "[[:punct:] ]($MODMATCHES|$IFACEMATCHES|$DMESGMATCHES)[^[:punct:] ]*[[:punct:] ]" | egrep -v "$DMESGEXCL" | uniq -cf 2 | sed 's/^[ ]+1[ ]+//;s/^[ ]+([0-9]+)[ ]+(.+)$/2 (repeated 1 times)/'

printf "n########## wireless info END ############nn"

exec 2>&4 4>&-
exec 1>&3 3>&-

##### MAC address masking #####

RESULTS=$(cat -s "$OUTPUTDIR/$FILEBASE.txt")$'n'

ORIGIFS="$IFS"
IFS=$'n'

IFACESIDS=($(sed -n "/([[:alnum:]]2:)5[[:alnum:]]2/ /(00:)500/! s/^([^ ]+)[ ]+.*HWaddr.*/'1'/p; s/^[0-9]+: ([^ :]+):.*/'1'/p" <<< "$IFCONFIG"))
IFACESMACS=($(sed -n '/(00:)500/! s#.*(HWaddr|link/[^ ]+) (([[:alnum:]]2:)5[[:alnum:]]2).*#2#p' <<< "$IFCONFIG"))
IFACESIP6S=($(ip6-mac "$IFACESMACS[@]"))

WLAPSIWLIDS=($(sed -n "/^[ ]*Cell [0-9]+/,/^[ ]*ESSID:/ /^[ ]*Cell [0-9]+/h; /^[ ]*ESSID:/ H;g;s/^[ ]*Cell 0?([0-9]+).*ESSID:"(.*)"$/'2' [AC1]/p" <<< "$IWLISTSCAN"))
WLAPSIWLMACS=($(sed -n 's/^[ ]*Cell [0-9]+.*Address: ([^ ]+)/1/p' <<< "$IWLISTSCAN"))
WLAPSIWLIP6S=($(ip6-mac "$WLAPSIWLMACS[@]"))

WLAPSNMRAW=$(sed -n '/^##### NetworkManager info #####/,/^##### / /^[ ]*Wireless Access Points/,/^$/ /Wireless Access Points/d;s/^[ ]+*?//;s/:[ ]+/t/;p; /^SSID[ ]+BSSID[ ]+/,/^$/ /^SSID[ ]2,BSSID[ ]2,/d;s/[ ]2,/t/;p' <<< "$RESULTS")
WLAPSNMIDS=($(awk -F 't' 'print "'''" $1 "'''"' <<< "$WLAPSNMRAW"))
WLAPSNMMACS=($(grep -o '([[:alnum:]]2:)5[[:alnum:]]2' <<< "$WLAPSNMRAW"))
WLAPSNMIP6S=($(ip6-mac "$WLAPSNMMACS[@]"))

IFS="$ORIGIFS"

for IFACENR in "$!IFACESMACS[@]"; do
MACMASKSED+="s;$IFACESMACS[$IFACENR];<MAC $IFACESIDS[$IFACENR] [IF$(($IFACENR + 1))]>;I;"
MACMASKSED+=" /$IFACESIP6S[$IFACENR]/ s;$IFACESIP6S[$IFACENR]/#\(::/(;<IP6 $IFACESIDS[$IFACENR] [IF$(($IFACENR + 1))]>;I;"
IFACEMACC=$IFACESMACS[$IFACENR]//:/
if [[ $IFACESIDS[$IFACENR],, =~ $IFACEMACC,, ]]; then
MACMASKSED+="s;($IFACESIDS[$IFACENR]:1:3)$IFACEMACC;1<IF from MAC [IF$(($IFACENR + 1))]>;Ig;"
fi
done

for WLAPIWLNR in "$!WLAPSIWLMACS[@]"; do
MACMASKSED+="s;$WLAPSIWLMACS[$WLAPIWLNR];<MAC $WLAPSIWLIDS[$WLAPIWLNR]>;I;"
MACMASKSED+=" /$WLAPSIWLIP6S[$WLAPIWLNR]/ s;$WLAPSIWLIP6S[$WLAPIWLNR]/#\(::/(;<IP6 $WLAPSIWLIDS[$WLAPIWLNR]>;I;"
done

for WLAPNMNR in "$!WLAPSNMMACS[@]"; do
MACMASKSED+="s;$WLAPSNMMACS[$WLAPNMNR];<MAC $WLAPSNMIDS[$WLAPNMNR] [AN$(($WLAPNMNR + 1))]>;I;"
MACMASKSED+=" /$WLAPSNMIP6S[$WLAPNMNR]/ s;$WLAPSNMIP6S[$WLAPNMNR]/#\(::/(;<IP6 $WLAPSNMIDS[$WLAPNMNR] [AN$(($WLAPNMNR + 1))]>;I;"
done

sed "$MACMASKSED /([[:alnum:]]2:)6,/! s/([[:alnum:]]2:)5[[:alnum:]]2/<MAC address>/" <<< "$RESULTS" > "$OUTPUTDIR/$FILEBASE.txt"

##### The End #####

dialog_info "$TERMOUT+nResults saved in "$OUTPUTDIR/$FILEBASE.txt".$TERMOUT+n"

if (( $(stat -c %s "$OUTPUTDIR/$FILEBASE.txt") > 19968 )); then
tar -czf "$OUTPUTDIR/$FILEBASE.tar.gz" -C "$OUTPUTDIR" "$FILEBASE.txt" &&
dialog_info "Results also archived in "$OUTPUTDIR/$FILEBASE.tar.gz",$DIALOGBREAKas they exceed the 19.5 kB size limit for ".txt" attachments$DIALOGBREAKon the Ubuntu Forums.$TERMOUT+n" ||
dialog_error "Results exceed the 19.5 kB size limit for ".txt" attachments$DIALOGBREAKon the Ubuntu Forums, but archive could not be created.$TERMOUT+n"
fi

if [ -x /usr/bin/pastebinit ] && ping -nc 3 -w 6 -i 0.2 paste.ubuntu.com > /dev/null 2>&1; then
PASTEBIN=$(dialog_question "Do you also want to post them$DIALOGBREAKto your default 'pastebinit' provider?")
if [[ ! $PASTEBIN =~ ^no?$ ]]; then
PASTERESULT=$(pastebinit -i "$OUTPUTDIR/$FILEBASE.txt" -f text 2>&1) && PASTESUCCESS="yes"
if [ "$PASTESUCCESS" = "yes" ]; then
dialog_info "$TERMOUT+nPastebin successful:nn$PASTERESULT$TERMOUT+n"
else
if [ -n "$PASTERESULT" ]; then
dialog_error "$TERMOUT+nPastebin failed, error message is:nn$PASTERESULT$TERMOUT+n"
else
dialog_error "$TERMOUT+nPastebin failed, no error message given.$TERMOUT+n"
fi
fi
else
echo
fi
fi


Result



dan@Pavilion:~$ sudo ./sudoWIFI.sh
[sudo] password for dan:
cd hal/OUTSRC/ ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/led ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko
cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.13.0-32-generic/build M=/home/dan/rtl8812AU modules
make[1]: Entering directory '/usr/src/linux-headers-4.13.0-32-generic'
CC [M] /home/dan/rtl8812AU/core/rtw_cmd.o
In file included from /home/dan/rtl8812AU/include/drv_types.h:32:0,
from /home/dan/rtl8812AU/core/rtw_cmd.c:22:
/home/dan/rtl8812AU/include/osdep_service.h: In function ‘thread_enter’:
/home/dan/rtl8812AU/include/osdep_service.h:343:2: error: implicit declaration of function ‘allow_signal’ [-Werror=implicit-function-declaration]
allow_signal(SIGTERM);
^
/home/dan/rtl8812AU/include/osdep_service.h: In function ‘flush_signals_thread’:
/home/dan/rtl8812AU/include/osdep_service.h:353:6: error: implicit declaration of function ‘signal_pending’ [-Werror=implicit-function-declaration]
if (signal_pending (current))
^
/home/dan/rtl8812AU/include/osdep_service.h:355:3: error: implicit declaration of function ‘flush_signals’ [-Werror=implicit-function-declaration]
flush_signals(current);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target '/home/dan/rtl8812AU/core/rtw_cmd.o' failed
make[2]: *** [/home/dan/rtl8812AU/core/rtw_cmd.o] Error 1
Makefile:1550: recipe for target '_module_/home/dan/rtl8812AU' failed
make[1]: *** [_module_/home/dan/rtl8812AU] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-32-generic'
Makefile:1576: recipe for target 'modules' failed
make: *** [modules] Error 2
install -p -m 644 8812au.ko /lib/modules/4.13.0-32-generic/kernel/drivers/net/wireless/
install: cannot stat '8812au.ko': No such file or directory
Makefile:1582: recipe for target 'install' failed
make: *** [install] Error 1
modprobe: FATAL: Module 8812au not found in directory /lib/modules/4.13.0-32-generic






wireless wireless-access-point






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 2 at 17:01









user68186

14.4k84461




14.4k84461










asked Feb 2 at 16:57









Dan

106




106











  • Looking at this from another direction, is there a list of wireless adapters that are supported natively in Ubuntu. I just looked at Frys and non said Ubuntu compatible. Some say Linux compatible but the one I have says that too. This is for a desktop so a n internal card works too.
    – Dan
    Feb 2 at 20:00
















  • Looking at this from another direction, is there a list of wireless adapters that are supported natively in Ubuntu. I just looked at Frys and non said Ubuntu compatible. Some say Linux compatible but the one I have says that too. This is for a desktop so a n internal card works too.
    – Dan
    Feb 2 at 20:00















Looking at this from another direction, is there a list of wireless adapters that are supported natively in Ubuntu. I just looked at Frys and non said Ubuntu compatible. Some say Linux compatible but the one I have says that too. This is for a desktop so a n internal card works too.
– Dan
Feb 2 at 20:00




Looking at this from another direction, is there a list of wireless adapters that are supported natively in Ubuntu. I just looked at Frys and non said Ubuntu compatible. Some say Linux compatible but the one I have says that too. This is for a desktop so a n internal card works too.
– Dan
Feb 2 at 20:00










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










I suggest that you undertake the process in my answer here: RTL8812AU Usb adapter driver issues It will compile and install without errors in kernel 4.13.0-32 and, most likely, newer. It installed cleanly on my own system using the exact same kernel.



Because it uses the dkms process, it will not need to be re-installed after kernel upgrades.






share|improve this answer




















  • Worked like a charm. The only deviation was that I got a warning dkms is currently not installed followed by the command to install. I ran that command and continued. The system seemed a little confused because it then had both wired and wireless or maybe the router was confused. I disconnected wire and rebooted. Thanks.
    – Dan
    Feb 2 at 22:16











  • If my answer has been helpful, please accept it: askubuntu.com/tour
    – chili555
    Feb 2 at 22:28










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1002420%2fsetup-for-ourlink-usb-wireless-stopped-working%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










I suggest that you undertake the process in my answer here: RTL8812AU Usb adapter driver issues It will compile and install without errors in kernel 4.13.0-32 and, most likely, newer. It installed cleanly on my own system using the exact same kernel.



Because it uses the dkms process, it will not need to be re-installed after kernel upgrades.






share|improve this answer




















  • Worked like a charm. The only deviation was that I got a warning dkms is currently not installed followed by the command to install. I ran that command and continued. The system seemed a little confused because it then had both wired and wireless or maybe the router was confused. I disconnected wire and rebooted. Thanks.
    – Dan
    Feb 2 at 22:16











  • If my answer has been helpful, please accept it: askubuntu.com/tour
    – chili555
    Feb 2 at 22:28














up vote
1
down vote



accepted










I suggest that you undertake the process in my answer here: RTL8812AU Usb adapter driver issues It will compile and install without errors in kernel 4.13.0-32 and, most likely, newer. It installed cleanly on my own system using the exact same kernel.



Because it uses the dkms process, it will not need to be re-installed after kernel upgrades.






share|improve this answer




















  • Worked like a charm. The only deviation was that I got a warning dkms is currently not installed followed by the command to install. I ran that command and continued. The system seemed a little confused because it then had both wired and wireless or maybe the router was confused. I disconnected wire and rebooted. Thanks.
    – Dan
    Feb 2 at 22:16











  • If my answer has been helpful, please accept it: askubuntu.com/tour
    – chili555
    Feb 2 at 22:28












up vote
1
down vote



accepted







up vote
1
down vote



accepted






I suggest that you undertake the process in my answer here: RTL8812AU Usb adapter driver issues It will compile and install without errors in kernel 4.13.0-32 and, most likely, newer. It installed cleanly on my own system using the exact same kernel.



Because it uses the dkms process, it will not need to be re-installed after kernel upgrades.






share|improve this answer












I suggest that you undertake the process in my answer here: RTL8812AU Usb adapter driver issues It will compile and install without errors in kernel 4.13.0-32 and, most likely, newer. It installed cleanly on my own system using the exact same kernel.



Because it uses the dkms process, it will not need to be re-installed after kernel upgrades.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 2 at 21:08









chili555

36.8k54876




36.8k54876











  • Worked like a charm. The only deviation was that I got a warning dkms is currently not installed followed by the command to install. I ran that command and continued. The system seemed a little confused because it then had both wired and wireless or maybe the router was confused. I disconnected wire and rebooted. Thanks.
    – Dan
    Feb 2 at 22:16











  • If my answer has been helpful, please accept it: askubuntu.com/tour
    – chili555
    Feb 2 at 22:28
















  • Worked like a charm. The only deviation was that I got a warning dkms is currently not installed followed by the command to install. I ran that command and continued. The system seemed a little confused because it then had both wired and wireless or maybe the router was confused. I disconnected wire and rebooted. Thanks.
    – Dan
    Feb 2 at 22:16











  • If my answer has been helpful, please accept it: askubuntu.com/tour
    – chili555
    Feb 2 at 22:28















Worked like a charm. The only deviation was that I got a warning dkms is currently not installed followed by the command to install. I ran that command and continued. The system seemed a little confused because it then had both wired and wireless or maybe the router was confused. I disconnected wire and rebooted. Thanks.
– Dan
Feb 2 at 22:16





Worked like a charm. The only deviation was that I got a warning dkms is currently not installed followed by the command to install. I ran that command and continued. The system seemed a little confused because it then had both wired and wireless or maybe the router was confused. I disconnected wire and rebooted. Thanks.
– Dan
Feb 2 at 22:16













If my answer has been helpful, please accept it: askubuntu.com/tour
– chili555
Feb 2 at 22:28




If my answer has been helpful, please accept it: askubuntu.com/tour
– chili555
Feb 2 at 22:28

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1002420%2fsetup-for-ourlink-usb-wireless-stopped-working%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491