Extra Software für den Router: Unterschied zwischen den Versionen
Zeile 1: | Zeile 1: | ||
+ | {{TOCRight}} | ||
==Zusätzliche Software== | ==Zusätzliche Software== | ||
− | == | + | ==für alle Geräte== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
====Accounting Statistik==== | ====Accounting Statistik==== | ||
Nette Erweiterungen für die öffentliche Oberfläche. | Nette Erweiterungen für die öffentliche Oberfläche. | ||
Zeile 20: | Zeile 13: | ||
* Mehr dazu unter [[DirectConnect]] | * Mehr dazu unter [[DirectConnect]] | ||
− | |||
− | |||
− | |||
====mails versenden vom linksys - ssmtp==== | ====mails versenden vom linksys - ssmtp==== | ||
Zeile 42: | Zeile 32: | ||
* allgemeine [http://freifunk.net/wiki/OpenVPNHowto Informationen zur FreifunkFirmware (FFF) und openvpn] | * allgemeine [http://freifunk.net/wiki/OpenVPNHowto Informationen zur FreifunkFirmware (FFF) und openvpn] | ||
* konkrete [[openVPN_openWRT|Installationsanleitung zu openVPN unter FFF]] | * konkrete [[openVPN_openWRT|Installationsanleitung zu openVPN unter FFF]] | ||
+ | |||
+ | ====WRT-Wiki==== | ||
+ | So gesehen ist euer Router ein "kleiner" Server, auf dem Du z.B. ein "Mini-Wiki" laufen lassen kannst. | ||
+ | * einfach unter Verwalten --> Publizieren die Datei hochladen | ||
+ | * danach kann man Text verändern, andere Bilder hochladen und sich z.b. eine Nachrichtenbox anlegen wo andere euch was reinschreiben können. | ||
+ | * Datei --> [[Bild:Startseite-mit-wiki.tar|hier]] | ||
+ | |||
+ | * Hilfreich zum editieren für Windows-User ist das Progrämmchen [http://sourceforge.net/project/showfiles.php?group_id=85589&release_id=349442 winscp]. | ||
+ | * hierdurch wird die Verzeichnisstruktur eures Linuxsystems vom Router übersetzt in eine Art Windowsexplorer. | ||
+ | |||
+ | ====MDNS - MulticastDNS==== | ||
+ | * mehr dazu unter [[MDNS mit Freifunk]] oder in der [http://de.wikipedia.org/wiki/Zeroconf#Multicast_DNS Wikipedia] | ||
+ | |||
+ | ==für Geräte mit USB-Anschluss== | ||
+ | |||
+ | * bei den Geräten Asus wl hdd 2,5 / Yakumo wireless storage 60 ist ein usb1.1 vorhanden, | ||
+ | * bei Siemens se505 nachrüstbar [ Howto] | ||
+ | === USB === | ||
+ | Grundpakete installieren (Driver) | ||
+ | <pre> | ||
+ | ipkg install kmod-usb-uhci | ||
+ | ipkg install kmod-usb-ohci | ||
+ | ipkg install kmod-usb2 | ||
+ | ipkg install kmod-usb-storage | ||
+ | ipkg install kmod-vfat | ||
+ | </pre> | ||
+ | |||
+ | willst du Scanner und Drucker über das Netzwerk nutzen | ||
+ | <pre> | ||
+ | ipkg install kmod-usb-scanner | ||
+ | ipkg install kmod-usb-printer | ||
+ | </pre> | ||
+ | |||
+ | danach Neustart.<br> | ||
+ | Die Module werden beim Neustart selbstständig geladen(wenn es kmod-module sind!), und stehen in der Datei '''/etc/modules.d'''. | ||
+ | mit dem Befehl: | ||
+ | <pre> | ||
+ | lsmod | ||
+ | </pre> | ||
+ | kannst du überprüfen welche module geladen sind. Jetzt noch überprüfen ob das Usb-Gerät erkannt wurde indem wir | ||
+ | <pre> | ||
+ | dmesg | ||
+ | </pre> | ||
+ | eigeben. Da sollte dann sowas stehen wie: | ||
+ | <pre> | ||
+ | root@dave_yakumo:~# dmesg | ||
+ | Creating 5 MTD partitions on "Physically mapped flash": | ||
+ | 0x00000000-0x00040000 : "cfe" | ||
+ | 0x00040000-0x003f0000 : "linux" | ||
+ | 0x000b5fec-0x00180000 : "rootfs" | ||
+ | mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only | ||
+ | 0x003f0000-0x00400000 : "nvram" | ||
+ | 0x00180000-0x003f0000 : "OpenWrt" | ||
+ | diag boardtype: 0000041a | ||
+ | Probing device eth0: No Robo switch in managed mode found | ||
+ | Probing device eth1: No Robo switch in managed mode found | ||
+ | Probing device eth2: No such device | ||
+ | Probing device eth3: No such device | ||
+ | BFL_ENETADM not set in boardflags. Use force=1 to ignore. | ||
+ | eth2: Broadcom BCM4320 802.11 Wireless Controller 3.90.37.0 | ||
+ | usb.c: registered new driver usbdevfs | ||
+ | usb.c: registered new driver hub | ||
+ | usb-ohci.c: USB OHCI at membase 0xb8004000, IRQ 2 | ||
+ | usb-ohci.c: usb-00:04.0, PCI device 14e4:4715 | ||
+ | usb.c: new USB bus registered, assigned bus number 1 | ||
+ | hub.c: USB hub found | ||
+ | hub.c: 2 ports detected | ||
+ | SCSI subsystem driver Revision: 1.00 | ||
+ | hub.c: new USB device 00:04.0-1, assigned address 2 | ||
+ | usb.c: USB device 2 (vend/prod 0x126f/0x1325) is not claimed by any active driver. | ||
+ | Initializing USB Mass Storage driver... | ||
+ | usb.c: registered new driver usb-storage | ||
+ | scsi0 : SCSI emulation for USB Mass Storage devices | ||
+ | Vendor: USB 2.0 Model: Mobile Disk Rev: | ||
+ | Type: Direct-Access ANSI SCSI revision: 02 | ||
+ | Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 | ||
+ | SCSI device sda: 253952 512-byte hdwr sectors (130 MB) | ||
+ | sda: Write Protect is off | ||
+ | WARNING: USB Mass Storage data integrity not assured | ||
+ | USB Mass Storage device found at 2 | ||
+ | USB Mass Storage support registered. | ||
+ | </pre> | ||
+ | |||
+ | interessant ist für uns eigentlich nur "Gerät erkannt" | ||
+ | |||
+ | <pre> | ||
+ | Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 | ||
+ | SCSI device sda: 253952 512-byte hdwr sectors (130 MB) | ||
+ | sda: Write Protect is off | ||
+ | WARNING: USB Mass Storage data integrity not assured | ||
+ | USB Mass Storage device found at 2 | ||
+ | USB Mass Storage support registered. | ||
+ | </pre> | ||
+ | |||
+ | na dann nur Mountpunkt anlegen und dann noch mounten (einhängen) | ||
+ | |||
+ | <pre> | ||
+ | mkdir -p /mnt | ||
+ | mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt | ||
+ | </pre> | ||
+ | |||
+ | Eleganter ist es ein script zu erstellen um nicht jedesmal den mount-Befehl nach einem Neustart eingeben zu müssen. Dazu legt man in dem Startverzeichnis('''/etc/init.d''') eine Datei z.B. S95mount an | ||
+ | |||
+ | <pre> | ||
+ | cd /etc/init.d/ | ||
+ | vi S95mount | ||
+ | |||
+ | #!/bin/sh | ||
+ | # | ||
+ | # mount script | ||
+ | # | ||
+ | |||
+ | # Which device needs to be mounted? | ||
+ | MOUNT_DEVICE0=/dev/scsi/host0/bus0/target0/lun0/part1 | ||
+ | |||
+ | i=0 | ||
+ | # Wait 15 secs, mount when ready, and continue if it dosnt get ready within 15 secs. | ||
+ | while [ $i -le 15 ] | ||
+ | do | ||
+ | |||
+ | if [ -e $MOUNT_DEVICE0 ] | ||
+ | then | ||
+ | mount $MOUNT_DEVICE0 /mnt/ | ||
+ | echo "Success: $MOUNT_DEVICE0" | ||
+ | exit 0 | ||
+ | fi | ||
+ | |||
+ | sleep 1 | ||
+ | i=`expr $i + 1` | ||
+ | done | ||
+ | </pre> | ||
+ | berechtigungen noch setzen mit | ||
+ | <pre> | ||
+ | chmod 0777 S95mount | ||
+ | </pre> | ||
+ | |||
+ | === IDE-Festplatte === | ||
+ | |||
+ | ==== FTP-Server ==== | ||
+ | <pre> | ||
+ | ipkg install vsftpd | ||
+ | </pre> | ||
+ | |||
+ | ==== Samba-Server ==== | ||
+ | |||
+ | |||
+ | === Webcam === | ||
+ | es gibt grundsätzlich zwei größere Projekte für Webcam-Driver | ||
+ | |||
+ | ==== spca5xx/spca5xx_LE ==== | ||
+ | * Installation: | ||
+ | :Die Dateien spca5xx.o.gz oder spca5xx_lite.o.gz mit wget auf den Router laden. | ||
+ | |||
+ | <pre> | ||
+ | # spca5xx-Modul | ||
+ | cd /tmp | ||
+ | wget http://ping02.stura.uni-weimar.de/dave/spca5xx.o.gz | ||
+ | mv spca5xx.o.gz /lib/modules/2.4.30 | ||
+ | cd /lib/modules/2.4.30/ | ||
+ | gunzip spca5xx.o.gz | ||
+ | |||
+ | # spca5xx/LE-Modul | ||
+ | cd /tmp | ||
+ | wget http://ping02.stura.uni-weimar.de/dave/spca5xx_lite.o.gz | ||
+ | mv spca5xx_lite.o.gz /lib/modules/2.4.30 | ||
+ | cd /lib/modules/2.4.30/ | ||
+ | gunzip spca5xx_lite.o.gz | ||
+ | </pre> | ||
+ | |||
+ | nun noch video-modul und .jpg unterstützung laden | ||
+ | |||
+ | <pre> | ||
+ | ipkg install libpthread | ||
+ | ipkg install kmod-videodev | ||
+ | </pre> | ||
+ | |||
+ | danach Neustart.<br> | ||
+ | Die Module leider nicht beim Neustart selbstständig geladen. | ||
+ | Webcammodule laden mit | ||
+ | |||
+ | <pre> | ||
+ | insmod videodev | ||
+ | insmod spca5xx oder insmod spca5xx_lite | ||
+ | </pre> | ||
+ | |||
+ | mit dem Befehl: | ||
+ | |||
+ | <pre> | ||
+ | lsmod | ||
+ | </pre> | ||
+ | |||
+ | kannst du überprüfen welche module geladen sind. Jetzt noch überprüfen ob die Webcam erkannt wurde indem wir | ||
+ | |||
+ | <pre> | ||
+ | dmesg | ||
+ | </pre> | ||
+ | |||
+ | eigeben. Da sollte dann sowas stehen wie: | ||
+ | |||
+ | <pre> | ||
+ | root@dave_yakumo:~# dmesg | ||
+ | Creating 5 MTD partitions on "Physically mapped flash": | ||
+ | 0x00000000-0x00040000 : "cfe" | ||
+ | 0x00040000-0x003f0000 : "linux" | ||
+ | 0x000b5fec-0x00180000 : "rootfs" | ||
+ | mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only | ||
+ | 0x003f0000-0x00400000 : "nvram" | ||
+ | 0x00180000-0x003f0000 : "OpenWrt" | ||
+ | diag boardtype: 0000041a | ||
+ | Probing device eth0: No Robo switch in managed mode found | ||
+ | Probing device eth1: No Robo switch in managed mode found | ||
+ | Probing device eth2: No such device | ||
+ | Probing device eth3: No such device | ||
+ | BFL_ENETADM not set in boardflags. Use force=1 to ignore. | ||
+ | eth2: Broadcom BCM4320 802.11 Wireless Controller 3.90.37.0 | ||
+ | usb.c: registered new driver usbdevfs | ||
+ | usb.c: registered new driver hub | ||
+ | usb-ohci.c: USB OHCI at membase 0xb8004000, IRQ 2 | ||
+ | usb-ohci.c: usb-00:04.0, PCI device 14e4:4715 | ||
+ | usb.c: new USB bus registered, assigned bus number 1 | ||
+ | hub.c: USB hub found | ||
+ | hub.c: 2 ports detected | ||
+ | SCSI subsystem driver Revision: 1.00 | ||
+ | Initializing USB Mass Storage driver... | ||
+ | usb.c: registered new driver usb-storage | ||
+ | USB Mass Storage support registered. | ||
+ | uhci.c: USB Universal Host Controller Interface driver v1.1 | ||
+ | Linux video capture interface: v1.00 | ||
+ | usb.c: registered new driver spca5xx | ||
+ | drivers/usb/spca5xx.c: spca5xx driver 00.57.07 registered | ||
+ | hub.c: new USB device 00:04.0-1, assigned address 2 | ||
+ | drivers/usb/spca5xx.c: USB SPCA5XX camera found. Qtec Webcam 100 Pac207-BCA | ||
+ | drivers/usb/spca5xx.c: [spca5xx_probe:8380] Camera type GBRG | ||
+ | drivers/usb/pac207.h: [pac207_config:148] Find Sensor PAC207 | ||
+ | drivers/usb/spca5xx.c: [spca5xx_getcapability:2207] maxw 352 maxh 288 minw 160 minh 120 | ||
+ | </pre> | ||
+ | |||
+ | [[Bild:Aldicam.png|thumb|Aldi Webcam DC-3110]] | ||
+ | interessant ist für uns eigentlich nur "Gerät erkannt" | ||
+ | |||
+ | <pre> | ||
+ | usb.c: registered new driver spca5xx | ||
+ | drivers/usb/spca5xx.c: spca5xx driver 00.57.07 registered | ||
+ | hub.c: new USB device 00:04.0-1, assigned address 2 | ||
+ | drivers/usb/spca5xx.c: USB SPCA5XX camera found. Qtec Webcam 100 Pac207-BCA | ||
+ | drivers/usb/spca5xx.c: [spca5xx_probe:8380] Camera type GBRG | ||
+ | drivers/usb/pac207.h: [pac207_config:148] Find Sensor PAC207 | ||
+ | drivers/usb/spca5xx.c: [spca5xx_getcapability:2207] maxw 352 maxh 288 minw 160 minh 120 | ||
+ | </pre> | ||
+ | |||
+ | also Driver gefunden, Webcam erkannt. Und das mit der Aldi-Cam super! | ||
+ | |||
+ | {| {{Prettytable}} | ||
+ | !Programm '''spcacat''' | ||
+ | !Programm '''motion''' | ||
+ | |- | ||
+ | | | ||
+ | Installation: | ||
+ | <pre> | ||
+ | cd /tmp | ||
+ | wget http://ping02.stura.uni-weimar.de/dave/spcacat.gz | ||
+ | mv spcacat.gz /usr/bin | ||
+ | cd /usr/bin | ||
+ | gunzip spcacat.gz | ||
+ | chmod +x spcacat | ||
+ | </pre> | ||
+ | | | ||
+ | Installation: | ||
+ | <pre> | ||
+ | ipkg install http://ping02.stura.uni-weimar.de/dave/libjpeg_6b-1_mipsel.ipk | ||
+ | ipkg install http://ping02.stura.uni-weimar.de/dave/motion_3.2.6-1_mipsel.ipk | ||
+ | </pre> | ||
+ | |- | ||
+ | | | ||
+ | Nun noch eine Datei anlegen für die webcam. | ||
+ | <pre> | ||
+ | vi /www/webcam.html anlegen | ||
+ | |||
+ | |||
+ | <html><head> | ||
+ | <script language="JavaScript"> | ||
+ | <!-- | ||
+ | function refreshIt() { | ||
+ | if (!document.images) return; | ||
+ | document.images['SpcaPic'].src = 'SpcaPict.jpg?' + Math.random(); | ||
+ | setTimeout('refreshIt()',10000); // refresh every timeout/1000 secs | ||
+ | } | ||
+ | //--> | ||
+ | </script> | ||
+ | </head> | ||
+ | <body onLoad=" setTimeout('refreshIt()',5000)"> | ||
+ | <br><br><br> | ||
+ | <center> | ||
+ | <img src="SpcaPict.jpg" name="SpcaPic"> | ||
+ | <br> | ||
+ | Bild wird aller 10 sek. neu geladen | ||
+ | </center> | ||
+ | </body></html> | ||
+ | </pre> | ||
+ | |||
+ | und dann spcacat starten. | ||
+ | |||
+ | <pre> | ||
+ | spcacat -d /dev/v4l/video0 -g -f jpg -p 10000 -o | ||
+ | </pre> | ||
+ | |||
+ | in unserm Falle speichert spcacat aller 10 sek. ein Bild ab. | ||
+ | |||
+ | | | ||
+ | Nun noch die Config-Datei für motion anlegen. | ||
+ | <pre> | ||
+ | vi /etc/motion.conf | ||
+ | |||
+ | #motion.conf | ||
+ | |||
+ | daemon on | ||
+ | quiet on | ||
+ | |||
+ | # You may very well need to change this (check with 'dmesg' | ||
+ | # after plugging in your webcam) | ||
+ | videodevice /dev/v4l/video0 | ||
+ | |||
+ | # Image size in pixels (valid range is camera dependent) | ||
+ | width 320 | ||
+ | height 240 | ||
+ | |||
+ | quality 60 | ||
+ | framerate 1 | ||
+ | auto_brightness on | ||
+ | |||
+ | # Initial brightness, contrast, hue (NTSC), and saturation | ||
+ | # 0 = disabled (valid range 0-255) | ||
+ | brightness 0 | ||
+ | contrast 0 | ||
+ | saturation 0 | ||
+ | hue 0 | ||
+ | |||
+ | # Target base directory for pictures and films | ||
+ | # You should probably change this (create dir beforehand) | ||
+ | target_dir /www | ||
+ | jpeg_filename bild | ||
+ | |||
+ | # Define a port number (e.g. 8000) to enable the mini-http server | ||
+ | # 0 = disabled | ||
+ | webcam_port 8000 | ||
+ | |||
+ | # Set to 'off' to allow anybody (not just localhost) to view the | ||
+ | # webcam via the mini-http server (http://hostname:port) | ||
+ | webcam_localhost off | ||
+ | |||
+ | webcam_quality 40 | ||
+ | webcam_maxrate 2 | ||
+ | |||
+ | # User defined text overlayed on each in the lower left corner | ||
+ | text_left "Dave TV" | ||
+ | </pre> | ||
+ | |||
+ | Und jetzt motion starten mit | ||
+ | |||
+ | <pre> | ||
+ | motion | ||
+ | </pre> | ||
+ | Jetzt kann man sich den Stream unter http://IP-Adresse_vom_Router:8000 ansehen | ||
+ | |} | ||
+ | |||
+ | * Projektseiten: | ||
+ | ** [http://mxhaard.free.fr/index.html http://mxhaard.free.fr/index.html] - spca5xx Driver und Viewer | ||
+ | ** [http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome] - Motion Wiki | ||
+ | |||
+ | ==== pwc/pwcx ==== | ||
+ | |||
+ | <pre> | ||
+ | ipkg install kmod-pwc | ||
+ | </pre> | ||
+ | |||
+ | * Projektseiten: | ||
+ | ** [http://www.saillard.org/linux/pwc/ http://www.saillard.org/linux/pwc/] | ||
+ | ** [http://www.smcc.demon.nl/webcam/ http://www.smcc.demon.nl/webcam/] | ||
[[Kategorie:Howto]] | [[Kategorie:Howto]] |
Version vom 18. Februar 2007, 23:12 Uhr
Zusätzliche Software
für alle Geräte
Accounting Statistik
Nette Erweiterungen für die öffentliche Oberfläche.
- sinnvoll für DSL-Anbieter
- es wird das datenvolumen jeder ip-adresse angezeigt, die über den router geleitet wird
- Installation --> Hier
OpenDC-Hub / DirectConnect-Hub
- Eine andere nette Sache ist ein OpenDC-Hub. Damit stellt man einen Server zur Verfuegung,
mit dem sich dann Direct-Connect-Clienten verbinden koennen.
Ziel: Chat & einfache Dateifreigaben (nur weimarnetz-intern).
- Mehr dazu unter DirectConnect
mails versenden vom linksys - ssmtp
- ganz sinnvoll um textdateien / alarm-emails per script loszuwerden
- ipkg update
- ipkg install http://openwrt.alphacore.net/ssmtp_2.61_mipsel.ipk
- ipkg install libssl
- datei: /etc/ssmtp/ssmtp.conf erstellen
- root=cstorch(add)gmx(dot)net
- mailhub=mail.gmx.net
- rewriteDomain=gmx.net
- datei /etc/ssmtp/revaliases erstellen
- root:cstorch(add)gmx(dot)net:mail.gmx.net
- aufruf mit : more ssmtp.conf | ssmtp -aucstorch@gmx.net -ap"passwort" cstorch(add)gmx(dot)net
- dabei wird der inhalt von ssmtp.conf als text verschickt
WRT-Openvpn
- Informationen zum FreifunkVPN
- allgemeine Informationen zur FreifunkFirmware (FFF) und openvpn
- konkrete Installationsanleitung zu openVPN unter FFF
WRT-Wiki
So gesehen ist euer Router ein "kleiner" Server, auf dem Du z.B. ein "Mini-Wiki" laufen lassen kannst.
- einfach unter Verwalten --> Publizieren die Datei hochladen
- danach kann man Text verändern, andere Bilder hochladen und sich z.b. eine Nachrichtenbox anlegen wo andere euch was reinschreiben können.
- Datei --> Datei:Startseite-mit-wiki.tar
- Hilfreich zum editieren für Windows-User ist das Progrämmchen winscp.
- hierdurch wird die Verzeichnisstruktur eures Linuxsystems vom Router übersetzt in eine Art Windowsexplorer.
MDNS - MulticastDNS
- mehr dazu unter MDNS mit Freifunk oder in der Wikipedia
für Geräte mit USB-Anschluss
- bei den Geräten Asus wl hdd 2,5 / Yakumo wireless storage 60 ist ein usb1.1 vorhanden,
- bei Siemens se505 nachrüstbar [ Howto]
USB
Grundpakete installieren (Driver)
ipkg install kmod-usb-uhci ipkg install kmod-usb-ohci ipkg install kmod-usb2 ipkg install kmod-usb-storage ipkg install kmod-vfat
willst du Scanner und Drucker über das Netzwerk nutzen
ipkg install kmod-usb-scanner ipkg install kmod-usb-printer
danach Neustart.
Die Module werden beim Neustart selbstständig geladen(wenn es kmod-module sind!), und stehen in der Datei /etc/modules.d.
mit dem Befehl:
lsmod
kannst du überprüfen welche module geladen sind. Jetzt noch überprüfen ob das Usb-Gerät erkannt wurde indem wir
dmesg
eigeben. Da sollte dann sowas stehen wie:
root@dave_yakumo:~# dmesg Creating 5 MTD partitions on "Physically mapped flash": 0x00000000-0x00040000 : "cfe" 0x00040000-0x003f0000 : "linux" 0x000b5fec-0x00180000 : "rootfs" mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only 0x003f0000-0x00400000 : "nvram" 0x00180000-0x003f0000 : "OpenWrt" diag boardtype: 0000041a Probing device eth0: No Robo switch in managed mode found Probing device eth1: No Robo switch in managed mode found Probing device eth2: No such device Probing device eth3: No such device BFL_ENETADM not set in boardflags. Use force=1 to ignore. eth2: Broadcom BCM4320 802.11 Wireless Controller 3.90.37.0 usb.c: registered new driver usbdevfs usb.c: registered new driver hub usb-ohci.c: USB OHCI at membase 0xb8004000, IRQ 2 usb-ohci.c: usb-00:04.0, PCI device 14e4:4715 usb.c: new USB bus registered, assigned bus number 1 hub.c: USB hub found hub.c: 2 ports detected SCSI subsystem driver Revision: 1.00 hub.c: new USB device 00:04.0-1, assigned address 2 usb.c: USB device 2 (vend/prod 0x126f/0x1325) is not claimed by any active driver. Initializing USB Mass Storage driver... usb.c: registered new driver usb-storage scsi0 : SCSI emulation for USB Mass Storage devices Vendor: USB 2.0 Model: Mobile Disk Rev: Type: Direct-Access ANSI SCSI revision: 02 Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 SCSI device sda: 253952 512-byte hdwr sectors (130 MB) sda: Write Protect is off WARNING: USB Mass Storage data integrity not assured USB Mass Storage device found at 2 USB Mass Storage support registered.
interessant ist für uns eigentlich nur "Gerät erkannt"
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 SCSI device sda: 253952 512-byte hdwr sectors (130 MB) sda: Write Protect is off WARNING: USB Mass Storage data integrity not assured USB Mass Storage device found at 2 USB Mass Storage support registered.
na dann nur Mountpunkt anlegen und dann noch mounten (einhängen)
mkdir -p /mnt mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt
Eleganter ist es ein script zu erstellen um nicht jedesmal den mount-Befehl nach einem Neustart eingeben zu müssen. Dazu legt man in dem Startverzeichnis(/etc/init.d) eine Datei z.B. S95mount an
cd /etc/init.d/ vi S95mount #!/bin/sh # # mount script # # Which device needs to be mounted? MOUNT_DEVICE0=/dev/scsi/host0/bus0/target0/lun0/part1 i=0 # Wait 15 secs, mount when ready, and continue if it dosnt get ready within 15 secs. while [ $i -le 15 ] do if [ -e $MOUNT_DEVICE0 ] then mount $MOUNT_DEVICE0 /mnt/ echo "Success: $MOUNT_DEVICE0" exit 0 fi sleep 1 i=`expr $i + 1` done
berechtigungen noch setzen mit
chmod 0777 S95mount
IDE-Festplatte
FTP-Server
ipkg install vsftpd
Samba-Server
Webcam
es gibt grundsätzlich zwei größere Projekte für Webcam-Driver
spca5xx/spca5xx_LE
- Installation:
- Die Dateien spca5xx.o.gz oder spca5xx_lite.o.gz mit wget auf den Router laden.
# spca5xx-Modul cd /tmp wget http://ping02.stura.uni-weimar.de/dave/spca5xx.o.gz mv spca5xx.o.gz /lib/modules/2.4.30 cd /lib/modules/2.4.30/ gunzip spca5xx.o.gz # spca5xx/LE-Modul cd /tmp wget http://ping02.stura.uni-weimar.de/dave/spca5xx_lite.o.gz mv spca5xx_lite.o.gz /lib/modules/2.4.30 cd /lib/modules/2.4.30/ gunzip spca5xx_lite.o.gz
nun noch video-modul und .jpg unterstützung laden
ipkg install libpthread ipkg install kmod-videodev
danach Neustart.
Die Module leider nicht beim Neustart selbstständig geladen.
Webcammodule laden mit
insmod videodev insmod spca5xx oder insmod spca5xx_lite
mit dem Befehl:
lsmod
kannst du überprüfen welche module geladen sind. Jetzt noch überprüfen ob die Webcam erkannt wurde indem wir
dmesg
eigeben. Da sollte dann sowas stehen wie:
root@dave_yakumo:~# dmesg Creating 5 MTD partitions on "Physically mapped flash": 0x00000000-0x00040000 : "cfe" 0x00040000-0x003f0000 : "linux" 0x000b5fec-0x00180000 : "rootfs" mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only 0x003f0000-0x00400000 : "nvram" 0x00180000-0x003f0000 : "OpenWrt" diag boardtype: 0000041a Probing device eth0: No Robo switch in managed mode found Probing device eth1: No Robo switch in managed mode found Probing device eth2: No such device Probing device eth3: No such device BFL_ENETADM not set in boardflags. Use force=1 to ignore. eth2: Broadcom BCM4320 802.11 Wireless Controller 3.90.37.0 usb.c: registered new driver usbdevfs usb.c: registered new driver hub usb-ohci.c: USB OHCI at membase 0xb8004000, IRQ 2 usb-ohci.c: usb-00:04.0, PCI device 14e4:4715 usb.c: new USB bus registered, assigned bus number 1 hub.c: USB hub found hub.c: 2 ports detected SCSI subsystem driver Revision: 1.00 Initializing USB Mass Storage driver... usb.c: registered new driver usb-storage USB Mass Storage support registered. uhci.c: USB Universal Host Controller Interface driver v1.1 Linux video capture interface: v1.00 usb.c: registered new driver spca5xx drivers/usb/spca5xx.c: spca5xx driver 00.57.07 registered hub.c: new USB device 00:04.0-1, assigned address 2 drivers/usb/spca5xx.c: USB SPCA5XX camera found. Qtec Webcam 100 Pac207-BCA drivers/usb/spca5xx.c: [spca5xx_probe:8380] Camera type GBRG drivers/usb/pac207.h: [pac207_config:148] Find Sensor PAC207 drivers/usb/spca5xx.c: [spca5xx_getcapability:2207] maxw 352 maxh 288 minw 160 minh 120
interessant ist für uns eigentlich nur "Gerät erkannt"
usb.c: registered new driver spca5xx drivers/usb/spca5xx.c: spca5xx driver 00.57.07 registered hub.c: new USB device 00:04.0-1, assigned address 2 drivers/usb/spca5xx.c: USB SPCA5XX camera found. Qtec Webcam 100 Pac207-BCA drivers/usb/spca5xx.c: [spca5xx_probe:8380] Camera type GBRG drivers/usb/pac207.h: [pac207_config:148] Find Sensor PAC207 drivers/usb/spca5xx.c: [spca5xx_getcapability:2207] maxw 352 maxh 288 minw 160 minh 120
also Driver gefunden, Webcam erkannt. Und das mit der Aldi-Cam super!
Programm spcacat | Programm motion |
---|---|
Installation: cd /tmp wget http://ping02.stura.uni-weimar.de/dave/spcacat.gz mv spcacat.gz /usr/bin cd /usr/bin gunzip spcacat.gz chmod +x spcacat |
Installation: ipkg install http://ping02.stura.uni-weimar.de/dave/libjpeg_6b-1_mipsel.ipk ipkg install http://ping02.stura.uni-weimar.de/dave/motion_3.2.6-1_mipsel.ipk |
Nun noch eine Datei anlegen für die webcam. vi /www/webcam.html anlegen <html><head> <script language="JavaScript"> <!-- function refreshIt() { if (!document.images) return; document.images['SpcaPic'].src = 'SpcaPict.jpg?' + Math.random(); setTimeout('refreshIt()',10000); // refresh every timeout/1000 secs } //--> </script> </head> <body onLoad=" setTimeout('refreshIt()',5000)"> <br><br><br> <center> <img src="SpcaPict.jpg" name="SpcaPic"> <br> Bild wird aller 10 sek. neu geladen </center> </body></html> und dann spcacat starten. spcacat -d /dev/v4l/video0 -g -f jpg -p 10000 -o in unserm Falle speichert spcacat aller 10 sek. ein Bild ab. |
Nun noch die Config-Datei für motion anlegen. vi /etc/motion.conf #motion.conf daemon on quiet on # You may very well need to change this (check with 'dmesg' # after plugging in your webcam) videodevice /dev/v4l/video0 # Image size in pixels (valid range is camera dependent) width 320 height 240 quality 60 framerate 1 auto_brightness on # Initial brightness, contrast, hue (NTSC), and saturation # 0 = disabled (valid range 0-255) brightness 0 contrast 0 saturation 0 hue 0 # Target base directory for pictures and films # You should probably change this (create dir beforehand) target_dir /www jpeg_filename bild # Define a port number (e.g. 8000) to enable the mini-http server # 0 = disabled webcam_port 8000 # Set to 'off' to allow anybody (not just localhost) to view the # webcam via the mini-http server (http://hostname:port) webcam_localhost off webcam_quality 40 webcam_maxrate 2 # User defined text overlayed on each in the lower left corner text_left "Dave TV" Und jetzt motion starten mit motion Jetzt kann man sich den Stream unter http://IP-Adresse_vom_Router:8000 ansehen |
- Projektseiten:
- http://mxhaard.free.fr/index.html - spca5xx Driver und Viewer
- http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome - Motion Wiki
pwc/pwcx
ipkg install kmod-pwc