Outils pour utilisateurs

Outils du site


blog

PyContracts

Voir :

Voir aussi :

  • icontract
  • mypy

Voir programmation par contrat en générale :

pipenv install PyContracts
# coding: utf-8
 
from contracts import contract
 
#contracts.disable_all()
 
@contract
def div(a, b):
    """
    Simple division
    :type a: int,>0
    :type b: int,>0
    :rtype: float,>0
    """
    return a / b
2025/03/24 15:06

Code Morse

Le Morse, mieux que le phoque !

$ morsegen <(echo -n "Biere")
-... .. . .-. .

           ASCII           Morse prosign
           ------------    ------------------
           ' ' (space)     Invitation to transmit
           \t              Starting signal
           \r              Wait
           \n              End of work
2025/03/24 15:06

Analyse de données textuelles

Test Flesch-Kincaid

Liens :

Cette méthode développée pour la marine de guerre américaine permet de déterminer la complexité d’un texte écrit en anglais, en fonction de la longueur de ses phrases et du nombre de syllabes dans les mots utilisés.

Python spaCy

python3 -m spacy download en_core_web_sm
2025/03/24 15:06

802.11 notes Wifi

Voir aussi :

  • mdk3

Connexion à un réseau wifi

iwconfig wlan0 essid Livebox-ABCD key 0123456789ABCD
cat > /etc/apt/sources.list <<EOF
deb http://ftp.debian.org/debian jessie-backports main contrib non-free
EOF
 
apt-get update
 
apt-get install iw wireless-tools rfkill
 
#apt-get install firmware-ralink
apt-get install firmware-misc-nonfree
 
apt-get install firmware-atheros
 
rfkill list all
 
/etc/init.d/network-manager stop
 
ifconfig wlan0 up
iwlist wlan0 scan
 
iwconfig wlan0 essid FreeWifi
 
dhclient -r wlan0
dhclient wlan0
 
nmcli r wifi on
 
w3m https://wifi.free.fr

Diag

ifconfig
iw event -t -f

Option module

Source :

cat /sys/module/ath9k/parameters/nohwcrypt
sudo modprobe -r ath9k
sudo modprobe ath9k nohwcrypt=1
/etc/modprobe.d/ath9k.conf
options ath9k nohwcrypt=1

wicd pour remplacer le NetWork Manager

sudo apt-get update && sudo apt-get install wicd
sudo systemctl restart wicd
wicd-client

WPA

Diag

rfkill list
#rfkill unblock 1
rfkill unblock all
 
iwlist scan

Pb

Pb drivers - rtw_timed out to flush pci tx ring

Voir :

dmesg -T
[Fri Feb  9 16:16:23 2024] rtw_8821ce 0000:01:00.0: timed out to flush pci tx ring[1]
[Fri Feb  9 16:16:23 2024] rtw_8821ce 0000:01:00.0: timed out to flush pci tx ring[3]
[Fri Feb  9 16:16:23 2024] rtw_8821ce 0000:01:00.0: timed out to flush pci tx ring[5]
[Fri Feb  9 16:16:24 2024] rtw_8821ce 0000:01:00.0: timed out to flush pci tx ring[1]
[Fri Feb  9 16:16:24 2024] rtw_8821ce 0000:01:00.0: timed out to flush pci tx ring[3]
[Fri Feb  9 16:16:24 2024] rtw_8821ce 0000:01:00.0: timed out to flush pci tx ring[5]

...
[Fri Feb  9 16:26:39 2024] wlp1s0: authentication with a4:ce:da:1e:07:97 timed out
[Fri Feb  9 16:26:40 2024] wlp1s0: authenticate with a4:ce:da:1e:07:92
[Fri Feb  9 16:26:40 2024] wlp1s0: send auth to a4:ce:da:1e:07:92 (try 1/3)
[Fri Feb  9 16:26:41 2024] wlp1s0: send auth to a4:ce:da:1e:07:92 (try 2/3)
[Fri Feb  9 16:26:42 2024] wlp1s0: send auth to a4:ce:da:1e:07:92 (try 3/3)
[Fri Feb  9 16:26:43 2024] wlp1s0: authentication with a4:ce:da:1e:07:92 timed out

Solution provisoire

modprobe -r rtw88_8821ce
modprobe rtw88_8821ce

A tester pour diag

rfkill list all
Pb drivers
# dmesg
...
[   11.869171] iwlwifi 0000:00:14.3: firmware didn't ACK the reset - continue anyway
[   11.869317] iwlwifi 0000:00:14.3: Start IWL Error Log Dump:
[   11.869369] iwlwifi 0000:00:14.3: Transport status: 0x0000004A, valid: 6
[   11.869411] iwlwifi 0000:00:14.3: Loaded firmware version: 72.daa05125.0 so-a0-jf-b0-72.ucode
[   11.869452] iwlwifi 0000:00:14.3: 0x00000084 | NMI_INTERRUPT_UNKNOWN       
[   11.869488] iwlwifi 0000:00:14.3: 0x000082F0 | trm_hw_status0
[   11.869517] iwlwifi 0000:00:14.3: 0x00000000 | trm_hw_status1
[   11.869545] iwlwifi 0000:00:14.3: 0x004D2466 | branchlink2
[   11.869576] iwlwifi 0000:00:14.3: 0x004C9122 | interruptlink1
[   11.869603] iwlwifi 0000:00:14.3: 0x004C9122 | interruptlink2
[   11.869632] iwlwifi 0000:00:14.3: 0x0000FF88 | data1
...

Contournement provisoire

lsmod | grep 802
 
modprobe -r iwlmvm
modprobe -r libarc4
modprobe -r mac80211
 
modprobe mac80211
modprobe libarc4
modprobe iwlmvm
2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki