BMW F800R :: Lenkerarmatur

Nachdem ich meine BMW F800R (K73) in den Service nach München (Frankfurter Ring) zu BMW Motorrad gegeben habe ging mein Fernlicht nicht mehr.

Diesen Fehler allerdings bemerkte ich nicht sofort (man fährt ja nach Möglichkeit am Tag). Daher habe ich zwei Wochen später bei BMW angerufen um es mir reparieren zu lassen. Leider war es schon spät im Herbst und das Wetter nicht mehr motorrad-geeignet. Daher verschob ich das Ganze in das nächste Frühjahr, jetzt eben.

Da ich mir nicht vorstellen konnte, dass diese Reperatur bei BMW kostenlos möglich gewesen wäre, habe ich kurzum mich selbst auf die Suche gemacht. Beim Zerlegen gab es drei merkwürdige Dinge:

  • ein handbeschrifteter Zettel mit der Teilenummer klebte in der Armatur
  • ein am Lenker befestigtes Tesaband war total zusammengestaucht (Griff wurde schonmal demontiert)
  • der Siegel der Armatur war gebrochen (Armatur wurde schon mal geöffnet)

Nach Messungen stellte sich heraus, dass die Leiterbahn zwischen Schalter und Stecker unterbrochen war. Daher lötete ich mir ein Kabel in den Schalter um diesem Problem zu entgehen.

Nach diesen Merkwürdigen Vorfällen kann ich mir nicht vorstellen, dass es in so einem Service mit Rechten Dingen zugeht.

Hier noch das Ergebnis der Messungen, ein kleiner Steckerbelegungsplan der linken Armatur:

BMW F800R Lenkerarmatur Links-300x225 in BMW F800R :: Lenkerarmatur

Teilenummer der Armaturplatine: 885140 160409

weitere Nummern die gefunden wurden:

  • 037748
  • 0112
VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

Gimp :: Ein bisschen Spaß mit dem Vorderrad

Ich finde es ja ziemlich erschreckend, dass Mercedes jetzt ihren Bereich “Vorderradantrieb” weiter ausbaut. Das schlimmste Beispiel hierfür ist der CLA.
Ich habe zum Spaß einfach mal mit Gimp das Vorderrad “rutschen” lassen … macht euch selbst ein Bild (wie auch immer man dies deuten mag) Icon Wink in Gimp :: Ein bisschen Spaß mit dem Vorderrad

So wird er heute gebaut:
 in Gimp :: Ein bisschen Spaß mit dem Vorderrad

so denke ich wird er in Zukunft gebaut werden (zum Beispiel die AMG Variante, es muss Gewicht auf die Vorderachse sonst macht der ganze Motor ja keinen Sinn):
 in Gimp :: Ein bisschen Spaß mit dem Vorderrad

und so würde ich ihn bauen:
 in Gimp :: Ein bisschen Spaß mit dem Vorderrad

Und nein das letzte ist kein BMW, wie ich schon mehrfach gefragt wurde …

Quelle des ersten Bildes: http://www.heise.de/autos/artikel/Jugendliebe-1825213.html

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Raspberry Pi als Fileserver

Ich habe mir einen Raspberry Pi besorgt um diesen als Fileserver einzusetzten. Hierfür habe ich eine externe USB 2.0 HDD angeschlossen, auf der die Files abgelegt werden.

1) Raspberry Pi einrichten:

sudo raspi-config
sudo apt-get install samba samba-common samba-common-bin
sudo apt-get install vim

2) neuen Benutzer anlegen:

sudo useradd -G users NAME

das Samba Passwort muss extra gesetzt werden:

smbpasswd - U NAME

3) Externe HDD einbinden

Da meine HDD mit NTFS formatiert ist musste ich noch folgendes Programm installieren:

sudo apt-get install cifs-utils

Jetzt ist es nötig ein Verzeichnis anzulegen, in welches die Festplatte eingebunden werden soll. Danach muss das Verzeichnis noch der Gruppe “users” zugeordnet werden, damit diese Zugriff erhalten.

sudo mkdir /daten/server
sudo chgrp users -R /daten

danach die Festplatte in die “fstab” Datei eintragen, damit sie automatisch gemountet wird

sudo vim /etc/fstab

ich habe folgendes eingetragen:

UUID=3C58E62B58E5E39C   /daten/server   ntfs    users,rw        0       0

die UUID kann so herausgefunden werden (gibt auch gleich Auskunft über das Device, bei mir “/dev/sda1″:

bklid

die Konfiguration kann getestet werden:

sudo mount -a

4) Samba Konfiguration anpassen:

sudo vim /etc/samba/smb.conf

dort dann nach “[printers]” suchen, darüber für jede Freigabe folgendes einfügen:

[daten]
   comment = Daten
   browseable = yes
   path = /daten/server
   valid users = @users
   force group = users
   create mask = 664
   directory mask = 0775
   read only = no

danach Samba Service neustarten:

sudo service samba restart

5) Optional :: Debian – Package aus CVS Sourcen erzeugen

