HtmlToText
aller au contenu | aller au menu | aller à la recherche mardi 1 août 2017 science ! par erwan le mardi 1 août 2017, 11:42 - humeur "there's no point using science and logic to convince someone who has already intentionally avoided both to come to their conclusions" badgersims mardi 18 octobre 2016 modem 3g huawei e3131 sur raspbian par erwan le mardi 18 octobre 2016, 11:44 - raspberry π après la clef 3g tp-link ma260 et la huawei e303 , je vous propose une autre huawei : e3131. après le branchement de la clef, on obtient un pseudo lecteur cd-rom contenant le driver windows ⓒ : lsusb bus 001 device 024: id 12d1:15ca huawei technologies co. on va la passer en mode modem : sudo usb_modeswitch -v 12d1 -p 15ca -m '55534243123456780000000000000011062000000100000000000000000000' lsusb [...] bus 001 device 024: id 12d1:1506 huawei technologies co., ltd. e398 lte/umts/gsm modem/networkcard ifconfig [...] wwan0 link encap:ethernet hwaddr 00:x:x:x:x 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 lg file transmission:1000 rx bytes:0 (0.0 b) tx bytes:0 (0.0 b) pour automatiser le changement de mode et le rendre persistant, on va utiliser comme à chaque fois usb_modeswitch : sudo nano /etc/usb_modeswitch.d/12d1\:15ca #huawei e3131 (variant) targetvendor= 0x12d1 targetproductlist="1506" messagecontent="55534243123456780000000000000011062000000100000000000000000000" avec la règle udev qui va bien : sudo nano /lib/udev/rules.d/40-usb_modeswitch.rules [...] label="modeswitch_rules_begin" [...] # huawei e3131 (variant) attrs{idvendor}=="12d1", attrs{idproduct}=="15ca", run+="usb_modeswitch '%b/%k'" [...] label="modeswitch_rules_end" pour prendre en compte de cette nouvelle règle sans redémarrage : sudo udevadm control --reload-rules vient ensuite la configuration du dialer. en ligne de commande j'utilise wvdial (disponible dans les dépôts) : sudo nano /etc/wvdial.conf [dialer defaults] modem = /dev/ttyusb0 modem type = analog modem baud = 460800 isdn = 0 stupid mode = 1 new pppd = yes dial command = atd phone = *99# username = { } password = { } init1 = atz init2 = atq0 v1 e1 s0=0 init3 = at+cfun=1,0 init4 = at+cgdcont=1,"ip","apn.de.votre.fournisseur" pour tester : sudo wvdial cym --> wvdial: internet dialer version 1.61 --> initializing modem. --> sending: atz atz ok --> sending: atq0 v1 e1 s0=0 atq0 v1 e1 s0=0 ok --> sending: at+cfun=1,0 at+cfun=1,0 ok --> sending: at+cgdcont=1,"ip","apn.de.votre.fournisseur" at+cgdcont=1,"ip","apn.de.votre.fournisseur" ok --> modem initialized. --> sending: atd*99# --> waiting for carrier. atd*99# connect --> carrier detected. starting ppp immediately. --> starting pppd at tue oct 18 11:28:09 2016 --> pid of pppd: 3959 --> using interface ppp0 --> pppd: ���vx[1b]�[01]�[1c]�[01][05] [...] --> local ip address 10.x.x.x --> remote ip address 10.x.x.x --> primary dns address 194.x.x.x --> secondary dns address 194.x.x.x [...] on termine par la configuration réseau persistante : sudo nano /etc/network/interfaces [...] # huawei e3131 (modem mode) allow-hotplug wwan0 iface wwan0 inet wvdial # generic ppp 3g modem auto ppp0 iface ppp0 inet wvdial [...] and voilà mardi 5 avril 2016 android studio - correction orthographique française par erwan le mardi 5 avril 2016, 10:38 - dev pour activer la correction orthographique française dans android studio : télécharger le dictionnaire : http://www.winedt.org/dictascii.html convertissez le fichier en utf-8 (avec un éditeur comme geany ou en ligne de commande avec iconv ou encore recode) puis dans android studio : file -> settings -> spelling -> dictionaries ajouter le dossier de votre dictionnaire. sources : http://stackoverflow.com/questions/16709263/spell-check-android-studio-intellij-idea http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets un commentaire lundi 15 février 2016 ubuntu et les casques audio bluetooth par erwan le lundi 15 février 2016, 15:43 - ubuntu certains casques audio sous ubuntu 14.04 ne fonctionne pas correctement : l'appareil est bien détecté, la connexion se fait mais impossible de sélectionner le périphérique en sortie sonore. pour corriger cela : gksudo pactl load-module module-bluetooth-discover sources : https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1283003 http://askubuntu.com/questions/475817/pulseaudio-unable-to-detect-bluetooth-headset mise à jour pour ubuntu 16.04 : si le son ne fonctionne pas : dans le menu "paramètres sonore", il faut passer en mode "casque hsp/hfp", déconnecter, reconnecter et remettre le mode "a2dp". source : http://askubuntu.com/questions/763539/bluetooth-speaker-no-sound-in-ubuntu-16-04 jeudi 4 février 2016 redémarrer une clef usb 3g huawei hilink hspda e303 en ligne de commande par erwan le jeudi 4 février 2016, 10:52 - gecko pour redémarrer une clef usb huawei hilink hspda e303 en ligne de commande : récupération de la token : wget --quiet -o - http://192.168.8.1/api/webserver/token | grep -opm1 "(?<=<token>)[^<]+" envoi de la commande de reboot : wget --quiet --post-data "<?xml version='1.0' encoding='utf-8'?><request><control>1</control></request>" --header="__requestverificationtoken:798334363" -o - http://192.168.8.1/api/device/control remplacez 798334363 par la token reçue vous devriez avoir une confirmation : <?xml version="1.0" encoding="utf-8"?> <response>ok</response> pour information, voici un message d'erreur (probablement une erreur de token) : <?xml version="1.0" encoding="utf-8"?> <error> <code>125001</code> <message></message> </error> on peut en faire une petite fonction : function reboot_huawei_hikink_303() { token=$(wget --quiet -o - http://192.168.8.1/api/webserver/token | grep -opm1 "(?<=<token>)[^<]+") wget --quiet --post-data "<?xml version='1.0' encoding='utf-8'?><request><control>1</control></request>" --header="__requestverificationtoken:$token" -o - http://192.168.8.1/api/device/control > /dev/null 2>&1 } informations complémentaires : http://xmodulo.com/how-to-use-custom-http-headers-with-wget.html http://stackoverflow.com/questions/17333755/extract-xml-value-in-bash-script/17333829#17333829 mardi 27 octobre 2015 debian squeeze + openvz : oom killed process par erwan le mardi 27 octobre 2015, 16:10 - gnu/linux sur certains serveurs, j'ai énormément de processus tués : cat /var/log/syslog |grep "oom killed" oct 27 13:31:37 cli2 kernel: [33918.292623] oom killed process apache2 (pid=25927, ve=162) exited, free=8895850 gen=165. oct 27 13:31:37 cli2 kernel: [33918.299598] oom killed process apache2 (pid=29878, ve=162) exited, free=8900690 gen=166. oct 27 13:31:37 cli2 kernel: [33918.303564] oom killed process apache2 (pid=1310, ve=162) exited, free=8905696 gen=167. oct 27 13:31:37 cli2 kernel: [33918.305936] oom killed process apache2 (pid=7352, ve=134) exited, free=8906995 gen=168. oct 27 13:31:47 cli2 kernel: [33928.420456] oom killed process apache2 (pid=12134, ve=134) exited, free=8912178 gen=169 pourtant, j'ai encore plein de mémoire disponible : free -m total used free shared buffers cached mem: 64406 31985 32421 0 2939 14485 une solution éventuelle est de modifier le comportement de la gestion du oom killer : echo 1 > /proc/sys/vm/oom_kill_allocating_task echo 2 > /proc/sys/vm/overcommit_memory pour un effet permanent, rajouter dans le fichier `/etc/sysctl.conf` : vm.oom_kill_allocating_task = 1 vm.overcommit_memory = 2 sysctl -p un peu d'explication sur ces paramètres potentiellement dangereux : man proc /proc/sys/vm/oom_kill_allocating_task (since linux 2.6.24) this enables or disables killing the oom-triggering task in out-of-memory situations. if this is set to zero, the oom-killer will scan through the entire tasklist a
Informations Whois
Whois est un protocole qui permet d'accéder aux informations d'enregistrement.Vous pouvez atteindre quand le site Web a été enregistré, quand il va expirer, quelles sont les coordonnées du site avec les informations suivantes. En un mot, il comprend ces informations;
SERVERS
SERVER whois.meregistry.net
ARGS erwan.me
PORT 43
RegrInfo
DOMAIN
NSERVER
A.DNS.GANDI.NET 173.246.98.1
B.DNS.GANDI.NET 213.167.229.1
C.DNS.GANDI.NET 217.70.179.1
Go to top