colin B
Posts: 119
Joined: Sun Mar 04, 2012 12:23 pm
Contact: Website

Re: Wifi adapter

Wed Jun 13, 2012 12:36 pm

I'm still having problems in trying to get my wireless lan adapter recognised, having followed the instructions listed here and elsewhere.

I have two WiFi USB sticks both using Realtek chips.

My latest is the MicroNext adapter from E-14 (#208-1765). This comes with an install CD which includes Linux drivers which they say in one document are Arm compatible the driver file on the CD is 8192cu.ko v3.3.2_3192.20120103

I assume the drivers are precompiled compiled for i386 systems. In their 'Quick_Start_Guide_For_Driver_Compilation_and_Installation' pdf, they list only ARM_S3C2K4, PXA2XX and S3C6K4 - I assume none of these are compilable for the Arm v5?

Having said that they have the following script

Code: Select all

ifeq ($(CONFIG_PLATFORM_NEW), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE := /opt/ new/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
KSRC := /opt /new/kernel
endif
and

Code: Select all

ifeq ($(CONFIG_PLATFORM_NEW), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE := /opt/ new/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
KSRC := /opt /new/kernel
MODULE_NAME := wlan
endif
If I were to copy across the make files and the headers and c files, and then use the above make scripts am I likely to have more luck?
Their WPA_Supplicant conf files all assume WPA security whereas I use WEP, I think I've made the correct alterations to my current file (sorry , not typing this from the Pi, so can't post my conf file at this moment), but maybe this is where the problem lies.

I could also try to compile in the Raspberry Pi-Dev VM, though I've tried this before and the compile crashed.

Colin
On a clear disk one can seek forever

MarrsAttax
Posts: 25
Joined: Fri Jun 01, 2012 2:39 pm

Re: Wifi adapter

Wed Jun 13, 2012 1:47 pm

Basically you just need to add the following to the Makefile in the appropriate places:

Code: Select all

CONFIG_PLATFORM_RASPBIAN = y

Code: Select all

ifeq ($(CONFIG_PLATFORM_RASPBIAN), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE := arm-linux-gnueabihf-
KVER  := $(shell uname -r)
KSRC ?= /lib/modules/$(KVER)/build
MODULE_NAME := 8192cu
endif
Alternatively you can download the module MrEngman provided and skip the compile altogether
http://dl.dropbox.com/u/80256631/8192cu-20120611.tar.gz

thom_thumb
Posts: 21
Joined: Tue May 29, 2012 9:21 pm

Re: Wifi adapter

Wed Jun 13, 2012 7:58 pm

MarrsAttax wrote:I had AP scanning/selection set to 2 (ap_scan=2) but had more than one option listed in my proto and group fields (you're only allowed one option if ap_scan=2.
Ah! Actually I did have more than one proto and group listed for that AP. Didn't know you couldn't do that, thanks. Although it still doesn't seem to have helped... I'm taking the rpi back to my house to see if it can connect to my WEP AP at home.

MarrsAttax
Posts: 25
Joined: Fri Jun 01, 2012 2:39 pm

Re: Wifi adapter

Wed Jun 13, 2012 8:58 pm

Cool. Glad to be of help. The same applies for the key_mgmt and pairwise fields too. Post your wpa-supplicant.conf file here (minus passkey of course) if you still can't connect.

thom_thumb
Posts: 21
Joined: Tue May 29, 2012 9:21 pm

Re: Wifi adapter

Mon Jun 18, 2012 12:07 am

Here's my wpa_supplicant.conf. The first AP is a WPA2 at work. The second is my home WEP-protected router. I changed ap_scan=1 in hopes that it would help... But I haven't seen a difference.

Code: Select all

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1

network={
  ssid="AB"
  proto=RSN
  key_mgmt=WPA-PSK
  pairwise=CCMP TKIP
  group=CCMP TKIP
  psk="asdfg"
  id_str="AB"
}

network={
  ssid="ZABCDE"
  key_mgmt=NONE
  wep_key0="abcdef123"
  wep_tx_keyidx=0
  auth_alg=SHARED
}
Thanks in advance for your help!

MarrsAttax
Posts: 25
Joined: Fri Jun 01, 2012 2:39 pm

Re: Wifi adapter

Mon Jun 18, 2012 7:58 am

Try this

Code: Select all

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=2

network={
  ssid="AB"
  proto=RSN
  key_mgmt=WPA-PSK
  auth_alg=OPEN
  pairwise=TKIP
  group=TKIP
  psk="asdfg"
  id_str="AB"
}

network={
  ssid="ZABCDE"
  key_mgmt=NONE
  wep_key0="abcdef123"
  wep_tx_keyidx=0
  auth_alg=SHARED
}

thom_thumb
Posts: 21
Joined: Tue May 29, 2012 9:21 pm

Re: Wifi adapter

Wed Jun 20, 2012 2:11 am

Well unfortunately after the latest 'rpi-update' (hoping to resolve the USB dropped packet issue) the binary driver doesn't work again... So I have to rebuild. I opened an issue here:
https://github.com/Hexxeh/rpi-firmware/issues/1

So maybe if we're lucky, hexxeh can maintain binary builds of the driver when the kernel is updated which would avoid this whole problem.

Lorian
Posts: 112
Joined: Sun Mar 11, 2012 10:09 am

Re: Wifi adapter

Wed Jun 20, 2012 7:33 am

Would be good. I've completely stopped using rpi-update and moved over to using my own kernel builds.

MrEngman
Posts: 3836
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi adapter

Wed Jun 20, 2012 12:17 pm

colin B wrote:I'm still having problems in trying to get my wireless lan adapter recognised, having followed the instructions listed here and elsewhere.

I have two WiFi USB sticks both using Realtek chips.

My latest is the MicroNext adapter from E-14 (#208-1765). This comes with an install CD which includes Linux drivers which they say in one document are Arm compatible the driver file on the CD is 8192cu.ko v3.3.2_3192.20120103

I assume the drivers are precompiled compiled for i386 systems. In their 'Quick_Start_Guide_For_Driver_Compilation_and_Installation' pdf, they list only ARM_S3C2K4, PXA2XX and S3C6K4 - I assume none of these are compilable for the Arm v5?

Having said that they have the following script

Code: Select all

ifeq ($(CONFIG_PLATFORM_NEW), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE := /opt/ new/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
KSRC := /opt /new/kernel
endif
and

Code: Select all

ifeq ($(CONFIG_PLATFORM_NEW), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE := /opt/ new/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
KSRC := /opt /new/kernel
MODULE_NAME := wlan
endif
If I were to copy across the make files and the headers and c files, and then use the above make scripts am I likely to have more luck?
Their WPA_Supplicant conf files all assume WPA security whereas I use WEP, I think I've made the correct alterations to my current file (sorry , not typing this from the Pi, so can't post my conf file at this moment), but maybe this is where the problem lies.

I could also try to compile in the Raspberry Pi-Dev VM, though I've tried this before and the compile crashed.

Colin
Be careful if you are using two different wifi adapters. There is an app udev which assigns names to wifi adapters and may stop at least one working. Take a look at file

Code: Select all

/etc/udev/rules.d/70-persistent-net.rules
You will probably see more than one entry referencing "wlan....". One with wlan0, one with wlan1 and maybe more if you've tried others as well.

You can add an entry to /etc/network/interfaces for wlan1. Just copy wlan0 settings and change new section to reference "wlan1". Or you can delete the entries in /etc/udev/rules.d.70-persistent-net.rules before you change adapter.

And for some useful info on WEP look here. For driver info look here.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

colin B
Posts: 119
Joined: Sun Mar 04, 2012 12:23 pm
Contact: Website

Re: Wifi adapter

Thu Jun 21, 2012 11:20 pm

Thanks Mr Engman, I'll be trying out your advice this weekend on the new Wheezy distribution.
On a clear disk one can seek forever

Qtree
Posts: 4
Joined: Fri Aug 17, 2012 3:49 pm

Re: Wifi adapter

Mon Aug 20, 2012 7:30 pm

see comment from popcornmix :
https://github.com/Hexxeh/rpi-firmware/issues/1
Anyone is willing to do this ? I can help but for this moment a "pull request" is something I am not familiar with.

MadCow42
Posts: 106
Joined: Sun Jul 01, 2012 12:48 am

Re: Wifi adapter

Mon Aug 20, 2012 7:54 pm

Just as an FYI, I managed to get my wifi adapter(s) working properly by soldering 1-ohm resistors over top of the USB polyfuses. They're now happily powered directly by the Raspberry Pi itself, with no hub.

Prior to doing that, I could sporadically get the system to recognize the adapter, but never get a signal or see any access points.

Using a 1-ohm resistor instead of just a wire seems to allow you to hot-plug in USB devices without the system rebooting.

YMMV.
Kevin.

thom_thumb
Posts: 21
Joined: Tue May 29, 2012 9:21 pm

Re: Wifi adapter

Wed Aug 22, 2012 1:05 am

Qtree wrote:I can help but for this moment a "pull request" is something I am not familiar with.
Pull request means you've forked hexxeh's rpi-firmware repo on github, and committed changes to your fork. You then submit a "pull request" for hexxeh to merge those changes into his upstream repo.

gregd72002
Posts: 31
Joined: Tue May 08, 2012 9:17 pm

Re: Wifi adapter

Thu Aug 23, 2012 11:44 am

Hi guys,

I've got similar problem, though my card is fully recognized and modules are loaded. The problem is it does not connect..

Code: Select all

[    3.067669] usb 1-1.2: new high speed USB device number 4 using dwc_otg
[    3.364125] usb 1-1.2: New USB device found, idVendor=050d, idProduct=705a
[    3.387506] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.402783] usb 1-1.2: Product: Belkin 54g USB Network Adapter
[    3.422168] usb 1-1.2: Manufacturer: Belkin
[    6.047198] cfg80211: Calling CRDA to update world regulatory domain
[    7.057691] usb 1-1.2: reset high speed USB device number 4 using dwc_otg
[    7.564593] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    7.566668] Registered led device: rt73usb-phy0::radio
[    7.566863] Registered led device: rt73usb-phy0::assoc
[    7.567033] Registered led device: rt73usb-phy0::quality
[    7.569079] usbcore: registered new interface driver rt73usb
iwlist wlan0 scan:

Code: Select all

wlan0     Scan completed :
          Cell 01 - Address: E0:CB:4E:43:9E:94
                    Channel:11
                    Frequency:2.462 GHz (Channel 11)
                    Quality=66/70  Signal level=-44 dBm  
                    Encryption key:on
                    ESSID:"MyNet"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=0000000a68cea25b
                    Extra: Last beacon: 500ms ago
                    IE: Unknown: 00054D794E6574
                    IE: Unknown: 010882848B962430486C
                    IE: Unknown: 03010B
                    IE: Unknown: 050401030000
                    IE: Unknown: 2A0100
                    IE: Unknown: 2F0100
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 32040C121860
                    IE: Unknown: 2D1A7C181BFFFF000000000000000000000000000000000000000000
                    IE: Unknown: 3D160B081100000000000000000000000000000000000000
                    IE: Unknown: DD09001018020000010000
                    IE: Unknown: DD1E00904C337C181BFFFF000000000000000000000000000000000000000000
                    IE: Unknown: DD1A00904C340B081100000000000000000000000000000000000000

/etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=2

network={
  ssid="MyNet"
  proto=WPA2
  key_mgmt=WPA-PSK
  pairwise=CCMP
  group=CCMP
  psk="*********"
}
/etc/network/interfaces:

Code: Select all

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
sudo service networking start:

Code: Select all

[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:17:3f:49:b0:9f
Sending on   LPF/wlan0/00:17:3f:49:b0:9f
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20
Note: this is not to do with DHCP, the card is not getting associated with the router at all.

This is the first distribution that I'm struggling in with WIFI configuration.. I used debian, arch, qtonpi before and on all of them I got this working...

What's wrong with rasbian?

Qtree
Posts: 4
Joined: Fri Aug 17, 2012 3:49 pm

Re: Wifi adapter

Thu Aug 23, 2012 3:50 pm

@gregd72002
I think that your WiFi card may not support WPA2(AES) - your configuration in wpa_supplicant.conf is for WPA2(AES). You can try to reconfigure RPi for WPA(TKIP) according to below link (not necessary strictly to follow it, try to use it as a guide):
http://ubuntuforums.org/showthread.php?t=202834
In that case, make sure that your router will be reconfigured for WPA(1).

If you do not like to reconfigure your router then you can try some more general configuration in wpa_supplicant.conf, something like:

Code: Select all

network={
  ssid="MyNet"
  proto=WPA RSN
  key_mgmt=WPA-PSK
  pairwise=TKIP CCMP 
  group=TKIP CCMP 
  psk="*********"
}
Also, It seems that your router is brodcastin SID so I don't think you need "ap_scan=2" entry in wpa_supplicant.conf file so I would remove it. Hope it helps...

Good luck,
Qtree

jon wise
Posts: 48
Joined: Thu May 31, 2012 8:21 pm

Re: Wifi adapter

Tue Oct 16, 2012 8:03 am

I have access to my pi via WiFi, configured with wpa_supplicant on Raspian, using the IP number from DHCP on my BT HomeHub. How do I allocate a name to the device?

vrochopios
Posts: 1
Joined: Wed Nov 21, 2012 8:14 pm

Re: Wifi adapter

Wed Nov 21, 2012 8:19 pm

Hello

Sorry for bumping on this old thread but I have an issue. I followed the guide on page one and I can connect to my wifi. The problem is that when I restart the pi it doesn't work unless I go to the terminal, restart networking and then start xbmc again. Do you know if there is a way around this?
The adaptor I have uses the Realtek RTL8188CUS.
Any help will be greatly apreciated!

vroch

dehunt911
Posts: 3
Joined: Sun Feb 10, 2013 10:23 am

Re: Wifi adapter

Tue Apr 09, 2013 5:37 pm

Here is some output from iwlist - note that channel 13 is in twice:
[email protected]:/proc/net# iwlist wlan0 frequency
wlan0 13 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Channel 13 : 2.472 GHz
Channel 13 : 2.472 GHz
Current Frequency:2.472 GHz (Channel 13)

I tried remedy this by using iwconfig fro my edimax EW-7811Un wireless unit as follows:

[email protected]:/proc/net# iwconfig wlan0 channel 12 freq 2467
[email protected]:/proc/net# iwconfig wlan0 channel 13 freq 2472
[email protected]:/proc/net# iwconfig wlan0 commit
Error for wireless request "Commit changes" (8B00) :
SET failed on device wlan0 ; Operation not supported.


I am running:
Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l

Anyone know how to fix this anomaly?

MrEngman
Posts: 3836
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi adapter

Wed Apr 10, 2013 9:37 pm

This may be a bug in the driver.

Looking at the available drivers from Realtek the newest is v3.4.4_4749.20121105 and in the release notes it mentions a fix for channel plan error. The driver in use with the Pi is an earlier revision.

There are a set of parameters for the wifi driver in directory /sys/module/8192cu/parameters. Changing the parameter rtw_channel_plan changes the list of channels available. It defaults to the value 65 and I see the same list of channels you do with no channel 12 and channel 13 repeated. If I change it to 64, unplug the wifi adapter and plug it back in I then see a list of only 11 channels - channel 1 to channel 11.

I have the very latest software version on my Pi -
Linux raspberrypi 3.6.11+ #403 PREEMPT Tue Apr 2 22:48:13 BST 2013 armv6l GNU/Linux
- and it still uses the older driver v3.4.3_4369.20120622.

Looks like the driver should be updated.


Mrengman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

MrEngman
Posts: 3836
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi adapter

Wed Apr 10, 2013 10:00 pm

Just looked at the RapberryPi Linux Github and the newer version of driver was added to the latest code just a couple of hours ago.

When its available to download I'll be interested to see if it's fixed this issue.


Mrengman


Just updated Linux with rpi-update and the channel list displays correctly now !

wlan0 13 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Channel 12 : 2.467 GHz
Channel 13 : 2.472 GHz
Current Frequency:2.447 GHz (Channel 8)
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

victagayun
Posts: 127
Joined: Sun Apr 15, 2012 4:01 pm
Contact: Website

Re: Wifi adapter

Mon Jul 29, 2013 3:55 pm

by now this usb wifi adapter should be no problem using the latest version 25-05-2013, I think admin should already update http://elinux.org/RPi_USB_Wi-Fi_Adapters that it is already working ok...
should we close it?

shah4186
Posts: 1
Joined: Tue Jul 15, 2014 12:17 am

Re: Wifi adapter

Tue Jul 15, 2014 6:35 pm

Hi,

I'm trying to compile the 8192.ko on raspberry pi and it did compile. I black listed the old module in /etc/modprobe.d/raspi-blacklist.conf and /etc/module. I'm using raspberian wheezy kernel (3.12.23+). My driver version is 4.0.2_9000.20130911

after loading the new module (8192.ko) in /lib/module/3.12.23+/kernel/driver/net/wireless/rtl8192cu/ i rebooted the system and i'm seeing below error message.

8192cu: no symbol version for module_layout

What could cause this?

Thanks,
shah4186

MrEngman
Posts: 3836
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Wifi adapter

Wed Jul 16, 2014 12:32 am

shah4186 wrote:Hi,

I'm trying to compile the 8192.ko on raspberry pi and it did compile. I black listed the old module in /etc/modprobe.d/raspi-blacklist.conf and /etc/module. I'm using raspberian wheezy kernel (3.12.23+). My driver version is 4.0.2_9000.20130911

after loading the new module (8192.ko) in /lib/module/3.12.23+/kernel/driver/net/wireless/rtl8192cu/ i rebooted the system and i'm seeing below error message.

8192cu: no symbol version for module_layout

What could cause this?

Thanks,
shah4186
You do realise this post is almost a year old now, don't you, Jul 2013?

Something not set up right. You are probably missing the file Module.symvers. http://askubuntu.com/questions/14627/no ... -usbhid-ko

Why are you compiling this module anyway, its included in the kernel and has been for around 2 years now. And it is currently version v4.0.2_9000.20130911



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

jpno5
Posts: 1
Joined: Fri Nov 18, 2016 7:55 pm

Re: Wifi adapter

Fri Nov 18, 2016 8:09 pm

MrEngman Thanks dude, i drove 100 miles today on my 125 motorbike in shitty snowy weather to get a wifi adapter from argos tl-wn823n. I had no internet access on the pi, but managed to dump the driver you compiled over and it worked a treat! Totally thought i was going to have to drive back to buy another adapter. You should stick a wee paypal donation link in your sig or something i'm sure i aint the only one who'd like to buy you a beer!


Cheers

User avatar
HawaiianPi
Posts: 4456
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Wifi adapter

Sun Nov 20, 2016 1:34 am

I know this is an old thread, but since someone bumped it I thought I'd mention that I bought some USB WiFi dongles from Amazon (US) for $4 each, and they work great with our Pi-Zeros. No drivers needed. They work out of the box with Raspbian Jessie (even the Lite version).

Image
Click on image to go to Amazon US product page. Don't know if they have them in the UK or elsewhere, but it might be worth a look.

I use these on our Pi-Zeros with a tiny OTG adapter that were $2 for five.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “Raspbian”