[How-To] Enable Wireless

This forum is for all other ARMv5 devices

Re: [How-To] Enable Wireless

Postby Geoff » Tue Dec 11, 2012 4:24 am

Thank you; it feels good to me that someone succeeded by following my suggestions. I also have run into the same problem of wifi disconnecting immediately after connecting during boot-up. This seems to happen consistently while using dhcpcd under netcfg/wpa_supplicant, but not while using dhcpcd directly or under the "network" package. Looking at the logfile, it seems that the carrier is lost, at which point the ra0 interface mysteriously goes down and dhcpcd doesn't reconnect. I have found that it is sufficient to "ifconfig ra0 up" or equivalent after booting, and then dhcpcd reconnects and stays connected just fine. For this purpose, I have put the following admittedly cryptic lines into my /etc/rc.local:

Code: Select all
# Re-up ra0 in case it dropped for no good reason.
[[ -n "$(ps -C dhcpcd -o pid=)" && $(cat /sys/class/net/ra0/operstate) != up ]] && ip link set ra0 up >/dev/null 2>&1 || true

My earlier suggestion about using the "-K" flag of dhcpcd doesn't seem to be sufficient. I hope someone can find a better solution.
Geoff
 
Posts: 228
Joined: Wed Mar 09, 2011 5:14 pm

Re: [How-To] Enable Wireless

Postby shv » Fri Dec 21, 2012 6:51 am

Is wifi-select package not available anymore?

Code: Select all
[root@alarm ~]# pacman -Sy wifi-select
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 alarm is up to date
 aur is up to date
error: target not found: wifi-select
Debian @ Pogoplug Pro (actively used)
Debian @ Pogoplug E02
shv
 
Posts: 38
Joined: Fri Dec 21, 2012 6:35 am

Re: [How-To] Enable Wireless

Postby shv » Mon Dec 24, 2012 1:58 pm

How can I get the tools like iwconfig, iwlist, iwpriv, ...?

Furthermore I am getting error messages in the serial console window if I start the wirless network interface:

