[Risolto] WeChip chiavetta wifi usb

Networking, configurazione della connessione, periferiche e condivisioni di rete.
Giomat
Prode Principiante
Messaggi: 24
Iscrizione: sabato 18 febbraio 2023, 12:43
Distribuzione: Mate 2210
Sesso: Maschile

Re: WeChip chiavetta wifi usb

Messaggio da Giomat »

Codice: Seleziona tutto

giomat@giomat-System-Product-Name:~/Scrivania$ lsb_release -a && uname -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.10
Release:	22.10
Codename:	kinetic
Linux giomat-System-Product-Name 5.19.0-31-generic #32-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 20 15:20:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
giomat@giomat-System-Product-Name:~/Scrivania$ ls -l /usr/src/linux-headers-$(uname -r)
totale 1872
drwxr-xr-x 3 root root    4096 feb 20 07:06 arch
lrwxrwxrwx 1 root root      32 gen 20 14:57 block -> ../linux-headers-5.19.0-31/block
lrwxrwxrwx 1 root root      32 gen 20 14:57 certs -> ../linux-headers-5.19.0-31/certs
lrwxrwxrwx 1 root root      33 gen 20 14:57 crypto -> ../linux-headers-5.19.0-31/crypto
lrwxrwxrwx 1 root root      40 gen 20 14:57 Documentation -> ../linux-headers-5.19.0-31/Documentation
lrwxrwxrwx 1 root root      34 gen 20 14:57 drivers -> ../linux-headers-5.19.0-31/drivers
lrwxrwxrwx 1 root root      29 gen 20 14:57 fs -> ../linux-headers-5.19.0-31/fs
drwxr-xr-x 4 root root    4096 feb 20 07:06 include
lrwxrwxrwx 1 root root      31 gen 20 14:57 init -> ../linux-headers-5.19.0-31/init
lrwxrwxrwx 1 root root      35 gen 20 14:57 io_uring -> ../linux-headers-5.19.0-31/io_uring
lrwxrwxrwx 1 root root      30 gen 20 14:57 ipc -> ../linux-headers-5.19.0-31/ipc
lrwxrwxrwx 1 root root      33 gen 20 14:57 Kbuild -> ../linux-headers-5.19.0-31/Kbuild
lrwxrwxrwx 1 root root      34 gen 20 14:57 Kconfig -> ../linux-headers-5.19.0-31/Kconfig
drwxr-xr-x 2 root root    4096 feb 20 07:06 kernel
lrwxrwxrwx 1 root root      30 gen 20 14:57 lib -> ../linux-headers-5.19.0-31/lib
lrwxrwxrwx 1 root root      35 gen 20 14:57 Makefile -> ../linux-headers-5.19.0-31/Makefile
lrwxrwxrwx 1 root root      29 gen 20 14:57 mm -> ../linux-headers-5.19.0-31/mm
-rw-r--r-- 1 root root 1884364 gen 20 14:57 Module.symvers
lrwxrwxrwx 1 root root      30 gen 20 14:57 net -> ../linux-headers-5.19.0-31/net
lrwxrwxrwx 1 root root      34 gen 20 14:57 samples -> ../linux-headers-5.19.0-31/samples
drwxr-xr-x 7 root root   12288 feb 20 07:06 scripts
lrwxrwxrwx 1 root root      35 gen 20 14:57 security -> ../linux-headers-5.19.0-31/security
lrwxrwxrwx 1 root root      32 gen 20 14:57 sound -> ../linux-headers-5.19.0-31/sound
drwxr-xr-x 4 root root    4096 feb 20 07:06 tools
lrwxrwxrwx 1 root root      33 gen 20 14:57 ubuntu -> ../linux-headers-5.19.0-31/ubuntu
lrwxrwxrwx 1 root root      30 gen 20 14:57 usr -> ../linux-headers-5.19.0-31/usr
lrwxrwxrwx 1 root root      31 gen 20 14:57 virt -> ../linux-headers-5.19.0-31/virt
giomat@giomat-System-Product-Name:~/Scrivania$ 

Giomat
Prode Principiante
Messaggi: 24
Iscrizione: sabato 18 febbraio 2023, 12:43
Distribuzione: Mate 2210
Sesso: Maschile

Re: WeChip chiavetta wifi usb

Messaggio da Giomat »

Codice: Seleziona tutto