(Dieser Punkt kann überspruchen werden, also direkt weitermachen bei 6.)

Ist das alles geschaft hat man schon weitere Ansprüche an das System. Man verwendet ja nicht ohne Grund einen Raspberry Pi als Fileserver – man will Strom sparen. Das ist ja alles schön und gut, aber die externe 3.5″ HDD läuft einfach munter weiter, auch wenn kein User diese momentan verwendet. Abhilfe schaft hier das Programm “hd-idle” welches zuerst kompiliert werden muss oder von hier (ganz unten) runterladen. Ich habe die bei mir auf dem Raspberry (Debian wheezy, Version 2013-02-09) kompilierte Datei angehängt.

Das Programm herunterladen mit einem CVS Client (der erste CVS Befehl muss einfach bei der Passwortabfrage mit ENTER bestätigt werden -> kein Passwort)

sudo apt-get install cvs
cvs -d:pserver:anonymous@hd-idle.cvs.sourceforge.net:/cvsroot/hd-idle login
cvs -z3 -d:pserver:anonymous@hd-idle.cvs.sourceforge.net:/cvsroot/hd-idle co -P hd-idle

um jetzt ein eigenes Debian Pakacke zu erzeugen benötigt man folgendes Programm

sudo apt-get install debhelper

danach das Paket erzeugen (zuerst in das neu angelegte Verzeichnis “hd-idle” wechseln:

cd hd-idle
sudo dpkg-buildpackage -rfakeroot

Die fertig kompilierte Datei befindet sich ein Verzeichnis höher.

6) hd-idle installieren

Archiv des schon erzeugten Debian Packages: hd-idle_1.04.tar
falls Punkt 5) übersprungen wurde, dann einfach die verlinkte Datei auf den Raspi laden.
hd-idle installieren, anschließend den Service starten und den Autostart des Programms vorbereiten:

sudo dpkg -i hd-idle_*.deb
sudo service hd-idle start
sudo update-rc.d hd-idle defaults

getestet werden kann hd-idle folgendermaßen (Dieser Befehl setzt für die Festplatte “sda” eine automatische Abschaltung nach 10s, mehrere Festplatten können mit einem weiteren “-a …” hinten angefügt werden):

hd-idle -i 0 -a sda -i 10

Jetzt will man diese Prozedur natürlich nicht nach jedem reboot neu starten, daher automatisieren wir dies:
Also editieren wir die Konfigurationsdatei:

sudo vim /etc/default/hd-idle

und ändern ganz oben die Zeile in folgende:

START_HD_IDLE=true

und fügen ganz am Ende der Datei einen zu oben ähnlichen Befehl ein (auch hier ist die vom Mounten bekannte UUID notwendig, damit die Festplatte immer richtig angesprochen wird, auch wenn sich einmal der USB Port ändern sollte):

HD_IDLE_OPTS="-i 0 -a /dev/disk/by-uuid/3C58E62B58E5E39C -i 900"

7) Sicherheit erhöhen

Standardmäßig hat der Benutzer “pi” das Passwort “raspberry”. Dieses muss geändert werden, zudem ist es nicht sinnvoll keine Passwortabfrage bei der Eingabe von “sudo” zu bekommen.
Um dies zu ändern folgenden Befehl ausführen:

sudo visudo

hier habe ich folgende Zeilen geändert:

root    ALL=(ALL:ALL) ALL
lukas   ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

und die wichtigste:

#pi ALL=(ALL) NOPASSWD: ALL

Anhang

hd-idle_1.04.tar

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Windows 7 :: Loginvorgang bei neuinstalliertem System dauert ewig

Wer kennt es nicht, Windows 7 ganz neu installiert – ein paar Grundkonfigurationen wie Sounds aus und Hintergrund schwarz schalten. Beim nächsten Hochfahren wundert man sich, dass auf einmal der Loginvorgang eine gefühlte Minute dauert (nachgemessen 30 Sek.).

Behoben kann der Fehler mithilfe eines Hotfixes von Microsoft. Dieser wird benötigt, da ein Fehler auftritt wenn man kein Hintergrundbild gewählt hat.

Hier der Link zum Download:

Hotfix KB 977346

irgendwie ein lustiger Fehler oder? =)

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

SSD Vergleichtest :: ADATA gegen INTEL

Ich habe mir die beiden SSDs ADATA S511 und INTEL 330 gekauft. Danach habe ich beide an meinen PC angeschlossen, der folgende Konfiguration hat:

  • Intel Core i5-2500K (nicht übertaktet)
  • Asus Mainboard mit SATA-6G
  • 4 GB RAM

Gemacht wurde der Benchmark mit AS SSD Benchmark (kann hier kostenlos downgeloaded werden)

ADATA S511:
As-ssd-bench-ADATA-300x298 in SSD Vergleichtest :: ADATA gegen INTEL

Intel 330
As-ssd-bench-INTEL-300x298 in SSD Vergleichtest :: ADATA gegen INTEL

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Automatic execute on startup:: Debian Linux (Raspberry Pi)

