Adaptador USB Wi-Fi externo O driver TP-LINK não é instalado

0

Acabei de comprar o adaptador externo wifi TP-LINK TL-WN823N (v2) e funciona no Windows.

Estou tentando descobrir como instalá-lo no meu Ubuntu. Fui ao link e baixei o driver para o Linux. Então eu tentei executar o sudo make dentro da pasta Driver e ele falhou:

$>sudo make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.13.0-32-generic/build M=/home/unicornslayer/Driver  modules
make[1]: Entering directory '/usr/src/linux-headers-4.13.0-32-generic'
e"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
  CC [M]  /home/unicornslayer/Driver/core/rtw_cmd.o
In file included from /home/unicornslayer/Driver/include/drv_types.h:95:0,
                 from /home/unicornslayer/Driver/core/rtw_cmd.c:22:
/home/unicornslayer/Driver/include/hal_com.h:413:13: error: ‘file_path’ redeclared as different kind of symbol
 extern char file_path[PATH_LENGTH_MAX];
             ^
In file included from ./include/linux/seq_file.h:10:0,
                 from ./include/linux/pinctrl/consumer.h:17,
                 from ./include/linux/pinctrl/devinfo.h:21,
                 from ./include/linux/device.h:24,
                 from ./include/linux/dmaengine.h:20,
                 from ./include/linux/netdevice.h:38,
                 from /home/unicornslayer/Driver/include/osdep_service_linux.h:35,
                 from /home/unicornslayer/Driver/include/osdep_service.h:45,
                 from /home/unicornslayer/Driver/include/drv_types.h:32,
                 from /home/unicornslayer/Driver/core/rtw_cmd.c:22:
./include/linux/fs.h:2805:14: note: previous declaration of ‘file_path’ was here
 extern char *file_path(struct file *, char *, int);
              ^
In file included from /home/unicornslayer/Driver/include/drv_types.h:65:0,
                 from /home/unicornslayer/Driver/core/rtw_cmd.c:22:
/home/unicornslayer/Driver/core/rtw_cmd.c: In function ‘btinfo_evt_dump’:
/home/unicornslayer/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
  #define _seqdump seq_printf
                   ^
/home/unicornslayer/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
    if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
       ^
/home/unicornslayer/Driver/core/rtw_cmd.c:3293:2: note: in expansion of macro ‘DBG_871X_SEL_NL’
  DBG_871X_SEL_NL(sel, "cid:0x%02x, len:%u\n", info->cid, info->len);
  ^
/home/unicornslayer/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
  #define _seqdump seq_printf
                   ^
/home/unicornslayer/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
    if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
       ^