Code: Select all
[root@alarm ~]# ifconfig ra0 up
[  138.920000] RX DESC ffc15000  size = 2048
[  139.160000] Key1Str is Invalid key length(0) or Type(0)
[  139.170000] Key2Str is Invalid key length(0) or Type(0)
[  139.170000] Key3Str is Invalid key length(0) or Type(0)
[  139.180000] Key4Str is Invalid key length(0) or Type(0)
[  139.190000] AntDiversity=0
[  139.190000] 1. Phy Mode = 9
[  139.190000] 2. Phy Mode = 9
[  139.190000] NVM is Efuse and its size =2d[2d0-2fc]
[  139.200000] NVM is Efuse and the information is too less to bring up interface. Force to use EEPROM Buffer Mode
[  139.210000] RtmpOSFileOpen(): Error 2 opening /tmp/RT30xxEEPROM.bin
[  139.210000] --> Error opening /tmp/RT30xxEEPROM.bin
[  139.220000] RTMPSetPhyMode: channel is out of range, use first channel=1
[  139.230000] 3. Phy Mode = 9
[  139.250000] MCS Set = 00 00 00 00 01
[  139.260000] <==== rt28xx_init, Status=0
[  139.260000] 0x1300 = 00064300
[  139.260000]  AUX_CTRL = 0x                            4c02
[  139.270000]  Read AUX_CTRL = 0x4c02
[  139.270000]  Write AUX_CTRL = 0x5c02
[  139.280000]  OSC_CTRL = 0x3ff11
[  139.280000] ====> rt30xx Read PowerLevelMode =  0x3.
[  139.280000] ====> rt30xx F Write 0x83 Command = 0x3.
[root@alarm ~]# [  140.920000] ------------[ cut here ]------------
[  140.920000] WARNING: at kernel/softirq.c:143 local_bh_enable_ip+0x70/0xa0()
[  140.920000] Modules linked in: bootled_module ext4 jbd2 gmac mii rt3390sta
[  140.920000] [<c0031c10>] (unwind_backtrace+0x0/0xe0) from [<c004baec>] (warn_slowpath_null+0x34/0x4c)
[  140.920000] [<c004baec>] (warn_slowpath_null+0x34/0x4c) from [<c0050d14>] (local_bh_enable


If I removed the driver and start it again I don't run into the same problem:

Code: Select all
[root@alarm ~]# ifconfig ra0 down
[root@alarm ~]# rmmod rt3390sta
[  467.320000] RtmpOSNetDevDetach(): RtmpOSNetDeviceDetach(), dev->name=ra0!
[root@alarm ~]# lsmod
Module                  Size  Used by
bootled_module          1472  0
ext4                  227340  1
jbd2                   56976  1 ext4
gmac                   40012  0
mii                     6200  1 gmac
[root@alarm ~]# modprobe rt3390sta
[  483.310000]
[  483.310000]
[  483.310000] === pAd = c8bf1000, size = 519168 ===
[  483.310000]
[  483.320000] <-- RTMPAllocTxRxRingMemory, Status=0
[  483.320000] <-- RTMPAllocAdapterBlock, Status=0
[  483.330000] pAd->CSRBaseAddress =0xf5000000, csr_addr=0xf5000000!
[root@alarm ~]# ifconfig ra0 up
[  494.460000] RX DESC ffc15000  size = 2048
[  494.700000] Key1Str is Invalid key length(0) or Type(0)
[  494.700000] Key2Str is Invalid key length(0) or Type(0)
[  494.710000] Key3Str is Invalid key length(0) or Type(0)
[  494.720000] Key4Str is Invalid key length(0) or Type(0)
[  494.720000] AntDiversity=0
[  494.720000] 1. Phy Mode = 9
[  494.730000] 2. Phy Mode = 9
[  494.730000] NVM is Efuse and its size =2d[2d0-2fc]
[  494.740000] NVM is Efuse and the information is too less to bring up interface. Force to use EEPROM Buffer Mode
[  494.750000] RtmpOSFileOpen(): Error 2 opening /tmp/RT30xxEEPROM.bin
[  494.750000] --> Error opening /tmp/RT30xxEEPROM.bin
[  494.760000] RTMPSetPhyMode: channel is out of range, use first channel=1
[  494.760000] 3. Phy Mode = 9
[  494.790000] MCS Set = 00 00 00 00 01
[  494.790000] <==== rt28xx_init, Status=0
[  494.800000] 0x1300 = 00064300
[  494.800000]  AUX_CTRL = 0x                            5d42
[  494.810000]  Read AUX_CTRL = 0x5d42
[  494.810000]  Write AUX_CTRL = 0x5d42
[  494.810000]  OSC_CTRL = 0x3ff11
[  494.820000] ====> rt30xx Read PowerLevelMode =  0x3.
[  494.820000] ====> rt30xx F Write 0x83 Command = 0x3.
[root@alarm ~]#


Now it would be nice to execute iwlist ra0 scanning to see if networks can be found but I don't know how to get the wifi-select tools.
Debian @ Pogoplug Pro (actively used)
Debian @ Pogoplug E02
shv
 
Posts: 38
Joined: Fri Dec 21, 2012 6:35 am

Re: [How-To] Enable Wireless

Postby wxtofly » Mon Dec 24, 2012 9:20 pm

I wish WarheadSEs would please change the initial post from this topic as wifi-select does not seem to be part of the packages anymore.
This is out of date in the table of:
https://wiki.archlinux.org/index.php/Wireless_Setup as well.

Instead install: wireless_tools
That does not include iw, you can install it separately.
You will most likely also need wpa_supplicant.
Code: Select all
pacman -Syd wireless_tools iw wpa_supplicant

will also install any needed dependencies.

If someone could point us arch newbies to how we can find out which package that we don't already have provides which programs it would be greatly appreciated.

I've noticed with arch and other distributions, that when changes are made to distributions, unfortunately the heads up about it is not easy to find for the "uninitiated" in that distribution. The old documentation tends to hang around with the mis-information from the "old way" for years. I also note that arch is better about this in the wiki, where I have often seen "This information may be out of date." notations. Some even have pointers to the new information! Fantastic!

Thanks,
TJ
wxtofly
 
Posts: 17
Joined: Mon Dec 24, 2012 3:27 am

Re: [How-To] Enable Wireless

Postby Roberto48 » Wed Dec 26, 2012 10:49 am

Geoff wrote:Thank you; it feels good to me that someone succeeded by following my suggestions.


Yes, I wish it was me.... but I'm still struggling to get WiFi working. I tried all the described methods but still get a time out when running dhcpcd. Also when I'm running Geoff's settings (netcfg wireless) I have got the message
Code: Select all
> WPA Authentication/Association Failed


I changed my router (Netgear WNDR3700) to WPAPSK and TKIP (it was WPA2PSK and AES) but still the same result. The router is working well, the laptop I'm writing this message on is connected by WiFi...

The problem is that I can't see what happens. Is it possible to see any message during the execution of the wireless script?
Maybe it’s also possible to tell me which config files are involved and what the content is to set up the Wireless mode. I’m not so familiar with Linux so maybe I oversee something.

Thanks!
Rob
Roberto48
 
Posts: 12
Joined: Sat Oct 13, 2012 7:24 pm
Location: The Netherlands

Re: [How-To] Enable Wireless

Postby shv » Wed Dec 26, 2012 4:18 pm

I compiled the wireless driver because that files which were provided in this thread didn't work. The driver fits to the upgraded 2.6.31.6 kernel from WarheadsSE from beginning of June 2012 (http://archlinuxarm.org/forum/viewtopic.php?f=29&t=2453).

You can download the driver (v2.4.0.4) from the following link:

Download

You might need to gzip the driver:

Code: Select all
gzip rt3390sta.ko

cp rt3390sta.ko.gz /lib/modules/2.6.31.6_SMP_820/kernel/drivers/net/wireless

You can get the content of /etc/Wireless/RT2860STA/ from the Flash.

Code: Select all
mkdir /tmp/ce
mount -t ubifs -o ro ubi0:rootfs /tmp/ce

mkdir /etc/Wireless

/bin/cp -rfv /tmp/ce/etc/Wireless/RT2860STA /etc/Wireless

You need the following packages:

Code: Select all
pacman -Syd wireless_tools iw wpa_supplicant # Archlinux
apt-get install wireless-tools wpasupplicant # Debian

I just added the following to /etc/network/interfaces (it is Debian configuration and I don't know how to convert this into arch config):

Code: Select all
# uncomment the net line to automatically activate ra0 during startup
#auto ra0

iface ra0 inet dhcp
    wpa-ssid <YourSSID>
    wpa-psk  <YourPSK>

You can start the network with:

Code: Select all
ifconfig ra0 up # Archlinux
ifup ra0 # Debian

You can execute the following commands to see wheter everything is configured well:

Code: Select all
iwconfig
ifconfig
Last edited by shv on Sun Jan 06, 2013 1:32 pm, edited 3 times in total.
Debian @ Pogoplug Pro (actively used)
Debian @ Pogoplug E02
shv
 
Posts: 38
Joined: Fri Dec 21, 2012 6:35 am

Re: [How-To] Enable Wireless

Postby morph027 » Wed Dec 26, 2012 8:06 pm

Thank you...just poking around with my pro for a few days now. Did not get wireless to work.

lsmod shows the module, ifconfig ra0 up is fine, but whatever im setting up using iwpriv, nothing shows up in iwconfig. I'm currently not with my pogoplug (merry x-mas ;) ), but i'll try your driver soon.
morph027
 
Posts: 10
Joined: Sun Dec 23, 2012 10:46 pm

Re: [How-To] Enable Wireless

Postby Geoff » Wed Dec 26, 2012 11:29 pm

morph027 wrote:but whatever im setting up using iwpriv, nothing shows up in iwconfig.

As strange as this may seem, apparently the settings that you change with iwpriv don't show up until after the connection has been negotiated and established successfully by dhcpcd (with or without the help of wpa_supplicant). That's not very helpful for debugging, obviously. I remember someone mentioning that somewhere a long time ago, but I can't find it in this thread.
Geoff
 
Posts: 228
Joined: Wed Mar 09, 2011 5:14 pm

Re: [How-To] Enable Wireless

Postby morph027 » Thu Dec 27, 2012 2:37 pm

This did not happen...there has been no communication between the access point and the pogoplug...I'll try again next week :)
morph027
 
Posts: 10
Joined: Sun Dec 23, 2012 10:46 pm

Re: [How-To] Enable Wireless

Postby bodhi » Thu Dec 27, 2012 9:00 pm

Geoff wrote:
morph027 wrote:but whatever im setting up using iwpriv, nothing shows up in iwconfig.

As strange as this may seem, apparently the settings that you change with iwpriv don't show up until after the connection has been negotiated and established successfully by dhcpcd (with or without the help of wpa_supplicant). That's not very helpful for debugging, obviously. I remember someone mentioning that somewhere a long time ago, but I can't find it in this thread.


Yes, that was my observation a while ago setting up wireless. iwconfig does not show anything until after it was connected :-) not very helpful and actually mislead me a bit because I thought the impriv did not work!
bodhi
 
Posts: 224
Joined: Sat Aug 13, 2011 10:06 am

PreviousNext

Return to Community Supported

Who is online

Users browsing this forum: No registered users and 1 guest