[Berlin-wireless] Gibt es einen Standard-Router für Freifunk Berlin ?

Matthias Klose matthias at klose.berlin
So Jan 27 10:14:27 CET 2019


Hallo Hartmut,

stark, danke, das teste ich.

Gruß Matthias 



> Am 26.01.2019 um 12:59 schrieb Hartmut Krafft <sys3175 at gmx.net>:
> 
> On Sat, 26 Jan 2019 08:51:28 +0100
> Matthias Klose <matthias at klose.berlin> wrote:
> 
>> Hi Harald,
>> 
>>> Aktuell scheint der GL-MT300N v2 günstig
>>> (23€) erhältlich zu sein. Er steht zwar als "geeignet" in der
>>> Firmware-Liste, wird im Moment aber anscheinend nur im
>>> Entwicklerzweig[3] unterstützt. IMHO ist er damit noch nicht für
>>> Einsteiger zu empfehlen. Schauen wir in ein paar Monaten nochmal
>>> nach, wie es dann aussieht.  
>> 
>> einen solchen GL-MT300N v2 hab ich im Restaurant an der Ecke [0]
>> installiert, allerdings mit 24h-Reboot-Script per crontab. Damit ist
>> er brauchbar, da eben nach wie vor die Wifi-Treiber für den MediaTek
>> MT7628AN aussteigen. 
>> 
> 
> Hallo,
> scheduled reboot ist vielleicht besser als nichts, aber nicht viel
> besser ;-)
> Das Problem ist ja, daß der Treiber unvorhersehbar abranzt.
> Ein (etwas) besserer Workaround ist es IMHO also, das Device neu zu
> starten, wenn der Treiber hängt.
> 
> Dazu habe ich ein script, das das log überwacht und
> aus /etc/rc.local gestartet wird.
> 
> Das script nach /etc/logtrigger.sh kopieren; chmod ug+x ausführen; in
> rc.local aufrufen:
> --------
> root at wifi3:~# cat /etc/rc.local 
> # Put your custom commands here that should be executed once
> # the system init finished. By default this file does nothing.
> /etc/logtrigger.sh &
> exit 0
> --------
> evtl. chmod ug+x /etc/rc.local
> dann /etc/rc.local starten
> das sollte im log erscheinen:
> -----
> Jan 26 10:48:31 wifi3 root: Starting logtrigger.sh. PID: 7554
> -----
> 
> Um zu checken, wann und wie oft das getriggert wird, würde ich auch
> noch remote logging enablen, damit die logs den reboot überleben.
> 
> Zum Testen, ob es geht:
> 
> -nach dem Gerätestart (oder nach Start von /etc/rc.local):
> root at wifi3:~# logread |grep logtrigger
> Sat Jan 26 11:32:34 2019 user.notice root: Starting logtrigger.sh. PID:
> 716
> 
> -im Betrieb
> a) test message
> root at wifi3:~# logger Test1234
> -> log
> Jan 26 11:39:16 wifi3 root: Test1234
> Jan 26 11:39:16 wifi3 root: logtrigger.sh: Test message detected.
> logtrigger.sh PID: 1315.  Logread PID 1320.
> 
> b) termination notice
> root at wifi3:~# logger logtrigger terminate
> -> log
> Jan 26 11:40:31 wifi3 root: logtrigger terminate
> Jan 26 11:40:31 wifi3 root: logtrigger.sh: Exiting.
> 
> (wieder starten durch Aufruf von /etc/rc.local)
> 
> c) reboot auslösen
> root at wifi3:~# logger ieee80211 phy0: rt2x00 some Error
> root at wifi3:~# Connection to wifi3 closed by remote host.
> Connection to wifi3 closed.
> -> remote log
> Jan 26 11:32:38 wifi3 root: ieee80211 phy0: rt2x00 some Error
> Jan 26 11:32:38 wifi3 root: logtrigger.sh: rt2x00 bug detected,
> restarting device.
> Jan 26 11:32:38 wifi3 root: logtrigger.sh: message seen:  rt2x00 some
> Error
> 
> (Das script checkt nicht, ob es schon läuft, da müßt Ihr selbst drauf achten
> - und bug-frei ist es sicher auch nicht, ich kann eigentlich nur REXX ;-))
> 
> Viel Spaß!
> Hartmut
> 
> ---------ab hier das script -- Zeilenumbrüche müßt Ihr leider
> ---------eventuell selber fixen!
> #!/bin/sh
> # script to perform action when a certain log message appears
> # used to cope with bugs in the rt2x000 driver on MT7620 chipsets
> # we need logread and logger to be available for this (no check here, though).
> 
> me=`basename "$0"`
> 
> lrpidfile='/tmp/logread.pid'
> logger "Starting $me. PID: $$"
> 
> # read from log (requires logread to be installed)
> (logread -f & echo $! >&3 ) 3>$lrpidfile |
> while read line;do
>    case "$line" in
> 	# message text to trigger action
> 	# you can be specific
>        #*"ieee80211 phy0: rt2x00queue_write_tx_frame: Error - Dropping frame due to full tx queue 2"* )
> 	# or you can be generic
>        *"ieee80211 phy0: rt2x00"*"Error"* )
> 	# action(s) to perform
> 	
> 	# on devices based on the latest 2019 Openwrt Snapshot, you can try to comment out the reboot action
> 	# and uncomment the lines with double comments to have the device restart the wifi instead
> 	# of rebooting (this may work or not, YMMV, watch the logs).
> 	# on older patch levels, the bug cannot be remediated by restarting the wifi only, you have to reboot.
> 
> 		## wifi down;
> 		# message to log (enable remote logging to see this even after a reboot)
> 		## logger "$me: rt2x00 bug detected, restarting wifi.";
> 		logger "$me: rt2x00 bug detected, restarting device.";
> 		logger "$me: message seen:${line##*:}";
> 			# have to cut part of message to stop triggering myself
> 		## wifi up;
> 		reboot;
> 		;;
> 	# test message (# logger Test1234 -- should show up in log)
> 	*"Test1234"* )
>            logger "$me: Test message detected. $me PID: $$.  Logread PID $(cat $lrpidfile)."
> 	    ;;
> 	# termination message (#logger logtrigger terminate -- should terminate this script)
> 	*"logtrigger terminate"* )
> 	# we have to take care to remove the logread process before terminating
>            logger "$me: Exiting.";kill $(cat $lrpidfile);rm -f $lrpidfile;exit
> 	    ;;
>    esac
> done 
> 
> _______________________________________________
> Berlin mailing list
> Berlin at berlin.freifunk.net
> http://lists.berlin.freifunk.net/cgi-bin/mailman/listinfo/berlin
> Diese Mailingliste besitzt ein ffentlich einsehbares Archiv



Mehr Informationen über die Mailingliste Berlin