1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Filebase
  4. Forum
  5. Zebradem-WIKI
  6. Foren-Regeln
  7. Spenden Liste
    1. Spenden
  • Anmelden
  • Registrieren
  • Suche
ZebraDem-Sponsoring
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Seiten
  • Dateien
  • Forum
  • Erweiterte Suche
  1. Forum
  2. Computer Ecke
  3. Mini PC s
  4. Raspberry PI und Co

Raspberry mit USB - Wlan betreiben!

  • Badly
  • 9. Juni 2012 um 19:25
  • Badly
    Erleuchteter
    Punkte
    24.975
    Beiträge
    4.326
    • 9. Juni 2012 um 19:25
    • #1

    Bin heute über folgende Anletiung gestolpert, und mir gleich folgenden USB - Wlan Stick bestellt.
    Am günstigsten ist das Model bei Amazon.
    Amazon.de: Edimax EW-7811Un

    Von Debian werden noch natürlich andere Modele unterstützt.

    Debian - Module Auszug


    Vorab müssen wohl abhänig von der Verschlüsselung noch folgende Zusatzpakete im Debian installiert werden.

    WPA und WPA2: [color="#FF0000"]wpa_supplicant[/color]
    unverschlüsselt und WEP: [color="#FF0000"]iwconfig[/color]
    [color="#FFFF00"]
    Zu installieren wie folgt:[/color]

    $ su
    # aptitude update
    # aptitude install wpasupplicant

    [color="#FFFF00"]Danach für WPA / WPA2:[/color]

    [color="#FF0000"]1[/color] Restrict the permissions of /etc/network/interfaces, to prevent pre-shared key (PSK) disclosure:

    # chmod 0600 /etc/network/interfaces

    [color="#FF0000"]2[/color] Open /etc/network/interfaces in a text editor:

    # sensible-editor /etc/network/interfaces

    [color="#FF0000"]3[/color] Define appropriate stanzas for your wireless interface, along with the SSID and PSK. For example:

    auto wlan0
    iface wlan0 inet dhcp
    wpa-ssid mynetworkname
    wpa-psk mysecretpassphrase

    The "auto" stanza will bring your interface up at system startup. If not desired, remove or comment this line.
    [color="#FF0000"]4[/color] Save the file and exit the editor.

    [color="#FF0000"]5 [/color]Bring your interface up. This will start wpa_supplicant as a background process.

    # ifup wlan0

    Näheres kann ich sagen, wenn ich das Modul besitze.
    Hier die Anleitung im Bezug auf die o.g. Wlan-USB Karte!
    Leider in englisch, sollte aber alles verständlich sein.

    [color="#FFFF00"]Alle Schritte habe ich noch nicht ganz verstanden, aber dafür gibts bestimmt einige von Euch die es genauso gerne ausprobieren möchten/wollen :-)[/color]

    This post contains my notes - what I did to make it work properly, so next time I build the system, I have a step by step guide. In case you lived under the rock for the last months and don't know what Raspberry Pi is, you should visit Raspberry Pi | An ARM GNU/Linux box for $25. Take a byte! now.

    I bought Edimax EW-7811Un adapter for my Pi - small factor, b/g/n type, so why not... especially when vendor says it provides Linux drivers (wohoo!). Sadly as it turns out, compiling drivers on x86 or x64 and ARM architectures can be totally different experience - especially with Raspberry Pi being in it's software infancy. In all seriousness - Pi is for those that like to solve problems (at least at the current stage), but the community works hard to catch up very quickly - great stuff!

    [color="#FF0000"]The wireless adapter[/color]

    Under the hood, EW-7811Un runs Realtek's rtl8192cu chipset. [color="#FF0000"]Kernel module for this chipset is actually included in Debian 6 image (19-04-2012)[/color] distributed via Raspberry Pi website, but it will not work with the card. This is for device with USB ID 7392:7811 - there may be other hardware revisions that will.
    [color="#FF0000"]Actually after the whole procedure described here, running lsusb shows totally different chipset[/color]

    EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

    so I'm not sure which one it really is... and to be fair,[color="#FF0000"] I don't care - it works :-)[/color]

    Debian6-19-04-2012 image

    Debian image is really nice to start with but it has some issues. Maybe I'm purist but working for some time with ARM devices I learned to value resources they offer. I was a bit surprised how many unneeded things were turned on by default and that SSH was actually disabled. We will get those things fixed a bit further down...

    Putting the bits together

    I had to change the procedure a bit, because the whole system wasn't very stable. I was getting a lot of kernel panics and segfaults that were causing Pi to freeze (read hang up) all the time. First suspicion was power supply (I use iPhone PSU - it's rated 5V/1A) but it turned out to be firmware/kernel issue it seems, so we start with fixing it first. Some of the steps below (especially firmware part) were found on the Raspberry Pi forums in thread about XBMC so kudos to their authors - you guys rock!

    [color="#FFFF00"]Firmware:[/color]

    Start with debian6-19-04-2012 image
    Download the latest firmware from GitHub - I used revision a8f8d24
    Copy all files from firmware/boot to /boot
    Replace /opt/vc with firmware/opt/vc
    Replace /lib/modules/3.1.9+ with firmware/modules/3.1.9+
    Download the latest tools from GitHub - I used revision 3aba47b
    Copy arm-bcm2708/linux-x86/arm-bcm2708-linux-gnueabi/sys-root/lib/libstdc++.so.6.0.14 from https://github.com/raspberrypi/tools to /usr/lib and run: sudo ldconfig

    [color="#FFFF00"]Now the wireless part:[/color]

    Download the compiled driver module from here, unpack and move to /lib/modules/3.1.9+/kernel/net/wireless/
    Run: sudo depmod -a
    We need to block the kernel module that comes with Debian image - edit /etc/modprobe.d/blacklist.conf and add the following line: blacklist rtl8192cu
    We want the new module to always load on boot, regardless of hardware being present or not - edit /etc/modules and add the following line: 8192cu

    [color="#FF0000"]Automatically connect to WPA2 network at boot - no GUI needed:[/color]

    Configure wpa_supplicant - edit /etc/wpa_supplicant.conf:

    ctrl_interface=/var/run/wpa_supplicant
    network={
    ssid="MyWPA2wifi"
    scan_ssid=1
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP
    group=CCMP
    # to get encoded PSK run: wpa_passphrase <ESSID>
    psk=<psk returned by wpa_passphrase>
    }

    Make interface come up automatically - edit /etc/network/interfaces:

    auto wlan0
    iface wlan0 inet dhcp
    pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf -B


    [color="#FF0000"]Various fixes for Debian6-19-04-2012 image[/color]

    Enable SSH at boot if you need it (I do, very much):

    sudo update-rc.d ssh defaults

    or rename boot_enable_ssh.rc to boot.rc and reboot - this file is on FAT partition so you can do it even under Windows

    Broken /etc/apt/sources.list - apt-get complains about duplicate sources, easy to fix - debian sources should be in one line, not two:

    deb Index of /debian squeeze main contrib non-free

    Disable services you possibly don't need (I know I don't) but come enabled by default:

    sudo update-rc.d -f portmap remove
    sudo update-rc.d -f nfs-common remove
    sudo update-rc.d -f xinetd remove

    Fix NTP drift file location permissions - Raspberry Pi doesn't keep time (no battery) so it syncs with NTP after every boot:

    sudo chown root:root /var/lib/ntp


    [color="#FF0000"]Summary[/color]

    Raspberry Pi boots up, brings up wireless interface and connects to the network. After firmware update I have not seen a single kernel panic or segfault yet, which is huge change to how my Pi behaved before. Basically it was dying on any operations that required some more wifi network use (wget was enough), more CPU and/or more RAM... and having 192MB of usable RAM (because we share RAM with GPU) made it really common situation.

    [color="#FF0000"]Enjoy![/color]

    Quellenangabe: http://www.ctrl-alt-del.cc/2012/05/raspbe…reless-ada.html

    • Zitieren
  • mandy28
    Erleuchteter
    Reaktionen
    1
    Punkte
    88.996
    Beiträge
    16.178
    • 10. Juni 2012 um 07:54
    • #2

    Hier noch eine Liste empfohlener Wlan Adatper Zubehör | Raspberry Pi Blog

    • Zitieren

