Mein Test-Image: debian-8-jessie-lite-preview-bpi-m2u.img 2016-09-27
Link -> https://bananapi.gitbooks.io/bpi-m2-ultra/content/linuxsoftware.html
Nun wollen wir mal das WLan aktivieren. Dazu aktivieren wir das entsprechende Modul. In /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
#gpio_sunxi
#w1-sunxi
#w1-gpio
#w1-therm
#ap6211
bcmdhd
die # vor ap6211 entfernen. Danach neustarten.
shutdown -r now
Dann die Datei /etc/network/interfaces editieren.
# Wired adapter #1
auto eth0
iface eth0 inet dhcp
# hwaddress ether # if you want to set MAC manually
# pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838
#
# Wired adapter #2
#auto eth1
# iface eth1 inet dhcp
# hwaddress ether # if you want to set MAC manually
# pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838
#
# Wireless adapter #1
auto wlan1
iface wlan1 inet dhcp
wpa-ssid "SSID"
wpa-psk "password"
# to generate proper encrypted key: wpa_passphrase yourSSID yourpassword
#auto wlan0
# iface wlan0 inet dhcp
# wpa-ssid bananapi
# wpa-psk "password"
#
# Local loopback
auto lo
iface lo inet loopback
Die Originaldatei enthält unter Wireless adapter #1 Einträge für ein WLan0. Das gibt es aber nicht!? WLan0 ist evt. das Bluetooth?
root@bpi-iot-ros-ai:~# iwconfig
dummy0 no wireless extensions.
lo no wireless extensions.
eth0 no wireless extensions.
wlan1 no wireless extensions.
tunl0 no wireless extensions.
Es gibt nur ein wlan1. Ok, das bekommen wir auch hin :) Die wlan0-Einträge ändern in wlan1.
auto wlan1
iface wlan1 inet dhcp
wpa-ssid "SSID"
wpa-psk "password"
Danach den Adapter starten!
root@bpi-iot-ros-ai:~# ifup wlan1
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan1/44:2c:05:ed:10:c7
Sending on LPF/wlan1/44:2c:05:ed:10:c7
Sending on Socket/fallback
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 9
DHCPREQUEST on wlan1 to 255.255.255.255 port 67
DHCPOFFER from 192.168.4.1
DHCPACK from 192.168.4.1
bound to 192.168.4.9 -- renewal in 1506 seconds.
Fertig, die WLan-Verbindung steht.
frank@pc ~ $ ping 192.168.4.9
PING 192.168.4.9 (192.168.4.9) 56(84) bytes of data.
64 bytes from 192.168.4.9: icmp_seq=1 ttl=64 time=5.12 ms
64 bytes from 192.168.4.9: icmp_seq=2 ttl=64 time=3056 ms
64 bytes from 192.168.4.9: icmp_seq=3 ttl=64 time=2049 ms
64 bytes from 192.168.4.9: icmp_seq=4 ttl=64 time=1041 ms
64 bytes from 192.168.4.9: icmp_seq=5 ttl=64 time=33.4 ms
64 bytes from 192.168.4.9: icmp_seq=6 ttl=64 time=3349 ms
64 bytes from 192.168.4.9: icmp_seq=7 ttl=64 time=2342 ms
64 bytes from 192.168.4.9: icmp_seq=8 ttl=64 time=1334 ms
64 bytes from 192.168.4.9: icmp_seq=9 ttl=64 time=326 ms
64 bytes from 192.168.4.9: icmp_seq=10 ttl=64 time=3318 ms
64 bytes from 192.168.4.9: icmp_seq=11 ttl=64 time=2312 ms
64 bytes from 192.168.4.9: icmp_seq=12 ttl=64 time=1304 ms
64 bytes from 192.168.4.9: icmp_seq=13 ttl=64 time=296 ms
64 bytes from 192.168.4.9: icmp_seq=14 ttl=64 time=3493 ms
64 bytes from 192.168.4.9: icmp_seq=15 ttl=64 time=2486 ms
64 bytes from 192.168.4.9: icmp_seq=16 ttl=64 time=1478 ms
64 bytes from 192.168.4.9: icmp_seq=17 ttl=64 time=470 ms
Das sieht nicht so gut aus, warum? Hmm, keine Ahnung. Ich tippe auf Treiber. Irgendjemand Ideen?