Quantcast
Channel: neophob.com
Viewing all articles
Browse latest Browse all 36

Another Raspberry PI WLAN installation

$
0
0

I tried to run my cheap RTL8188CUS wlan adapter with the RPI. First I used the wicd ncurses application. Every time I tried to connect to a network the RPI just rebooted! No log entry, just a reboot. However a

1
iwlist wlan0 scan

worked fine. I used an external powered USB hub (2.4A), so power should not be an issue.

Using config files did the trick:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
pi@raspberrypi ~ $ sudo cat /etc/network/interfaces
auto lo
iface lo inet loopback

#eth0 works if connected
allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0
#iface wlan0 inet dhcp
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

pi@raspberrypi ~ $ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="YOUR-SSID"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
group=CCMP
psk=xxx output of wpa_passphrase SSID PASSWORD xxx
}

pi@raspberrypi ~ $ sudo ifup wlan0
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
pi@raspberrypi ~ $ iwconfig
wlan0     IEEE 802.11bgn  ESSID:"YOUR-SSID"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.452 GHz  Access Point: 00:22:33:44:55:66  
          Bit Rate:150 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=100/100  Signal level=90/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.

Just ignore those ioctl errors. After a reboot the wlan0 device was assigned to my access point.

I’m using a 1.2A power supply without external USB hub, a Model B rev002 Raspberry Pi and it works. More tests i’ll do and document here:

  • Use my Apple 1A PSU
  • Use a rev001 Model B Raspberry Pi
  • Latency using wireless

*Edit 24.4.13*
I tested the setup with the 1A Apple PSU, the Model B rev001 RPI and the Zyxel NWD2105 WLAN adapter (the RTL8188CUS WLAN adapter did not work, not even a ‘iwlist wlan0 scan’ failed). The WLAN device didn’t came up cleanly after a reboot, so I changed the file /etc/network/interfaces to:

1
2
3
4
5
allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "YOUR-SSID"
wpa-psk "YOUR-PASSWORD"

I don’t have a clue why the wpa_supplicant did not work on the RPI rev001.

Appendix A: Find out the IP address of a headless RPI

If the RPI is configured as DHCP client, check your DHCP server to see the assigned IP address. The MAC address of the RPI always starts with

1
b8:27:eb

(aka as OUI number) so it should be pretty easy to identify the RPI.

Appendix B: Check if the SD Card is corrupt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
pi@raspberrypi ~ $ sudo tune2fs -l /dev/mmcblk0p2
tune2fs 1.42.5 (29-Jul-2012)
Filesystem volume name:   <none>
Last mounted on:          /
Filesystem UUID:          b7b5ddff-ddb4-48dd-84d2-dd47bf00564a
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              483328
Block count:              1929216
Reserved block count:     81729
Free blocks:              1319533
Free inodes:              403575
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      111
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Flex block group size:    16
Filesystem created:       Sat Dec 15 18:28:17 2012
Last mount time:          Mon Apr 22 21:14:50 2013
Last write time:          Mon Apr 22 21:14:50 2013
Mount count:              3
Maximum mount count:      3
Last checked:             Mon Apr 22 21:14:51 2013
Check interval:           0 (<none>)
Lifetime writes:          6425 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:           256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      7d4c6343-2896-4b4f-8fc6-1e2e8adcfa32
Journal backup:           inode blocks

Viewing all articles
Browse latest Browse all 36

Trending Articles