giomat@giomat-System-Product-Name:~/Scrivania$ lsb_release -a && uname -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.10
Release:	22.10
Codename:	kinetic
Linux giomat-System-Product-Name 5.19.0-31-generic #32-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 20 15:20:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
giomat@giomat-System-Product-Name:~/Scrivania$ ls -l /usr/src/linux-headers-$(uname -r)
totale 1872
drwxr-xr-x 3 root root    4096 feb 20 07:06 arch
lrwxrwxrwx 1 root root      32 gen 20 14:57 block -> ../linux-headers-5.19.0-31/block
lrwxrwxrwx 1 root root      32 gen 20 14:57 certs -> ../linux-headers-5.19.0-31/certs
lrwxrwxrwx 1 root root      33 gen 20 14:57 crypto -> ../linux-headers-5.19.0-31/crypto
lrwxrwxrwx 1 root root      40 gen 20 14:57 Documentation -> ../linux-headers-5.19.0-31/Documentation
lrwxrwxrwx 1 root root      34 gen 20 14:57 drivers -> ../linux-headers-5.19.0-31/drivers
lrwxrwxrwx 1 root root      29 gen 20 14:57 fs -> ../linux-headers-5.19.0-31/fs
drwxr-xr-x 4 root root    4096 feb 20 07:06 include
lrwxrwxrwx 1 root root      31 gen 20 14:57 init -> ../linux-headers-5.19.0-31/init
lrwxrwxrwx 1 root root      35 gen 20 14:57 io_uring -> ../linux-headers-5.19.0-31/io_uring
lrwxrwxrwx 1 root root      30 gen 20 14:57 ipc -> ../linux-headers-5.19.0-31/ipc
lrwxrwxrwx 1 root root      33 gen 20 14:57 Kbuild -> ../linux-headers-5.19.0-31/Kbuild
lrwxrwxrwx 1 root root      34 gen 20 14:57 Kconfig -> ../linux-headers-5.19.0-31/Kconfig
drwxr-xr-x 2 root root    4096 feb 20 07:06 kernel
lrwxrwxrwx 1 root root      30 gen 20 14:57 lib -> ../linux-headers-5.19.0-31/lib
lrwxrwxrwx 1 root root      35 gen 20 14:57 Makefile -> ../linux-headers-5.19.0-31/Makefile
lrwxrwxrwx 1 root root      29 gen 20 14:57 mm -> ../linux-headers-5.19.0-31/mm
-rw-r--r-- 1 root root 1884364 gen 20 14:57 Module.symvers
lrwxrwxrwx 1 root root      30 gen 20 14:57 net -> ../linux-headers-5.19.0-31/net
lrwxrwxrwx 1 root root      34 gen 20 14:57 samples -> ../linux-headers-5.19.0-31/samples
drwxr-xr-x 7 root root   12288 feb 20 07:06 scripts
lrwxrwxrwx 1 root root      35 gen 20 14:57 security -> ../linux-headers-5.19.0-31/security
lrwxrwxrwx 1 root root      32 gen 20 14:57 sound -> ../linux-headers-5.19.0-31/sound
drwxr-xr-x 4 root root    4096 feb 20 07:06 tools
lrwxrwxrwx 1 root root      33 gen 20 14:57 ubuntu -> ../linux-headers-5.19.0-31/ubuntu
lrwxrwxrwx 1 root root      30 gen 20 14:57 usr -> ../linux-headers-5.19.0-31/usr
lrwxrwxrwx 1 root root      31 gen 20 14:57 virt -> ../linux-headers-5.19.0-31/virt
giomat@giomat-System-Product-Name:~/Scrivania$ 

Avatar utente
GjMan78
Rampante Reduce
Rampante Reduce
Messaggi: 5391
Iscrizione: mercoledì 22 novembre 2006, 19:15
Desktop: KdePlasma
Distribuzione: EndeavourOS
Sesso: Maschile
Località: ~/Italia/Lazio/Viterbo/

Re: WeChip chiavetta wifi usb

Messaggio da GjMan78 »

scusa il ritardo.

Postami questo per favore

Codice: Seleziona tutto

dkms status
MacBook Pro - Intel i5-3210 - 16 Gbyte Ram DDR3 - SSD 500 Gbyte x 2
»»» 𝗙𝗮𝗶 𝗶𝗹 𝗕𝗮𝗰𝗸𝘂𝗽! ¯\_(ツ)_/¯
Giomat
Prode Principiante
Messaggi: 24
Iscrizione: sabato 18 febbraio 2023, 12:43
Distribuzione: Mate 2210
Sesso: Maschile

Re: WeChip chiavetta wifi usb

Messaggio da Giomat »

Codice: Seleziona tutto

giomat@giomat-System-Product-Name:~/Scrivania$ lsb_release -a && uname -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.10
Release:	22.10
Codename:	kinetic
Linux giomat-System-Product-Name 5.19.0-31-generic #32-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 20 15:20:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
giomat@giomat-System-Product-Name:~/Scrivania$ 
giomat@giomat-System-Product-Name:~/Scrivania$ ls -l /usr/src/linux-headers-$(uname -r)
totale 1872
drwxr-xr-x 3 root root 4096 feb 20 07:06 arch
lrwxrwxrwx 1 root root 32 gen 20 14:57 block -> ../linux-headers-5.19.0-31/block
lrwxrwxrwx 1 root root 32 gen 20 14:57 certs -> ../linux-headers-5.19.0-31/certs
lrwxrwxrwx 1 root root 33 gen 20 14:57 crypto -> ../linux-headers-5.19.0-31/crypto
lrwxrwxrwx 1 root root 40 gen 20 14:57 Documentation -> ../linux-headers-5.19.0-31/Documentation
lrwxrwxrwx 1 root root 34 gen 20 14:57 drivers -> ../linux-headers-5.19.0-31/drivers
lrwxrwxrwx 1 root root 29 gen 20 14:57 fs -> ../linux-headers-5.19.0-31/fs
drwxr-xr-x 4 root root 4096 feb 20 07:06 include
lrwxrwxrwx 1 root root 31 gen 20 14:57 init -> ../linux-headers-5.19.0-31/init
lrwxrwxrwx 1 root root 35 gen 20 14:57 io_uring -> ../linux-headers-5.19.0-31/io_uring
lrwxrwxrwx 1 root root 30 gen 20 14:57 ipc -> ../linux-headers-5.19.0-31/ipc
lrwxrwxrwx 1 root root 33 gen 20 14:57 Kbuild -> ../linux-headers-5.19.0-31/Kbuild
lrwxrwxrwx 1 root root 34 gen 20 14:57 Kconfig -> ../linux-headers-5.19.0-31/Kconfig
drwxr-xr-x 2 root root 4096 feb 20 07:06 kernel
lrwxrwxrwx 1 root root 30 gen 20 14:57 lib -> ../linux-headers-5.19.0-31/lib
lrwxrwxrwx 1 root root 35 gen 20 14:57 Makefile -> ../linux-headers-5.19.0-31/Makefile
lrwxrwxrwx 1 root root 29 gen 20 14:57 mm -> ../linux-headers-5.19.0-31/mm
-rw-r--r-- 1 root root 1884364 gen 20 14:57 Module.symvers
lrwxrwxrwx 1 root root 30 gen 20 14:57 net -> ../linux-headers-5.19.0-31/net
lrwxrwxrwx 1 root root 34 gen 20 14:57 samples -> ../linux-headers-5.19.0-31/samples
drwxr-xr-x 7 root root 12288 feb 20 07:06 scripts
lrwxrwxrwx 1 root root 35 gen 20 14:57 security -> ../linux-headers-5.19.0-31/security
lrwxrwxrwx 1 root root 32 gen 20 14:57 sound -> ../linux-headers-5.19.0-31/sound
drwxr-xr-x 4 root root 4096 feb 20 07:06 tools
lrwxrwxrwx 1 root root 33 gen 20 14:57 ubuntu -> ../linux-headers-5.19.0-31/ubuntu
lrwxrwxrwx 1 root root 30 gen 20 14:57 usr -> ../linux-headers-5.19.0-31/usr
lrwxrwxrwx 1 root root 31 gen 20 14:57 virt -> ../linux-headers-5.19.0-31/virt
giomat@giomat-System-Product-Name:~/Scrivania$
Giomat
Prode Principiante
Messaggi: 24
Iscrizione: sabato 18 febbraio 2023, 12:43
Distribuzione: Mate 2210
Sesso: Maschile

Re: WeChip chiavetta wifi usb

Messaggio da Giomat »

Mi sa che ho sbagliato
lo rifaccio
Giomat
Prode Principiante
Messaggi: 24
Iscrizione: sabato 18 febbraio 2023, 12:43
Distribuzione: Mate 2210
Sesso: Maschile

Re: WeChip chiavetta wifi usb

