Utilisation de la wifi avec un dongle *usb*

root@asus:~# cat /etc/default/crda 
# Set REGDOMAIN to a ISO/IEC 3166-1 alpha2 country code so that iw(8) may set
# the initial regulatory domain setting for IEEE 802.11 devices which operate
# on this system.
#
# Governments assert the right to regulate usage of radio spectrum within
# their respective territories so make sure you select a ISO/IEC 3166-1 alpha2
# country code suitable for your location or you may infringe on local
# legislature. See `/usr/share/zoneinfo/zone.tab' for a table of timezone
# descriptions containing ISO/IEC 3166-1 alpha2 country codes.

REGDOMAIN=
root@asus:~# iw reg get
global
country 00: DFS-UNSET
	(2402 - 2472 @ 40), (N/A, 20), (N/A)
	(2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, NO-IR
	(2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, NO-IR
	(5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, NO-IR
	(5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, NO-IR
	(5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, NO-IR
	(5735 - 5835 @ 80), (N/A, 20), (N/A), NO-IR
	(57240 - 63720 @ 2160), (N/A, 0), (N/A)

root@asus:~# 
root@asus:~# iw reg set FR
root@asus:~# ^C
root@asus:~# cat /etc/default/crda 
# Set REGDOMAIN to a ISO/IEC 3166-1 alpha2 country code so that iw(8) may set
# the initial regulatory domain setting for IEEE 802.11 devices which operate
# on this system.
#
# Governments assert the right to regulate usage of radio spectrum within
# their respective territories so make sure you select a ISO/IEC 3166-1 alpha2
# country code suitable for your location or you may infringe on local
# legislature. See `/usr/share/zoneinfo/zone.tab' for a table of timezone
# descriptions containing ISO/IEC 3166-1 alpha2 country codes.

REGDOMAIN=
root@asus:~# 
root@asus:~# iw reg get
global
country FR: DFS-ETSI
	(2402 - 2482 @ 40), (N/A, 20), (N/A)
	(5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW
	(5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW
	(5490 - 5710 @ 160), (N/A, 27), (0 ms), DFS
	(57000 - 66000 @ 2160), (N/A, 40), (N/A)
root@asus:~# 

Voici ce que j’ai fait. Ça ne marche toujours pas mais je n’ai pas rebooté (et ne sait pas si ça va être pris en compte définitivement. Pour la debian live, je progresse 'ja sais devenir root), mais je ne sais pas pour l’instant faire plus

Voici ce que j’obtiens après reboot :

root@asus:/home/daniel# iw reg get
global
country 00: DFS-UNSET
	(2402 - 2472 @ 40), (N/A, 20), (N/A)
	(2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, NO-IR
	(2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, NO-IR
	(5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, NO-IR
	(5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, NO-IR
	(5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, NO-IR
	(5735 - 5835 @ 80), (N/A, 20), (N/A), NO-IR
	(57240 - 63720 @ 2160), (N/A, 0), (N/A)

root@asus:/home/daniel# 
root@asus:/home/daniel# cat /etc/default/crda 
# Set REGDOMAIN to a ISO/IEC 3166-1 alpha2 country code so that iw(8) may set
# the initial regulatory domain setting for IEEE 802.11 devices which operate
# on this system.
#
# Governments assert the right to regulate usage of radio spectrum within
# their respective territories so make sure you select a ISO/IEC 3166-1 alpha2
# country code suitable for your location or you may infringe on local
# legislature. See `/usr/share/zoneinfo/zone.tab' for a table of timezone
# descriptions containing ISO/IEC 3166-1 alpha2 country codes.

REGDOMAIN=
root@asus:/home/daniel# 

Autrement dit, je ne sais pas rendre le réglage permamnet

le driver ne fait pas son boulot la commande iw reg set fr n’est pas prise en compte
avec la commande

iw list

on obtient les caractéristiques complètes

Avec ton éditeur de texte préféré, mets le en dur dans /etc/default/crda
REGDOMAIN=FR

Fait. J’ai rebooté, mais ça ne fonctionne toujours pas.

Voici le résultat de iw list

root@asus:/home/daniel# iw list
Wiphy phy0
	max # scan SSIDs: 4
	max scan IEs length: 2285 bytes
	max # sched scan SSIDs: 0
	max # match sets: 0
	max # scan plans: 1
	max scan plan interval: -1
	max scan plan iterations: 0
	Retry short limit: 7
	Retry long limit: 4
	Coverage class: 0 (up to 0m)
	Device supports RSN-IBSS.
	Supported Ciphers:
		* WEP40 (00-0f-ac:1)
		* WEP104 (00-0f-ac:5)
		* TKIP (00-0f-ac:2)
		* CCMP-128 (00-0f-ac:4)
		* CCMP-256 (00-0f-ac:10)
		* GCMP-128 (00-0f-ac:8)
		* GCMP-256 (00-0f-ac:9)
	Available Antennas: TX 0 RX 0
	Supported interface modes:
		 * IBSS
		 * managed
		 * AP
		 * AP/VLAN
		 * WDS
		 * monitor
		 * mesh point
	Band 1:
		Bitrates (non-HT):
			* 1.0 Mbps
			* 2.0 Mbps (short preamble supported)
			* 5.5 Mbps (short preamble supported)
			* 11.0 Mbps (short preamble supported)
			* 6.0 Mbps
			* 9.0 Mbps
			* 12.0 Mbps
			* 18.0 Mbps
			* 24.0 Mbps
			* 36.0 Mbps
			* 48.0 Mbps
			* 54.0 Mbps
		Frequencies:
			* 2412 MHz [1] (20.0 dBm)
			* 2417 MHz [2] (20.0 dBm)
			* 2422 MHz [3] (20.0 dBm)
			* 2427 MHz [4] (20.0 dBm)
			* 2432 MHz [5] (20.0 dBm)
			* 2437 MHz [6] (20.0 dBm)
			* 2442 MHz [7] (20.0 dBm)
			* 2447 MHz [8] (20.0 dBm)
			* 2452 MHz [9] (20.0 dBm)
			* 2457 MHz [10] (20.0 dBm)
			* 2462 MHz [11] (20.0 dBm)
			* 2467 MHz [12] (20.0 dBm)
			* 2472 MHz [13] (20.0 dBm)
			* 2484 MHz [14] (disabled)
	Supported commands:
		 * new_interface
		 * set_interface
		 * new_key
		 * start_ap
		 * new_station
		 * new_mpath
		 * set_mesh_config
		 * set_bss
		 * authenticate
		 * associate
		 * deauthenticate
		 * disassociate
		 * join_ibss
		 * join_mesh
		 * set_tx_bitrate_mask
		 * frame
		 * frame_wait_cancel
		 * set_wiphy_netns
		 * set_channel
		 * set_wds_peer
		 * probe_client
		 * set_noack_map
		 * register_beacons
		 * start_p2p_device
		 * set_mcast_rate
		 * set_qos_map
		 * connect
		 * disconnect
	Supported TX frame types:
		 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
	Supported RX frame types:
		 * IBSS: 0x40 0xb0 0xc0 0xd0
		 * managed: 0x40 0xd0
		 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
		 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
		 * mesh point: 0xb0 0xc0 0xd0
		 * P2P-client: 0x40 0xd0
		 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
		 * P2P-device: 0x40 0xd0
	software interface modes (can always be added):
		 * AP/VLAN
		 * monitor
	valid interface combinations:
		 * #{ AP, mesh point } <= 4,
		   total <= 4, #channels <= 1
	HT Capability overrides:
		 * MCS: ff ff ff ff ff ff ff ff ff ff
		 * maximum A-MSDU length
		 * supported channel width
		 * short GI for 40 MHz
		 * max A-MPDU length exponent
		 * min MPDU start spacing
	Device supports TX status socket option.
	Device supports HT-IBSS.
	Device supports SAE with AUTHENTICATE command
	Device supports low priority scan.
	Device supports scan flush.
	Device supports AP scan.
	Device supports per-vif TX power setting
	Driver supports full state transitions for AP/GO clients
	Driver supports a userspace MPM
	Device supports configuring vdev MAC-addr on create.
root@asus:/home/daniel#

ok le matériel wifi est ok

Dernière idée, les règles de nommages qui créent des noms à rallonges dans Debian
https://www.debian.org/releases/stable/amd64/release-notes/ch-whats-new.fr.html#new-interface-names

si tu dis que ça fonctionne sur d’autres distributions, vérifie le nom du wifi avec la commande

nmcli

il est bien possible qu’un nom avec plus de 8 caractères pose probleme pour les box

ce qui corroborerait avec les messages de JWeber dont le nom d’interface est wlan1

Non, ce n’est pas ça : j’ai lancé nmcli depuis xubuntu 18.04 64 bits, xubuntu 16.04 32 bits et la réponse de nmcli
(d’ailleurs la syntaxe a un peu changé depuis 2016) est le nom à rallonge.
Je n’ai pas testé knoppix 8.1 ni kali-linux, parce que les 2 exemples ci-dessus me semblent prouver que ce n’est pas ça.

Pour le moment tout a échoué. Il me reste à tester debian live, mais ce n’est pas vraiment out of the box. Il faut mettre le clavier en azerty rien que pour pouvoir avoir les droits de root. Et après j’hésite sur la conduite à tenir pour avoir accès aux paquets non-free. Je vais faire des essais.

Autant pour moi. Sous Stretch je n’avais pas été jusqu’à configurer la connexion, j’avais juste testé le bon chargement du driver. Network manager doit mal gérer le pilote rt73, ce qui ne pose aucun problème sous Jessie !

Tout fonctionne sous stretch en prenant la main par la méthode classique du fichier /etc/network/interfaces
Chez moi cela donne :

auto lo
iface lo inet loopback

auto wlx001e5897fe8a
allow-hotplug wlx001e5897fe8a
iface wlx001e5897fe8a inet dhcp
wpa-ssid mon_reseau_ssid
wpa-psk ma_cle_wpa

Je branche la clé et tout fonctionne !
Cela s’appelle une régression !

Merci. Je vais tester dès aujourd’hui. Le pire, c’est que c’est ce que je faisais il y a quelques années.

Avec Networkmanager sous stretch tout va bien jusqu’au passage de la clé au routeur. Avec mon wifi intégré (Intel) cela ne pose pourtant pas de problème, sous Jessie non plus (cela conforte ma paresse de ne pas migrer tout de suite :joy:).
Je ne sais pas comment on fait remonter un tel bug.

Bon le conseil de jweber a échoué, mais j’ai probablement fait une bêtise. J’ai gardé mes notes anciennes donc je devrais y arriver.
Moi non plus je ne sais pas faire un rapport de bug, mais là, c’est sûr désormais, et il faudra s’y mettre bientôt.

il faut installer et utiliser l’outil reportbug

apt list reportbug
En train de lister... Fait
reportbug/testing,testing,now 7.1.10 all  [installé]


en le lançant depuis une xterm de son utilisateur ordinaire
mais c’est en anglais

Capture du 2018-06-14 12-29-40

Pourtant je ne rêve pas :

user@debian:/etc/network$ sudo iwconfig
lo        no wireless extensions.

enp0s25   no wireless extensions.

wlx001e5897fe8a  IEEE 802.11  ESSID:"Livebox-DCEB"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: A4:3E:51:0E:DC:EB   
          Bit Rate=54 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=62/70  Signal level=-48 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:29  Invalid misc:166   Missed beacon:0

wlp3s0    IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=15 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          
user@debian:/etc/network$
user@debian:/etc/network$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 28:d2:44:06:45:24 brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 7a:8e:44:4f:93:8b brd ff:ff:ff:ff:ff:ff
4: wlx001e5897fe8a: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 76:6b:fe:22:6f:e9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.13/24 brd 192.168.1.255 scope global wlx001e5897fe8a
       valid_lft forever preferred_lft forever
user@debian:/etc/network$
user@debian:/etc/network$ ping google.com
PING google.com (216.58.205.14): 56 data bytes
64 bytes from 216.58.205.14: icmp_seq=0 ttl=55 time=3,084 ms
...
^C--- google.com ping statistics ---
14 packets transmitted, 13 packets received, 7% packet loss
round-trip min/avg/max/stddev = 3,084/23,613/27,053/5,985 ms

user@debian:/etc/network$
user@debian:/etc/network$ ping orange.fr
PING orange.fr (193.252.148.140): 56 data bytes
64 bytes from 193.252.148.140: icmp_seq=0 ttl=246 time=16,919 ms
...
^C--- orange.fr ping statistics ---
7 packets transmitted, 7 packets received, 0% packet loss
round-trip min/avg/max/stddev = 16,919/34,712/39,631/7,315 ms
user@debian:/etc/network$

Pour le moment, je n’ai pas encore réussi à faire marcher la wifi usb sous debian stretch sur disque dur.
Je veux bien essayer d’envoyer un rapport de bug (même en mauvais anglais (broken English)) mais il faudrait que les 3 personnes qui ont participé à cette discussion soient 1. d’accord sur le principe 2. d’accord sur ce qu’il faut envoyer (en français :wink:

Le bug est déjà connu :
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839605

un palliatif est cité dans le bug

créer un fichier

/etc/NetworkManager/conf.d/30-mac-randomization.conf

y mettre

[device-mac-randomization]
wifi.scan-rand-mac-address=no

[connection-mac-randomization]
ethernet.cloned-mac-address=preserve
wifi.cloned-mac-address=preserve

Oui, je viens de voir la même chose :
https://bbs.archlinux.org/viewtopic.php?pid=1656444#p1656444
avec une explication intéressante :

https://en.wikipedia.org/wiki/MAC_spoofing

Merci à tous les deux. Le plus rageant est que j’avais passé beaucoup de temps à chercher des rapports de bug, sans succès. Il y a même un troisème palliatif que je vais essayer aussi.
Il y a même une référence à ?ubuntu qui expliquerait pourquoi chez eux, ça marche
https://launchpad.net/ubuntu/+source/network-manager

Merci encore

J’ai essayé le palliatif
"This can be achieved by creating an empty file
/etc/systemd/network/99-default.link which then overrides sytemd’s
default options in /lib/systemd/network/99-default.link"

Il a parfaitement fonctionné

Je me suis permis de marquer le sujet comme résolu par ton dernier post