Wifi dongle does not work

Started by splite, November 26, 2014, 03:42:52 PM

Previous topic - Next topic

splite

Hello,

I'm using an Olimex A20 board and I'm trying to use a NetGear (WNA1000M 802.11bgn) wifi dongle. The ship is a Realtek RTL8188CUS.
The debian wiki says I have to use the "firmware-realtek" which is already installed.

I'm having always the same issue. I can not set up the Wlan interface

$ifup wlan1
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/

Cannot find device "wlan1"
Bind socket to interface: No such device
Failed to bring up wlan1.


I tried several way to fix the problem but always the same issue.

Does any body manage to setup this dongle and driver ?

Thank
Florian

Gerrit

Insert the dongle and check with dmesg for any error or other messages, also check with lsmod for 8192cu

and iwconfig to check for any wireless

splite

Hello,
Thank for answering,

Here is what dmesg says :
[ 1273.300434] ehci_irq: port change detect
[ 1273.309966] hub 2-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
[ 1273.321060] usb 2-1: USB disconnect, device number 3
[ 1273.605598] usb 2-1: new high-speed USB device number 4 using sw-ehci

Nothing wrong for me...

Here is the result of lsusb
Bus 002 Device 004: ID 0846:9041 NetGear, Inc. WNA1000M 802.11bgn [Realtek RTL8188CUS]


lsmod module is loaded
8192cu                454131  0


iwconfig nothing detected
olimex@a20-OLinuXino:~$ sudo iwconfig
sudo: unable to resolve host a20-OLinuXino
lo        no wireless extensions.

tunl0     no wireless extensions.

eth0      no wireless extensions.


I started from a fresh install with the Olimex debian image. I don't understand what is wrong  >:(

rouvas

Try with the following in the /etc/network/interfaces :


auto wlan6
allow-hotplug wlan6
iface wlan6 inet dhcp
  wpa-ssid "your ssid"
  wpa-psk "your key"

auto wlan7
allow-hotplug wlan7
iface wlan7 inet dhcp
  wpa-ssid "your ssid"
  wpa-psk "your key"


The wlan6 and wlan7 interfaces are needed depending on which WIFI toggle you are using.

splite

@rouvas, this is what I have already, I tried again, same thing :

olimex@a20-OLinuXino:~$ sudo ifup wlan6
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/

Cannot find device "wlan6"
Bind socket to interface: No such device
Failed to bring up wlan6.


Anything wrong with DHCP ? It working without any problem over Ethernet...

Gerrit

Quote from: splite on November 27, 2014, 11:32:27 AM
Here is what dmesg says :
[ 1273.300434] ehci_irq: port change detect
[ 1273.309966] hub 2-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
[ 1273.321060] usb 2-1: USB disconnect, device number 3
[ 1273.605598] usb 2-1: new high-speed USB device number 4 using sw-ehci

Nothing wrong for me...

nothing wrong but not complete also, the part relating the usd device to a driver is missing.

I looked up the ID 0846:9041 in the kernel source and it is related to the rtl8192cu module which is not by default in the olimex image

Device Drivers -> Network device support ->  Wireless LAN
<M>     Prism54 SPI (stlc45xx) support 
[*]       Include fallback EEPROM blob
<M>   Ralink driver support  --->
< >   Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter      <------- Add this one
<M>   TI wl1251 driver support  --->
<M>   TI wl12xx driver support  --->
<M>   ZyDAS ZD1211/ZD1211B USB-wireless support
[ ]     ZyDAS ZD1211 debugging
<M>   Marvell WiFi-Ex Driver
<M>     Marvell WiFi-Ex Driver for SD8787/SD8797
<M>   Realtek 8192C USB WiFi for SW
<M>   Realtek 8188E USB WiFi
<M>   Realtek 8189E SDIO WiFi
<M>   Realtek 8723A SDIO WiFi
<M>   Ralink 3070/3370/5370/5372 USB WiFi for SW


So you have to compile it yourself i am afraid

rouvas

From the error message you posted, it seems that interface wlan6 cannot be found.
Have you tried wlan7?

DHCP information is irrelevant at this stage.
FYI in my case, wlan6 is needed for MOD-WIFI-RTL8188(https://www.olimex.com/Products/USB-Modules/MOD-WIFI-RTL8188/) while wlan7 is needed for MOD-WIFI-R5370-ANT(https://www.olimex.com/Products/USB-Modules/MOD-WIFI-R5370-ANT/)

splite

Hoo sh...
@Gerrit thank for the post. I did not think of building a new kernel. Do you have a good tutorial to do this ?


splite

Ok, thank for everything, I'm gonna rebuilt the Kernel.

I'll let you know

splite

Hey all !

I fallowed the step 3 of this tutorial (http://olimex.wordpress.com/2013/11/05/building-the-ultimate-debian-sd-card-for-linux-with-kernel-3-4-for-a20-olinuxino-micro/).

I have everything under linux-sunxi/out/lib/modules/3.4.103+/kernel
total 24
drwxr-xr-x  3 splite splite 4096 déc.   2 14:38 crypto
drwxr-xr-x 31 splite splite 4096 déc.   2 14:38 drivers
drwxr-xr-x  7 splite splite 4096 déc.   2 14:38 fs
drwxr-xr-x  3 splite splite 4096 déc.   2 14:38 lib
drwxr-xr-x 20 splite splite 4096 déc.   2 14:38 net
drwxr-xr-x  5 splite splite 4096 déc.   2 14:38 sound

and
linux-sunxi/arch/arm/boot
drwxr-xr-x 2 splite splite    4096 déc.   2 12:24 bootp
drwxr-xr-x 2 splite splite    4096 déc.   2 14:12 compressed
drwxr-xr-x 3 splite splite    4096 déc.   2 12:24 dts
-rwxr-xr-x 1 splite splite 8940060 déc.   2 14:12 Image
-rw-r--r-- 1 splite splite    1274 déc.   2 12:24 install.sh
-rw-r--r-- 1 splite splite    3641 déc.   2 12:24 Makefile
-rw-r--r-- 1 splite splite 4554016 déc.   2 14:12 uImage
-rwxr-xr-x 1 splite splite 4553952 déc.   2 14:12 zImage


I don't know exactly what to do now, can I just grab the new kernel and use it on my olimex ? How to do ?
I would like to avoid building my system one more time.

Thank a lot !


Gerrit

best to rename your old kernel so you can go back when needed, but its not only replacing uImage, you also need to rename /lib/modules so you can revert it back when needed, and then copy modules from the out/lib directory into the tree from your SD card,most time there is no need to also replace the firmware directory

Once you know what to do its not that much work

make ARCH=arm menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 uImage
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 INSTALL_MOD_PATH=out modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 INSTALL_MOD_PATH=out modules_install

and copy the files to the SD card

splite

Hello,

I made it, not quite easy job ! I went through the step 3, 6 and the end of 8th to copy everything on the SD card.
Doing an lsmod give this :
rtl8192cu              95317  0
rtlwifi                79662  1 rtl8192cu
rtl8192c_common        63675  1 rtl8192cu
mac80211              245642  3 rtlwifi,rtl8192c_common,rtl8192cu

I guess those are the module I activated in the kernel menu, I have same issue when I try to start the wlan...

Any idea ? how can I check that everything went well ? No major error while compiling...

Thank

igorpec

Quote from: splite on December 04, 2014, 12:33:47 AM
Hello,

I made it, not quite easy job ! I went through the step 3, 6 and the end of 8th to copy everything on the SD card.
Doing an lsmod give this :
rtl8192cu              95317  0
rtlwifi                79662  1 rtl8192cu
rtl8192c_common        63675  1 rtl8192cu
mac80211              245642  3 rtlwifi,rtl8192c_common,rtl8192cu

I guess those are the module I activated in the kernel menu, I have same issue when I try to start the wlan...

Any idea ? how can I check that everything went well ? No major error while compiling...

Thank

This driver will work with decent packet loss:
https://github.com/dz0ny/rt8192cu

I got some errors with latest comit so a step back is required - for kernel 3.4

It's compiled (but not enabled) within my image.
linux for ARM development boards
www.armbian.com

splite

Ok ! Finally it's slowly working...

I have been able to do an "ifup wlan6", I'm on a pretty good way but I got this last error.

root@a20-OLinuXino:/home/olimex# insmod /lib/modules/3.4.103+/kernel/drivers/net/wireless/rtl8192cu/8192cu.ko
Segmentation fault

Message from syslogd@a20-OLinuXino at Dec  4 11:24:57 ...
kernel:[ 1298.785417] Internal error: Oops: 807 [#1] PREEMPT SMP ARM


Same when I start to use the wifi I get an "Oops", It's coming from the module in as I had this trace :

Dec  4 09:33:33 a20-OLinuXino kernel: [ 1542.264677] Unable to handle kernel paging request at virtual address bf1372c0
Dec  4 09:33:33 a20-OLinuXino kernel: [ 1542.273573] pgd = ec268000
Dec  4 09:33:33 a20-OLinuXino kernel: [ 1542.278630] [bf1372c0] *pgd=6ebb5811, *pte=00000000, *ppte=00000000
Dec  4 09:33:33 a20-OLinuXino kernel: [ 1542.292252] Internal error: Oops: 807 [#1] PREEMPT SMP ARM
Dec  4 09:33:33 a20-OLinuXino kernel: [ 1542.299564] Modules linked in: 8192cu(+) disp_ump mali_drm drm mali cpufreq_powersave cpufreq_conservative cpufreq_stats cpufreq_userspace sunxi_cedar_mod ump hdmi lcd rtl8192cu rtlwifi rtl8192c_co
mmon mac80211


@igorpec I'm gonna fellow your link and try if it's better