Messaggio da Giomat »

Codice: Seleziona tutto

giomat@giomat-System-Product-Name:~/Scrivania$ dkms status
rtl8821CU/5.4.1: added
giomat@giomat-System-Product-Name:~/Scrivania$ 
Giomat
Prode Principiante
Messaggi: 24
Iscrizione: sabato 18 febbraio 2023, 12:43
Distribuzione: Mate 2210
Sesso: Maschile

Re: WeChip chiavetta wifi usb

Messaggio da Giomat »

:D Cmq tranquillo non ho nessuna urgenza. E' che mi piace imparare :D
Avatar utente
GjMan78
Rampante Reduce
Rampante Reduce
Messaggi: 5391
Iscrizione: mercoledì 22 novembre 2006, 19:15
Desktop: KdePlasma
Distribuzione: EndeavourOS
Sesso: Maschile
Località: ~/Italia/Lazio/Viterbo/

Re: WeChip chiavetta wifi usb

Messaggio da GjMan78 »

Rimuoviamo il modulo dkms

Codice: Seleziona tutto

sudo dkms remove rtl8821CU/5.4.1 --all

Poi nell'ordine esegui questi comandi

Codice: Seleziona tutto

cd ~

Codice: Seleziona tutto

cd build

Codice: Seleziona tutto

cd rtl8821CU

Codice: Seleziona tutto

make

Codice: Seleziona tutto

sudo make install
ed infine, se non ci sono errori

Codice: Seleziona tutto

sudo modprobe 8821cu
MacBook Pro - Intel i5-3210 - 16 Gbyte Ram DDR3 - SSD 500 Gbyte x 2
»»» 𝗙𝗮𝗶 𝗶𝗹 𝗕𝗮𝗰𝗸𝘂𝗽! ¯\_(ツ)_/¯
Giomat
Prode Principiante
Messaggi: 24
Iscrizione: sabato 18 febbraio 2023, 12:43
Distribuzione: Mate 2210
Sesso: Maschile

Re: WeChip chiavetta wifi usb

Messaggio da Giomat »

Codice: Seleziona tutto

giomat@giomat-System-Product-Name:~/Scrivania$ sudo dkms remove rtl8821CU/5.4.1 --all
[sudo] password di giomat: 
Deleting module rtl8821CU-5.4.1 completely from the DKMS tree.
giomat@giomat-System-Product-Name:~/Scrivania$ cd ~
giomat@giomat-System-Product-Name:~$ cd build
giomat@giomat-System-Product-Name:~/build$ cd rtl8821CU
giomat@giomat-System-Product-Name:~/build/rtl8821CU$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.19.0-31-generic/build M=/home/giomat/build/rtl8821CU  modules
make[1]: ingresso nella directory «/usr/src/linux-headers-5.19.0-31-generic»
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-3ubuntu1) 12.2.0
  You are using:           gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_cmd.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_security.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_debug.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_io.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_ioctl_query.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_ioctl_set.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_ieee80211.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_mlme.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_mlme_ext.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_mi.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_wlan_util.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_vht.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_pwrctrl.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_rf.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_recv.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_sta_mgt.o
/home/giomat/build/rtl8821CU/core/rtw_sta_mgt.c: In function ‘rtw_mfree_stainfo’:
/home/giomat/build/rtl8821CU/core/rtw_sta_mgt.c:379:25: warning: the comparison will always evaluate as ‘true’ for the address of ‘lock’ will never be NULL [-Waddress]
  379 |         if (&psta->lock != NULL)
      |                         ^~
In file included from /home/giomat/build/rtl8821CU/include/drv_types.h:107,
                 from /home/giomat/build/rtl8821CU/core/rtw_sta_mgt.c:17:
/home/giomat/build/rtl8821CU/include/sta_info.h:256:17: note: ‘lock’ declared here
  256 |         _lock   lock;
      |                 ^~~~
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_ap.o
/home/giomat/build/rtl8821CU/core/rtw_ap.c: In function ‘rtw_ap_update_chbw_by_ifbmp’:
/home/giomat/build/rtl8821CU/core/rtw_ap.c:4397:42: warning: the comparison will always evaluate as ‘true’ for the address of ‘padapters’ will never be NULL [-Waddress]
 4397 |                 if (!(ifbmp & BIT(i)) || !dvobj->padapters)
      |                                          ^
In file included from /home/giomat/build/rtl8821CU/core/rtw_ap.c:17:
/home/giomat/build/rtl8821CU/include/drv_types.h:1020:19: note: ‘padapters’ declared here
 1020 |         _adapter *padapters[CONFIG_IFACE_NUMBER];/*IFACE_ID_MAX*/
      |                   ^~~~~~~~~
/home/giomat/build/rtl8821CU/core/rtw_ap.c:4417:42: warning: the comparison will always evaluate as ‘true’ for the address of ‘padapters’ will never be NULL [-Waddress]
 4417 |                 if (!(ifbmp & BIT(i)) || !dvobj->padapters)
      |                                          ^
/home/giomat/build/rtl8821CU/include/drv_types.h:1020:19: note: ‘padapters’ declared here
 1020 |         _adapter *padapters[CONFIG_IFACE_NUMBER];/*IFACE_ID_MAX*/
      |                   ^~~~~~~~~
  CC [M]  /home/giomat/build/rtl8821CU/core/mesh/rtw_mesh.o
  CC [M]  /home/giomat/build/rtl8821CU/core/mesh/rtw_mesh_pathtbl.o
  CC [M]  /home/giomat/build/rtl8821CU/core/mesh/rtw_mesh_hwmp.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_xmit.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_p2p.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_rson.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_tdls.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_br_ext.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_iol.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_sreset.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_btcoex_wifionly.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_btcoex.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_beamforming.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_odm.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_rm.o
  CC [M]  /home/giomat/build/rtl8821CU/core/rtw_rm_fsm.o
  CC [M]  /home/giomat/build/rtl8821CU/core/efuse/rtw_efuse.o
  CC [M]  /home/giomat/build/rtl8821CU/os_dep/osdep_service.o
/home/giomat/build/rtl8821CU/os_dep/osdep_service.c: In function ‘rtw_change_ifname’:
/home/giomat/build/rtl8821CU/os_dep/osdep_service.c:2494:28: warning: passing argument 1 of ‘_rtw_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 2494 |         _rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
      |                     ~~~~~~~^~~~~~~~~~
/home/giomat/build/rtl8821CU/os_dep/osdep_service.c:925:24: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  925 | void _rtw_memcpy(void *dst, const void *src, u32 sz)
      |                  ~~~~~~^~~
  CC [M]  /home/giomat/build/rtl8821CU/os_dep/linux/os_intfs.o
  CC [M]  /home/giomat/build/rtl8821CU/os_dep/linux/usb_intf.o
  CC [M]  /home/giomat/build/rtl8821CU/os_dep/linux/usb_ops_linux.o
  CC [M]  /home/giomat/build/rtl8821CU/os_dep/linux/ioctl_linux.o
/home/giomat/build/rtl8821CU/os_dep/linux/ioctl_linux.c: In function ‘rtw_mp_efuse_set’:
/home/giomat/build/rtl8821CU/os_dep/linux/ioctl_linux.c:9781:46: warning: passing argument 1 of ‘_rtw_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 9781 |                 _rtw_memcpy(padapter->pnetdev->dev_addr, get_hal_mac_addr(padapter), ETH_ALEN); /* set mac addr to net_device */
      |                             ~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from /home/giomat/build/rtl8821CU/include/drv_types.h:27,
                 from /home/giomat/build/rtl8821CU/os_dep/linux/ioctl_linux.c:17:
/home/giomat/build/rtl8821CU/include/osdep_service.h:296:35: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  296 | extern void     _rtw_memcpy(void *dec, const void *sour, u32 sz);
      |                             ~~~~~~^~~
  CC [M]  /home/giomat/build/rtl8821CU/os_dep/linux/xmit_linux.o
  CC [M]  /home/giomat/build/rtl8821CU/os_dep/linux/mlme_linux.o
  CC [M]  /home/giomat/build/rtl8821CU/os_dep/linux/recv_linux.o
  CC [M]  /home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.o
/home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_ch_switch_notify’:
/home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:420:9: error: too few arguments to function ‘cfg80211_ch_switch_notify’
  420 |         cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/giomat/build/rtl8821CU/include/osdep_service_linux.h:93,
                 from /home/giomat/build/rtl8821CU/include/osdep_service.h:50,
                 from /home/giomat/build/rtl8821CU/include/drv_types.h:27,
                 from /home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:17:
./include/net/cfg80211.h:7967:6: note: declared here
 7967 | void cfg80211_ch_switch_notify(struct net_device *dev,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c: In function ‘cfg80211_rtw_scan’:
/home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:2867:33: warning: the comparison will always evaluate as ‘true’ for the address of ‘ssid’ will never be NULL [-Waddress]
 2867 |                 if (ssids->ssid != NULL
      |                                 ^~
./include/net/cfg80211.h:2302:12: note: ‘ssid’ declared here
 2302 |         u8 ssid[IEEE80211_MAX_SSID_LEN];
      |            ^~~~
/home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c: At top level:
/home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:9416:20: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, unsigned int)’ from incompatible pointer type ‘int (*)(struct wiphy *, struct net_device *)’ [-Werror=incompatible-pointer-types]
 9416 |         .stop_ap = cfg80211_rtw_stop_ap,
      |                    ^~~~~~~~~~~~~~~~~~~~
/home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:9416:20: note: (near initialization for ‘rtw_cfg80211_ops.stop_ap’)
/home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_wdev_unregister’:
/home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:9682:17: error: ‘struct wireless_dev’ has no member named ‘current_bss’
 9682 |         if (wdev->current_bss) {
      |                 ^~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:257: /home/giomat/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.o] Errore 1
make[1]: *** [Makefile:1850: /home/giomat/build/rtl8821CU] Errore 2
make[1]: uscita dalla directory «/usr/src/linux-headers-5.19.0-31-generic»
make: *** [Makefile:2217: modules] Errore 2
giomat@giomat-System-Product-Name:~/build/rtl8821CU$ sudo make install
mkdir -p /lib/modules/5.19.0-31-generic/kernel/drivers/net/wireless/realtek/rtl8821cu/
install -p -m 644 8821cu.ko  /lib/modules/5.19.0-31-generic/kernel/drivers/net/wireless/realtek/rtl8821cu/
install: impossibile eseguire stat di '8821cu.ko': File o directory non esistente
make: *** [Makefile:2224: install] Errore 1
giomat@giomat-System-Product-Name:~/build/rtl8821CU$ sudo modprobe 8821cu
modprobe: FATAL: Module 8821cu not found in directory /lib/modules/5.19.0-31-generic
giomat@giomat-System-Product-Name:~/build/rtl8821CU$ 
Avatar utente
GjMan78
Rampante Reduce
Rampante Reduce
Messaggi: 5391
Iscrizione: mercoledì 22 novembre 2006, 19:15
Desktop: KdePlasma
Distribuzione: EndeavourOS
Sesso: Maschile
Località: ~/Italia/Lazio/Viterbo/

Re: WeChip chiavetta wifi usb

Messaggio da GjMan78 »

Non riesco a capire perché la compilazione non va a buon fine.

Ieri sera ho provato su Ubuntu 22.04 e funziona, sia in dkms che con la compilazione standard.

Ci serve qualcuno più esperto...

@magozurlinux Per favore puoi darci una mano?
MacBook Pro - Intel i5-3210 - 16 Gbyte Ram DDR3 - SSD 500 Gbyte x 2
»»» 𝗙𝗮𝗶 𝗶𝗹 𝗕𝗮𝗰𝗸𝘂𝗽! ¯\_(ツ)_/¯
Avatar utente
thece
Tenace Tecnocrate
Tenace Tecnocrate
Messaggi: 12943
Iscrizione: lunedì 23 aprile 2007, 14:16
Distribuzione: Debian 12 (Bookworm) - KDE

Re: WeChip chiavetta wifi usb

Messaggio da thece »

:ciao:

il problema è già stato segnalato al maintainer del progetto su GitHub: https://github.com/brektrou/rtl8821CU/issues/206
Nella segnalazione un altro utente suggerisce di usare questo driver: https://github.com/morrownr/8821cu-20210916
Avatar utente
GjMan78
Rampante Reduce
Rampante Reduce
Messaggi: 5391
Iscrizione: mercoledì 22 novembre 2006, 19:15
Desktop: KdePlasma
Distribuzione: EndeavourOS
Sesso: Maschile
Località: ~/Italia/Lazio/Viterbo/

Re: WeChip chiavetta wifi usb

Messaggio da GjMan78 »

Grazie mille per l'aiuto @thece

Eliminiamo i vecchi file

Codice: Seleziona tutto

 rm -rf ~/build
Proviamo ad installare il nuovo modulo...

Da terminale

Codice: Seleziona tutto

sudo apt install -y gcc make bc kernel-headers build-essential git dkms rfkill iw ip

Codice: Seleziona tutto

cd /usr/src

Codice: Seleziona tutto

sudo git clone https://github.com/morrownr/8821cu-20210916.git

Codice: Seleziona tutto

cd /usr/src/8821cu-20210916

Codice: Seleziona tutto

sudo ./install-driver.sh NoPrompt
Riporta qui i risultati se vedi degli errori.

Se la procedura si conclude senza errori riavvia il PC e vediamo come va...
Ultima modifica di GjMan78 il martedì 21 febbraio 2023, 17:23, modificato 2 volte in totale.
MacBook Pro - Intel i5-3210 - 16 Gbyte Ram DDR3 - SSD 500 Gbyte x 2
»»» 𝗙𝗮𝗶 𝗶𝗹 𝗕𝗮𝗰𝗸𝘂𝗽! ¯\_(ツ)_/¯
Avatar utente
thece
Tenace Tecnocrate
Tenace Tecnocrate
Messaggi: 12943
Iscrizione: lunedì 23 aprile 2007, 14:16
Distribuzione: Debian 12 (Bookworm) - KDE

Re: WeChip chiavetta wifi usb

Messaggio da thece »

GjMan78 ha scritto:
martedì 21 febbraio 2023, 17:04
Proviamo ad installare il nuovo modulo...
Magari prima date una ripulita al sistema, giusto per non lasciare cadaveri in giro ...

Altra cosa, i sorgenti andrebbero scaricati e compilati sotto la directory /usr/src o /usr/local/src e non dove capita, sono state messe lì apposta. Così si tiene il sistema ordinato

Filesystem Hierarchy Standard



Io per comodità solitamente metto tutto in /usr/src e vedo che questa soluzione è utilizzata anche da vari produttori di software
Ultima modifica di thece il martedì 21 febbraio 2023, 17:22, modificato 3 volte in totale.
Avatar utente
GjMan78
Rampante Reduce
Rampante Reduce
Messaggi: 5391
Iscrizione: mercoledì 22 novembre 2006, 19:15
Desktop: KdePlasma
Distribuzione: EndeavourOS
Sesso: Maschile
Località: ~/Italia/Lazio/Viterbo/

Re: WeChip chiavetta wifi usb

Messaggio da GjMan78 »

thece ha scritto:
martedì 21 febbraio 2023, 17:13
GjMan78 ha scritto:
martedì 21 febbraio 2023, 17:04
Proviamo ad installare il nuovo modulo...
Magari prima date una ripulita al sistema, giusto per non lasciare cadaveri in giro ...
Dall'ultimo output mi è sembrato di capire che la compilazione si sia interrotta senza creare file, per questo ho ignorato la cosa.
thece ha scritto:
martedì 21 febbraio 2023, 17:13
Altra cosa, i sorgenti andrebbero scaricati e compilati sotto la directory /usr/src e non dove capita, è stata messa lì apposta. Così si tiene il sistema ordinato
Giusto, correggo.

Io ingenuamente tengo sempre tutto nella home perché è l'unica cartella sottoposta a backup settimanale. In caso di reinstallazione mi ritrovo subito i moduli che mi servono.
MacBook Pro - Intel i5-3210 - 16 Gbyte Ram DDR3 - SSD 500 Gbyte x 2
»»» 𝗙𝗮𝗶 𝗶𝗹 𝗕𝗮𝗰𝗸𝘂𝗽! ¯\_(ツ)_/¯
Avatar utente
thece
Tenace Tecnocrate
Tenace Tecnocrate
Messaggi: 12943
Iscrizione: lunedì 23 aprile 2007, 14:16
Distribuzione: Debian 12 (Bookworm) - KDE

Re: WeChip chiavetta wifi usb

Messaggio da thece »

GjMan78 ha scritto:
martedì 21 febbraio 2023, 17:18
Dall'ultimo output mi è sembrato di capire che la compilazione si sia interrotta senza creare file, per questo ho ignorato la cosa.
Non è stato creato l'eseguibile del driver ma sono stati creati i file oggetto intermedi e poi è sicuramente rimasta la directory con il progetto scaricato da GitHub (cadavere)

Nulla di grave, ma sono finezze che aiutano a mantenere in ordine il sistema. Oggi ... domani ... tra una settimana sicuramente ti ricordi cosa hai fatto. Tra un anno magari no
Personalmente mi è capitato di utenti che avevano provato a compilare driver prendendoli da GitHub e sparpagliandoli in varie versioni sul HD. Nel momento in cui le cose si (ri)rompono vai a capire cosa era stato utilizzato ...
Giomat
Prode Principiante
Messaggi: 24
Iscrizione: sabato 18 febbraio 2023, 12:43
Distribuzione: Mate 2210
Sesso: Maschile

Re: WeChip chiavetta wifi usb

Messaggio da Giomat »

Codice: Seleziona tutto

giomat@giomat-System-Product-Name:~/Scrivania$  rm -rf ~/build
giomat@giomat-System-Product-Name:~/Scrivania$ sudo apt install -y gcc make bc kernel-headers build-essential git dkms rfkill iw ip
[sudo] password di giomat: 
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze... Fatto
Lettura informazioni sullo stato... Fatto   
E: Impossibile trovare il pacchetto kernel-headers
E: Impossibile trovare il pacchetto ip
giomat@giomat-System-Product-Name:~/Scrivania$ cd /usr/src
giomat@giomat-System-Product-Name:/usr/src$ sudo git clone https://github.com/morrownr/8821cu-20210916.git
Clone in '8821cu-20210916' in corso...
remote: Enumerating objects: 1343, done.
remote: Counting objects: 100% (136/136), done.
remote: Compressing objects: 100% (98/98), done.
remote: Total 1343 (delta 72), reused 77 (delta 36), pack-reused 1207
Ricezione degli oggetti: 100% (1343/1343), 13.93 MiB | 1.33 MiB/s, fatto.
Risoluzione dei delta: 100% (621/621), fatto.
giomat@giomat-System-Product-Name:/usr/src$ cd /usr/src/8821cu-20210916
giomat@giomat-System-Product-Name:/usr/src/8821cu-20210916$ sudo ./install-driver.sh NoPrompt
: ---------------------------
: install-driver.sh v20230126
: x86_64 (architecture)
: 4/4 (in-use/total processing units)
: 8117068 (total system memory)
: 5.19.0-31-generic (kernel version)
: gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0
: dkms-3.0.6
EFI variables are not supported on this system
: 
: ---------------------------
Installing 8821cu.conf to /etc/modprobe.d
The dkms installation routines are in use.
Copying source files to /usr/src/rtl8821cu-5.12.0.4
Creating symlink /var/lib/dkms/rtl8821cu/5.12.0.4/source -> /usr/src/rtl8821cu-5.12.0.4
The driver was added to dkms successfully.
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Building module:
Cleaning build area...
./dkms-make.sh.....................................
Signing module /var/lib/dkms/rtl8821cu/5.12.0.4/build/8821cu.ko
Cleaning build area...
Compile time: 306.44 seconds
The driver was built by dkms successfully.

8821cu.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.19.0-31-generic/updates/dkms/
depmod...................
The driver was installed by dkms successfully.
giomat@giomat-System-Product-Name:/usr/src/8821cu-20210916$ 
Giomat
Prode Principiante
Messaggi: 24
Iscrizione: sabato 18 febbraio 2023, 12:43
Distribuzione: Mate 2210
Sesso: Maschile

Re: WeChip chiavetta wifi usb

Messaggio da Giomat »

Funziona alla grande !
Un grazie di cuore a Tutti :D
Avatar utente
GjMan78
Rampante Reduce
Rampante Reduce
Messaggi: 5391
Iscrizione: mercoledì 22 novembre 2006, 19:15
Desktop: KdePlasma
Distribuzione: EndeavourOS
Sesso: Maschile
Località: ~/Italia/Lazio/Viterbo/

Re: WeChip chiavetta wifi usb

Messaggio da GjMan78 »

Giomat ha scritto:
mercoledì 22 febbraio 2023, 8:01
Funziona alla grande !
Un grazie di cuore a Tutti :D
Mi fa piacere!

Ora dovresti fare una cosa: modificare il titolo del tuo primo messaggio ed aggiungere il tag [Risolto].
:birra:
MacBook Pro - Intel i5-3210 - 16 Gbyte Ram DDR3 - SSD 500 Gbyte x 2
»»» 𝗙𝗮𝗶 𝗶𝗹 𝗕𝗮𝗰𝗸𝘂𝗽! ¯\_(ツ)_/¯
Scrivi risposta

Ritorna a “Connessione e configurazione delle reti”

Chi c’è in linea

Visualizzano questa sezione: Bing [Bot] e 7 ospiti