/home/unicornslayer/Driver/core/rtw_cmd.c:3296:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
   DBG_871X_SEL_NL(sel, "byte2:%s%s%s%s%s%s%s%s\n"
   ^
/home/unicornslayer/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
  #define _seqdump seq_printf
                   ^
/home/unicornslayer/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
    if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
       ^
/home/unicornslayer/Driver/core/rtw_cmd.c:3308:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
   DBG_871X_SEL_NL(sel, "retry_cnt:%u\n", info->retry_cnt);
   ^
/home/unicornslayer/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
  #define _seqdump seq_printf
                   ^
/home/unicornslayer/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
    if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
       ^
/home/unicornslayer/Driver/core/rtw_cmd.c:3311:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
   DBG_871X_SEL_NL(sel, "rssi:%u\n", info->rssi);
   ^
/home/unicornslayer/Driver/include/rtw_debug.h:187:19: error: void value not ignored as it ought to be
  #define _seqdump seq_printf
                   ^
/home/unicornslayer/Driver/include/rtw_debug.h:242:7: note: in expansion of macro ‘_seqdump’
    if(_seqdump(sel, fmt, ##arg)) /*rtw_warn_on(1)*/; \
       ^
/home/unicornslayer/Driver/core/rtw_cmd.c:3314:3: note: in expansion of macro ‘DBG_871X_SEL_NL’
   DBG_871X_SEL_NL(sel, "byte5:%s%s\n"
   ^
scripts/Makefile.build:308: recipe for target '/home/unicornslayer/Driver/core/rtw_cmd.o' failed
make[2]: *** [/home/unicornslayer/Driver/core/rtw_cmd.o] Error 1
Makefile:1550: recipe for target '_module_/home/unicornslayer/Driver' failed
make[1]: *** [_module_/home/unicornslayer/Driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-32-generic'
Makefile:1696: recipe for target 'modules' failed
make: *** [modules] Error 2

Eu tentei instalar o driver através do aplicativo Windows Wireless Drivers e parece que dmesg não funciona:

[  522.042037] usb 2-1.1: new high-speed USB device number 6 using ehci-pci
[  522.167320] usb 2-1.1: New USB device found, idVendor=2357, idProduct=0109
[  522.167326] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  522.167329] usb 2-1.1: Product: 802.11n NIC 
[  522.167332] usb 2-1.1: Manufacturer: Realtek 
[  522.167335] usb 2-1.1: SerialNumber: 00e04c000001
[  522.254021] usb 2-1.1: reset high-speed USB device number 6 using ehci-pci
[  522.372986] ndiswrapper (import:232): unknown symbol: ntoskrnl.exe:'IoCsqInsertIrp'
[  522.373004] ndiswrapper (import:232): unknown symbol: ntoskrnl.exe:'IoCsqRemoveNextIrp'
[  522.373014] ndiswrapper (import:232): unknown symbol: ntoskrnl.exe:'IoCsqInitialize'
[  522.373225] ndiswrapper (load_sys_files:200): couldn't prepare driver 'netrtwlanu_xp_coinst'
[  522.375002] ndiswrapper (load_wrap_driver:103): couldn't load driver netrtwlanu_xp_coinst; check system log for messages from 'loadndisdriver'

Aqui estão alguns comandos que eu executei:

$>rfkill list all
0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes

.

$>sudo lshw -C network
  *-network               
       description: Ethernet interface
       product: NetLink BCM57785 Gigabit Ethernet PCIe
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: enp2s0f0
       version: 10
       serial: b8:70:f4:ae:a6:b6
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=sb latency=0 link=no multicast=yes port=twisted pair
       resources: irq:16 memory:d1830000-d183ffff memory:d1840000-d184ffff memory:9fb00000-9fb007ff
  *-generic
       description: Wireless interface
       product: Illegal Vendor ID
       vendor: Illegal Vendor ID
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlp3s0
       version: ff
       serial: e8:39:df:f6:ba:f0
       width: 32 bits
       clock: 66MHz
       capabilities: bus_master vga_palette cap_list ethernet physical wireless
       configuration: broadcast=yes driver=wl0 driverversion=6.30.223.271 (r587334) latency=255 maxlatency=255 mingnt=255 multicast=yes wireless=IEEE 802.11
       resources: irq:17 memory:d1900000-d1903fff
  *-network
       description: Ethernet interface
       physical id: 3
       logical name: enp0s29u1u2
       serial: ee:e9:39:65:01:dd
       capabilities: ethernet physical
       configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device ip=192.168.42.187 link=yes multicast=yes

.

$>lspci | grep -i net
02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57785 Gigabit Ethernet PCIe (rev 10)
03:00.0 Network controller: Broadcom Corporation BCM43225 802.11b/g/n (rev ff)

.

$>lsusb
Bus 002 Device 005: ID 0458:6001 KYE Systems Corp. (Mouse Systems) GF3000F Ethernet Adapter
Bus 002 Device 004: ID 17ef:7436 Lenovo 
Bus 002 Device 006: ID 2357:0109  
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 04fc:2800 Sunplus Technology Co., Ltd 
Bus 001 Device 003: ID 0a5c:219a Broadcom Corp. 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Se eu desconectar o adaptador externo, o campo 2357:0109 desaparecerá.

$>ifconfig
enp0s29u1u2 Link encap:Ethernet  HWaddr ee:e9:39:65:01:dd  
          inet addr:192.168.42.187  Bcast:192.168.42.255  Mask:255.255.255.0
          inet6 addr: fe80::c40d:26ec:37db:94d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6841 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6755 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4928868 (4.9 MB)  TX bytes:1922765 (1.9 MB)

enp2s0f0  Link encap:Ethernet  HWaddr b8:70:f4:ae:a6:b6  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:16 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:685 errors:0 dropped:0 overruns:0 frame:0
          TX packets:685 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:61365 (61.3 KB)  TX bytes:61365 (61.3 KB)

wlp3s0    Link encap:Ethernet  HWaddr e8:39:df:f6:ba:f0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17 

.

$>iwconfig
wlp3s0    IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

enp0s29u1u2  no wireless extensions.

lo        no wireless extensions.

enp2s0f0  no wireless extensions.

.

$>iwlist scan
wlp3s0    No scan results

enp0s29u1u2  Interface doesn't support scanning.

lo        Interface doesn't support scanning.

enp2s0f0  Interface doesn't support scanning.

.

$>lsb_release -d
Description:    Ubuntu 16.04.3 LTS
$>uname -mr
4.13.0-32-generic x86_64

Ethernet funciona bem.

    
por Emil Terman 27.01.2018 / 17:34

1 resposta

1

Primeiro de tudo, o arquivo de driver que você vinculou especificamente diz: Linux (kernel 2.6.18 ~ 3.10.10) . Você está executando o muito mais novo 4.13.0-xx. O arquivo que você baixou nunca irá compilar.

Em seguida, vemos que você instalou o ndiswrapper para tentar fazer o dispositivo funcionar. Por favor, remova-o.

sudo apt purge ndiswrapper*

Você pode instalar o driver do seu dispositivo com:

sudo apt-get update
sudo apt-get install git
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
cd rtl8192eu-linux-driver
sudo dkms add .
sudo dkms install rtl8192eu/1.0
sudo modprobe 8192eu

Por fim, vemos que o seu dispositivo interno Broadcom não está funcionando devido a um bloqueio de hardware. ou seja, o comutador ou combinação de teclas está definido para desabilitar sem fio. É provável que o USB também seja bloqueado; nesse caso, você precisará localizar e alternar o comutador sem fio e, se desejar usar o USB, inclua na lista negra o driver para o sistema sem fio interno.

EDITAR : para evitar possíveis conflitos com o dispositivo interno, sugiro que façamos uma lista negra do driver:

sudo -i
echo "blacklist wl"  >>  /etc/modprobe.d/blacklist.conf
echo "blacklist rtl8xxxu"  >>  /etc/modprobe.d/blacklist.conf
exit

Alguma melhoria? Se você precisar colar um dmesg, eu sugiro: link e nos dê o link.

    
por chili555 27.01.2018 / 18:07