Jetzt mitmachen!

Du hast noch kein Benutzerkonto auf unserer Seite? Registriere dich kostenlos und nimm an unserer Community teil!

Benutzerkonto erstellen Anmelden

Spenden

Vielen Dank für die Unterstützung!
Hiermit unterstützt du Zebradem.
Das beinhaltet überwiegend die Serverkosten und Lizenzgebühren.
Spenden

Letzte Beiträge

  • Samsung TV Plus/Rakuten TV

    Fellfresse 10. Mai 2025 um 22:07
  • Pluto TV

    Fellfresse 10. Mai 2025 um 20:59
  • Elektronische Patientenakte: Sicherheitsbedenken durch den CCC

    Katze Flohli 10. Mai 2025 um 08:58
  • Festnahmen von Online-Drogenhändlern in Deutschland

    heugabel 9. Mai 2025 um 08:27
  • KJM kritisiert öffentliche Sperrlisten

    heugabel 8. Mai 2025 um 14:27
  • Plex Live TV / LG Channels / Wedo TV

    Fellfresse 7. Mai 2025 um 21:31
  • Deutsche Bank Sicherheitsvorfall: Romantische Eskapaden im Rechenzentrum

    heugabel 7. Mai 2025 um 17:27
  • Social-Media-Verbot für Kinder: Ein Blick auf Deutschlands Herausforderungen

    Katze Flohli 7. Mai 2025 um 16:46
  • Die Pornhub-Sperre in Deutschland: Ein kurzes Fazit

    Katze Flohli 7. Mai 2025 um 07:29
  • IPTV-Piraterie 2025: Ein Blick auf das illegale Streaming

    heugabel 5. Mai 2025 um 12:27

Aktivste Themen

  • Raspberry Pi ab Ende Februar zu haben

    125 Antworten
  • Raspberry PI: Erste Bilder und Berichte

    42 Antworten
  • Raspberry PI Unterforum ?

    21 Antworten
  • Entwickler stellt Prototyp des 17-Euro-PCs vor!

    21 Antworten
  • Raspberry PI: Gehäuse und Gehäuse Ideen

    18 Antworten
  • Raspberry PI und Emu

    17 Antworten
  • RecalboxOS – Die Retro-Gaming-Plattform für den Raspberry Pi 2

    12 Antworten
  • Raspberry Pi Lieferzeit Farnell vs. RS-Components

    12 Antworten
  • Ambilight

    11 Antworten
  • Display für Raspberry zwecks Oscam Information

    11 Antworten
  1. Kontakt
© 2024 Zebradem - Software by WoltLab