I’ve got a Raspberry Pi with connected camera. When the Pi boots up there should be executed a script which starts the camera software.

You must create an new file in /etc/init.d/ and then add the following content:

# /etc/init.d/startcam

# Carry out specific functions when asked to by the system
case "$1" in
  start)
    /home/pi/start.sh
    ;;
  stop)
    pkill webcam
    echo "stopped"
    ;;
  *)
    echo "Usage: /etc/init.d/startcam {start|stop}"
    exit 1
    ;;
esac

exit 0

then make the file executeable

sudo chmod +x /etc/init.d/startcam

to test your script, you must be shure that it isn’t active

ps -ef | grep webcam

then start the script using

sudo /etc/init.d/startcam start

or just reboot your computer and check once again if your script is active.

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

Finding the IP of my Raspberry Pi

With ssh configured the Raspi can be attached using putty after booting.
But how do I know about the IP the raspi got from DHCP? There are several possibilities to look:
1) If there is a screen attached at console the IP can be read there.
But I operate the raspi in different networks just with LAN and power connected only.
2.) In home networks the  web interface of the router (NetGear, FritzBox or whatever) can tell you the IP.
3) For Android users there is a very nice App called ‘fing’. This app reports all devices on the local network, and the nice thing is, that it tells also which hardware is connected and tells ‘Raspberry Pi Foundation’ in case of the raspi. I do not know what apps to use with other mobile equipment, but look in the apps store to find the solution.
4) It can also be usefull to operate with the hostname. From a windows PC there is an easy way to be able to call the raspi by name. Samba has to be configured. To use this service it is only neccessary to install and operate samba:

sudo apt-get install samba samba-common-bin
sudo /etc/init.d/samba start

Now with putty you need not to put in the ip it is also possible to enter the hostname.

The hostname can be changed by editing

sudo vim /etc/hosts
sudo vim /etc/hostname

and chage ‘raspberrypi’ to ‘YourDesiredHostName’. A short name can be very usefull.
If you want to know the IP address from the hostname open a cmd-Window (Dos-shell) and type
ping raspberrypi
Ping will tell you  the IP address it is pinging to.
5) If you are logged in you can display the IP address with:

hostname -i

or

ifconfig
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

First Start with Raspberry Pi

After unpacking starting is very easy. There is a lot information available online. Here a few tipps where to look and what to do.
A good choice is the raspberrypi homepage:

http://www.raspberrypi.org/

What you first need is software to run the device. What you need is the Win32Diskmanager and an image to load. I started with the Raspian “wheezy”. Download both and run the Win32Diskmanager to bring the software to the SD card. For details refer to the quick start guide for beginners linked from the download page of raspberry pi:

http://elinux.org/RPi_Easy_SD_Card_Setup

After that the raspi is ready for the first run. Connect a keyboard to a USB port a monitor to HDMI-port and power the device with a USB cable, After starting the config menu appears automatically.
To use the entire space of the SDcard select ‘expand_rootfs’. A good idea is to change the password. ‘change_locale’ and ‘change_timezone’ should also be configured.
I prefer running the raspi through a console, so I need ssh to be enabled and I don’t need the desktop to be automatically loaded on boot. Finally update the raspi before leaving the menu.
Now the raspi should be rebooted. This will take a while because the root partition will be reconfigured.
The raspi configuration can be repeated any time with:
sudo raspi-config

The raspi is ready for the first use.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

OpenCV :: Kinect VideoCapture data in IplImage

To use functions in OpenCV like cvSmooth or cvAdaptiveThreshold you must have the data of your VideoCapture in an IplImage object.

VideoCapture capture;
Mat grayImage;
IplImage *imgSrc, *imgResult;

imgSrc = cvCreateImage(cvSize(640, 480), IPL_DEPTH_8U, 1);
imgResult = cvCreateImage(cvSize(640, 480), IPL_DEPTH_8U, 1);

capture.open(CV_CAP_OPENNI);
if (!capture.isOpened()) {
	cout << "Can not open a capture object." << endl;
	return -1;
}
capture.set(CV_CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE, CV_CAP_OPENNI_VGA_30HZ);

for(;;) {
	if (!capture.grab()) {
		cout << "Can not grab images." << endl;
		return -1;
	}
	else {
		if (capture.retrieve(grayImage, CV_CAP_OPENNI_GRAY_IMAGE)) {
			imgSrc->imageData = (char *) grayImage.data;
			cvShowImage("Source", imgSrc);

			cvSmooth(imgSrc, imgResult, CV_BLUR, 100, 100);
			cvShowImage("Result", imgResult);
		}
	}
	if (waitKey(30) >= 0)
		break;
}
VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

OpenCV :: Convert Mat into IplImage

I’ve search long time for having result on this problem. I want to use the object of IplImage, which data should be filled from Mat. If you using the simple solution found on stackoverflow, then you can’t access the methods of the IplImage object.

Mat matImage;
IplImage iplImage;

iplImage = cvCreateImage(cvSize(640,480), IPL_DEPTH_8U, 1);
iplImage->imageData = (char *) matImage.data;
VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)