[How-To] Enable Wireless

This forum is for all other ARMv5 devices

Re: [How-To] Enable Wireless

Postby radtech » Sun Aug 26, 2012 2:28 pm

$this->bbcode_second_pass_quote('takbal', 'M')ine looks like:

$this->bbcode_second_pass_code('', '
ra0 Ralink STA ESSID:"Macinet" Nickname:"RT2860STA"
Mode:Managed Frequency=2.437 GHz Access Point: A0:21:B7:XX:XX:XX
Bit Rate=65 Mb/s
RTS thr:off Fragment thr:off
Encryption key:XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX [2]
Link Quality=100/100 Signal level:-46 dBm Noise level:-70 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
')
If you are using exactly the same software on two pieces of the supposedly same hardware, and one works and the other does not, then indeed something weird is going on. But you are lucky at least to have a working example available.

The most obvious potential reason is that you have unintentionally flashed different kernels on each device (and a wrong one in the non-working case), or have something important difference on the internal drives. Try re-flashing, or comparing the dump of the NAND drives. Compare /usr/local/cloudengines/bin/blparam output on the two devices.

I would also make sure that the same external drive is plugged in the same slot without other drives. A different setup of USB devices may change the memory layout. Then (as recommended by bodhi earlier), a comparative analysis in the system logs may show something: for example, where does dmesg start to differ?

If still nothing comes up, you can try comparing reports in /proc, like iomem, meminfo, bus/pci/devices.


Thanks. I thought the kernel might be the problem so I did a clean install on both plugs. When things were still flaky I re-flashed the pci kernel to both just to make sure everything was identical. I'm planning on opening them both up to verify the hardware is actually identical too just haven't had time. I'm thinking my time might have been better spent locating a replacement but I just hate not knowing why it won't work. I appreciate your assistance.
radtech
 
Posts: 8
Joined: Wed Aug 15, 2012 6:50 pm

Re: [How-To] Enable Wireless

Postby ckiick » Mon Aug 27, 2012 2:57 pm

Hi,
I have a pogoplug-pro that I'm trying to configure for wireless. I installed the kernel and it boots and works fine.
$this->bbcode_second_pass_code('', 'Linux brains 2.6.31.6_SMP_820 #7 SMP Thu Jun 14 20:31:06 CDT 2012 armv6l GNU/Linux
')

However, when following the instructions for configuring wireless, the "ifconfig ra0 up" command causes my plug to drop off the net quite suddenly, and I have to power cycle it to get it back. I think there is something wrong with the driver, but modprobe isn't showing anything.

I have both eth0 and ra0 set to dhcp configure. Here's what my system is showing:
$this->bbcode_second_pass_code('', '
# lspci -nn -k
00:00.0 Network controller [0280]: Ralink corp. RT3090 Wireless 802.11n 1T/1R PCIe [1814:3090]
Subsystem: Ralink corp. RT3090 Wireless 802.11n 1T/1R PCIe [1814:3090]
Kernel driver in use: rt2860
# lsmod
Module Size Used by
rt3390sta 1111860 0
bootled_module 1472 0
gmac 40012 0
mii 6200 1 gmac
# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

ra0 Ralink STA

# ifconfig ra0
ra0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 00:00:00:00:00:00 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 51
')

I'm concerned because iwconfig is not returning enough information, and the ether addr is all 0's.

Can someone give me an idea of what to look for next?

Thanks,
chris@kiicks.net
--
Chris J. Kiick Robot builder and all-around geek.
ckiick
 
Posts: 12
Joined: Tue Jan 03, 2012 4:13 pm

Re: [How-To] Enable Wireless

Postby jziegler » Mon Aug 27, 2012 11:53 pm

I'm seeing a problem similar to radtech. The driver is loaded, ifconfig shows the adapter being up (but assigned an IP that is not my network), but iwlist ra0 scanning shows no networks.

Here's the iwconfig output:

ra0 Ralink STA ESSID:"" Nickname:"RT2860STA"
Mode:Auto Frequency=2.412 GHz Bit Rate=1 Mb/s
RTS thr:off Fragment thr:off
Encryption key:off
Link Quality=10/100 Signal level:0 dBm Noise level:0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0


Any thoughts on this? Are there settings in the config file that I need to change?

Thanks,
James
jziegler
 
Posts: 4
Joined: Mon Aug 13, 2012 12:20 am

Re: [How-To] Enable Wireless

Postby takbal » Wed Aug 29, 2012 11:00 pm

$this->bbcode_second_pass_quote('ckiick', 'H')i,
the "ifconfig ra0 up" command causes my plug to drop off the net quite suddenly, and I have to power cycle it to get it back.


This typically happens when you try to use the old module with the new kernel. Did you install the module I compiled? Your module size suggests that you did not.

The link is

http://www.2shared.com/file/3GAazB_1/rt3390stako.html

Copy it into /usr/lib/modules/2.6.31.6_SMP_820/kernel/drivers/net/wireless, then run 'depmod -a'. After that 'ifconfig ra0 up' should start the interface properly.
takbal
 
Posts: 11
Joined: Mon Aug 06, 2012 4:24 pm

Re: [How-To] Enable Wireless

Postby aendruk » Thu Sep 06, 2012 5:26 pm

I'm also running into this "No scan results" problem. I'm using a POGOPRO-E01 that was flashed with uImage.pci from update-oxnas.tar.gz, a new ArchLinuxARM-2012.07-oxnas-rootfs.tar.gz rootfs, up-to-date packages, wifi-select, CE's original /etc/Wireless/RT2860STA/RT2860STA.dat, and takbal's RT3390 module.

Details:

$this->bbcode_second_pass_code('', '$ uname -a
Linux dispatch 2.6.31.6_SMP_820 #7 SMP Thu Jun 14 20:31:06 CDT 2012 armv6l GNU/Linux
$ sudo /usr/local/cloudengines/bin/blparam
bootdelay=2
baudrate=115200
autoload=n
netmask=255.255.0.0
bootfile="uImage"
kernflmode=s
load_nand=nboot 60500000 0 200000
load_nand2=nboot 60500000 0 800000
boot=bootm 60500000
boot_nand=run load_nand boot || run load_nand2 boot
stdin=serial
stdout=serial
stderr=serial
ethaddr=00:25:31:02:05:14
cesvcid=TUV2EEKYYJ7Q55H5L2CWQC7N9W
ceboardver=PPRO1
serverip=192.168.33.2
ipaddr=192.168.33.195
bootargs_stock=root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes
load_custom_nand=nboot 60500000 0 500000
load_custom_nand2=nboot 60500000 0 B00000
boot_custom=run load_custom_nand boot || run load_custom_nand2 boot
bootargs=root=/dev/sda1 ubi.mtd=2,512 rootfstype=ext3 console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes rootwait
bootcmd=run boot_custom
$ sudo pacman -Syu
:: 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
:: Starting full system upgrade...
there is nothing to do
$ lspci -nn -k
00:00.0 Network controller [0280]: Ralink corp. RT3090 Wireless 802.11n 1T/1R PCIe [1814:3090]
Subsystem: Ralink corp. RT3090 Wireless 802.11n 1T/1R PCIe [1814:3090]
Kernel driver in use: rt2860
$ modinfo rt3390sta
filename: /usr/lib/modules/2.6.31.6_SMP_820/kernel/drivers/net/wireless/rt3390sta.ko.gz
license: GPL
version: 2.4.0.1
srcversion: 616AC36DADDAD824AF48A93
alias: pci:v00001814d00003390sv*sd*bc*sc*i*
alias: pci:v00001814d00003092sv*sd*bc*sc*i*
alias: pci:v00001814d00003091sv*sd*bc*sc*i*
alias: pci:v00001814d00003090sv*sd*bc*sc*i*
depends:
vermagic: 2.6.31.6_SMP_820 SMP mod_unload ARMv6
parm: mac:rt28xx: wireless mac addr (charp)
$ lsmod
Module Size Used by
rt3390sta 893736 1
bootled_module 1472 0
gmac 40012 0
mii 6200 1 gmac
$ iwconfig ra0
ra0 Ralink STA ESSID:"" Nickname:"RT2860STA"
Mode:Auto Frequency=2.412 GHz Bit Rate=1 Mb/s
RTS thr:off Fragment thr:off
Link Quality=10/100 Signal level:0 dBm Noise level:0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0


$ iwlist ra0 scanning
ra0 No scan results

$ iwpriv ra0 get_site_survey
ra0 get_site_survey:
Ch SSID BSSID Security Siganl(%)W-Mode ExtCH NT

')
The following appears in /var/log/messages.log when I run 'sudo modprobe rt3390sta' and 'sudo ifconfig ra0 up':

$this->bbcode_second_pass_code('', '
Sep 6 12:16:18 localhost kernel: [ 184.660000]
Sep 6 12:16:18 localhost kernel: [ 184.660000]
Sep 6 12:16:18 localhost kernel: [ 184.660000] === pAd = c8b9b000, size = 519168 ===
Sep 6 12:16:18 localhost kernel: [ 184.660000]
Sep 6 12:16:18 localhost kernel: [ 184.670000] <-- RTMPAllocTxRxRingMemory, Status=0
Sep 6 12:16:18 localhost kernel: [ 184.670000] <-- RTMPAllocAdapterBlock, Status=0
Sep 6 12:16:18 localhost kernel: [ 184.670000] pAd->CSRBaseAddress =0xf5000000, csr_addr=0xf5000000!
Sep 6 12:16:24 localhost kernel: [ 190.150000] RX DESC ffc15000 size = 2048
Sep 6 12:16:24 localhost kernel: [ 190.160000] Key1Str is Invalid key length(0) or Type(0)
Sep 6 12:16:24 localhost kernel: [ 190.170000] Key2Str is Invalid key length(0) or Type(0)
Sep 6 12:16:24 localhost kernel: [ 190.170000] Key3Str is Invalid key length(0) or Type(0)
Sep 6 12:16:24 localhost kernel: [ 190.180000] Key4Str is Invalid key length(0) or Type(0)
Sep 6 12:16:24 localhost kernel: [ 190.190000] AntDiversity=0
Sep 6 12:16:24 localhost kernel: [ 190.190000] 1. Phy Mode = 9
Sep 6 12:16:24 localhost kernel: [ 190.190000] 2. Phy Mode = 9
Sep 6 12:16:24 localhost kernel: [ 190.190000] NVM is Efuse and its size =2d[2d0-2fc]
Sep 6 12:16:24 localhost kernel: [ 190.200000] NVM is Efuse and the information is too less to bring up interface. Force to use EEPROM Buffer Mode
Sep 6 12:16:24 localhost kernel: [ 190.210000] RtmpOSFileOpen(): Error 2 opening /tmp/RT30xxEEPROM.bin
Sep 6 12:16:24 localhost kernel: [ 190.220000] --> Error opening /tmp/RT30xxEEPROM.bin
Sep 6 12:16:24 localhost kernel: [ 190.220000] RTMPSetPhyMode: channel is out of range, use first channel=1
Sep 6 12:16:24 localhost kernel: [ 190.230000] 3. Phy Mode = 9
Sep 6 12:16:24 localhost kernel: [ 190.300000] MCS Set = 00 00 00 00 01
Sep 6 12:16:24 localhost kernel: [ 190.300000] <==== rt28xx_init, Status=0
Sep 6 12:16:24 localhost kernel: [ 190.300000] 0x1300 = 00064300
Sep 6 12:16:24 localhost kernel: [ 190.310000] AUX_CTRL = 0x 4c02
Sep 6 12:16:24 localhost kernel: [ 190.310000] Read AUX_CTRL = 0x4c02
Sep 6 12:16:24 localhost kernel: [ 190.320000] Write AUX_CTRL = 0x5c02
Sep 6 12:16:24 localhost kernel: [ 190.320000] OSC_CTRL = 0x3ff11
Sep 6 12:16:24 localhost kernel: [ 190.320000] ====> rt30xx Read PowerLevelMode = 0x3.
Sep 6 12:16:24 localhost kernel: [ 190.330000] ====> rt30xx F Write 0x83 Command = 0x3.
Sep 6 12:16:26 localhost kernel: [ 192.150000] ------------[ cut here ]------------
Sep 6 12:16:26 localhost kernel: [ 192.150000] WARNING: at kernel/softirq.c:143 local_bh_enable_ip+0x70/0xa0()
Sep 6 12:16:26 localhost kernel: [ 192.160000] Modules linked in: rt3390sta bootled_module gmac mii [last unloaded: rt3390sta]
Sep 6 12:16:26 localhost kernel: [ 192.160000] [<c0031c10>] (unwind_backtrace+0x0/0xe0) from [<c004baec>] (warn_slowpath_null+0x34/0x4c)
Sep 6 12:16:26 localhost kernel: [ 192.160000] [<c004baec>] (warn_slowpath_null+0x34/0x4c) from [<c0050d14>] (local_bh_enable_ip+0x70/0xa0)
Sep 6 12:16:26 localhost kernel: [ 192.160000] [<c0050d14>] (local_bh_enable_ip+0x70/0xa0) from [<bf197280>] (RtmpAsicSendCommandToMcu+0x344/0x3d0 [rt3390sta])
Sep 6 12:16:26 localhost kernel: [ 192.160000] [<bf197280>] (RtmpAsicSendCommandToMcu+0x344/0x3d0 [rt3390sta]) from [<bf140068>] (AsicAdjustTxPower+0x19d0/0x200c [rt3390sta])
Sep 6 12:16:26 localhost kernel: [ 192.160000] [<bf140068>] (AsicAdjustTxPower+0x19d0/0x200c [rt3390sta]) from [<bf11167c>] (STAMlmePeriodicExec+0x540/0xa48 [rt3390sta])
Sep 6 12:16:26 localhost kernel: [ 192.160000] [<bf11167c>] (STAMlmePeriodicExec+0x540/0xa48 [rt3390sta]) from [<bf111f80>] (MlmePeriodicExec+0x3fc/0x754 [rt3390sta])
Sep 6 12:16:26 localhost kernel: [ 192.160000] [<bf111f80>] (MlmePeriodicExec+0x3fc/0x754 [rt3390sta]) from [<bf139128>] (rtmp_timer_MlmePeriodicExec+0x1c/0x38 [rt3390sta])
Sep 6 12:16:26 localhost kernel: [ 192.160000] [<bf139128>] (rtmp_timer_MlmePeriodicExec+0x1c/0x38 [rt3390sta]) from [<c0055690>] (run_timer_softirq+0x10c/0x208)
Sep 6 12:16:26 localhost kernel: [ 192.260000] [<c0055690>] (run_timer_softirq+0x10c/0x208) from [<c0050bac>] (__do_softirq+0xac/0x150)
Sep 6 12:16:26 localhost kernel: [ 192.260000] [<c0050bac>] (__do_softirq+0xac/0x150) from [<c0050fec>] (irq_exit+0x84/0x8c)
Sep 6 12:16:26 localhost kernel: [ 192.260000] [<c0050fec>] (irq_exit+0x84/0x8c) from [<c002c294>] (do_local_timer+0x54/0x74)
Sep 6 12:16:26 localhost kernel: [ 192.260000] [<c002c294>] (do_local_timer+0x54/0x74) from [<c0334878>] (__irq_svc+0x38/0xc0)
Sep 6 12:16:26 localhost kernel: [ 192.290000] Exception stack(0xc7843f90 to 0xc7843fd8)
Sep 6 12:16:26 localhost kernel: [ 192.290000] 3f80: 072b31ca 00000000 c7843fd8 00000000
Sep 6 12:16:26 localhost kernel: [ 192.290000] 3fa0: c7842000 c7842000 c045c0c4 c04380b4 00000000 410fb025 600240bc 00000000
Sep 6 12:16:26 localhost kernel: [ 192.290000] 3fc0: fffffff4 c7843fd8 c002d53c c002d540 60000013 ffffffff
Sep 6 12:16:26 localhost kernel: [ 192.290000] [<c0334878>] (__irq_svc+0x38/0xc0) from [<c002d540>] (default_idle+0x24/0x28)
Sep 6 12:16:26 localhost kernel: [ 192.290000] [<c002d540>] (default_idle+0x24/0x28) from [<c002d6f0>] (cpu_idle+0x58/0x94)
Sep 6 12:16:26 localhost kernel: [ 192.290000] [<c002d6f0>] (cpu_idle+0x58/0x94) from [<60008084>] (0x60008084)
Sep 6 12:16:26 localhost kernel: [ 192.290000] ---[ end trace 5f2c370cc642a7a0 ]---
')
There are a few suspicious looking items in there. Any advice on what troubleshooting steps I should take next?
aendruk
 
Posts: 6
Joined: Sat Mar 17, 2012 9:13 pm

Re: [How-To] Enable Wireless

Postby ckiick » Mon Sep 17, 2012 1:59 am

For those attempting to use netcfg, it appears that wpa_supplicant will not work with the current rt3390 driver. (The one posted earlier in this thread.) Symptoms are that netcfg fails with "> WPA Authentication/Association Failed" message. Running wpa_supplicant by hand shows "ioctl[SIOCSIWGENIE]: Operation not supported."
When I looked at the sources on pogoplug.com, this indicates that the driver was not compiled with WPA_SUPPLICANT_SUPPORT enabled.
So until the driver gets updated, stick with the iwpriv commands. They definetely work.
--
Chris J. Kiick Robot builder and all-around geek.
ckiick
 
Posts: 12
Joined: Tue Jan 03, 2012 4:13 pm

Re: [How-To] Enable Wireless

Postby takbal » Mon Sep 17, 2012 8:57 pm

Here is the module, compiled with your suggested changes in os/linux/config.mk of

$this->bbcode_second_pass_code('', 'HAS_WPA_SUPPLICANT=y
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y')
The link is:

http://www.2shared.com/file/sb6mQzaA/rt3390_WPA.html

I did not check that it is working however, as I am using iwpriv.
takbal
 
Posts: 11
Joined: Mon Aug 06, 2012 4:24 pm

Re: [How-To] Enable Wireless

Postby ckiick » Tue Sep 18, 2012 3:07 am

How to get wireless (and optionally wired) connection to work with netcfg.

1) Get the right driver.
Big thanks to takbal for the new driver.
Download the driver from http://www.2shared.com/file/sb6mQzaA/rt3390_WPA.html unzip it and copy the rt3390sta.ko.gz file to
/usr/lib/modules/2.6.31.6_SMP_820/kernel/drivers/net/wireless. Then "rmmod rt3390sta; depmod -a; modprobe rt3390sta".

2) Install packages.
pacman -S netcfg wpa_supplicant

3) Create a profile for the wireless connection.
edit /etc/network.d/wireless

$this->bbcode_second_pass_code('', 'CONNECTION='wireless'
DESCRIPTION='Pogoplug Pro wifi connection'
INTERFACE='ra0'
SECURITY='wpa'

TIMEOUT=25
ESSID='<your network>'
## Uncomment if the supplied ESSID is hexadecimal
#ESSID_TYPE='hex'
KEY='<your network password>'

IP='dhcp'

# Uncomment this if your ssid is hidden
#HIDDEN=yes')

4) configure /etc/conf.d/netcfg

$this->bbcode_second_pass_code('', 'NETWORKS=(wireless)
WIRELESS_INTERFACE="ra0"')

5) edit /etc/rc.conf
Remove ra0 configuration from rc.conf, and add netcfg daemons.

$this->bbcode_second_pass_code('', '# INTERFACES=(eth0 ra0)
INTERFACES=(eth0)
# ra0="dhcp"
DAEMONS=(<...> net-profiles net-auto-wireless)')

6) deactivate previous wifi setup, if any.
If you created a script to connect to wifi, make sure the script is not run (ie comment it out of /etc/rc.local).

7) test it.
manually:
ifconfig ra0 down
netcfg wireless

Reboot and then log in to make sure the wifi connection comes up.

Optional instructions to put wired ethernet connection under netcfg.
The advantage to doing this is that it will automatically configure the interface if the wired ethernet plug is pulled and reconnected. I would recommend that you get the wireless part working first, and then do the wired interface.

1) Install ifplugd
pacman -S ifplugd

2) create a profile for the wired connection
edit /etc/network.d/wired and add
$this->bbcode_second_pass_code('', 'CONNECTION='ethernet'
DESCRIPTION='Pogoplug wired connection'
INTERFACE='eth0'
IP='dhcp'
')
3) configure /etc/conf.d/netcfg
$this->bbcode_second_pass_code('', 'NETWORKS=(wireless wired)
WIRED_INTERFACE="eth0"
')
4) edit /etc/rc.conf
Remove setup of eth0 and add net-auto-wired to daemons. Be sure to remove "network" from the DAEMONS list or dhcpcd will get confused.
$this->bbcode_second_pass_code('', '
#interface=eth0
#address=
#netmask=
#broadcast=
#gateway=
# INTERFACE=(eth0)
DAEMONS=(<...> net-profiles net-auto-wireless net-auto-wired)')

5) test it.
Manually
ifconfig eth0 down
netcfg wired

Reboot and make sure that the interface comes up. Check that both the wired and wireless connections are up and have addresses assigned.
--
Chris J. Kiick Robot builder and all-around geek.
ckiick
 
Posts: 12
Joined: Tue Jan 03, 2012 4:13 pm

Re: [How-To] Enable Wireless

Postby Geoff » Wed Sep 19, 2012 6:13 pm

$this->bbcode_second_pass_quote('ckiick', 'B')ig thanks to takbal for the new driver.

And thanks to ckiick for testing out wpa_supplicant with the new driver. I confirm that this version of the new driver works with wpa_supplicant. However, I can't seem to make this version work using dhcpcd directly without wpa_supplicant (it times out while requesting a lease). The version of the driver compiled without support for wpa_supplicant works without wpa_supplicant, but of course not with wpa_supplicant. Did anyone else find the same results? It would be a pain to need to keep both versions of the driver around, for use with and without wpa_supplicant.
Geoff
 
Posts: 231
Joined: Wed Mar 09, 2011 5:14 pm
Top

Re: [How-To] Enable Wireless

Postby ckiick » Fri Sep 21, 2012 6:07 pm

You are right, the iwpriv method doesn't work with the driver compiled for wpa_supplicant. At least not without the magic incantation. In your startup script with the iwpriv commands, add this after the interface is up but before any other iwpriv commands:
$this->bbcode_second_pass_code('', 'iwpriv ra0 set WpaSupport=0')

There is an internal flag called WpaSupplicantUP. (you can see it with "iwpriv ra0 --all") The new driver with wpa support turns this flag on by default. When the flag is set (as far as I can figure out) the driver will not do all the encryption key handling when WPAPSK is set, leaving it up to wpa_supplicant to do it all. So while the passkey is set the encryption key will still be blank. With the flag not set, the driver takes care of that itself. Fortunately, there was an interface to change the flag (had to dig pretty deep to find it though).

Only 1 minor gotcha: if you bring up the wireless connection with iwpriv and then try to start netcfg/wpa_supplicant, it will fail (because of the flag not being set). Just bring the interface down and then use netcfg and it will work.

Have fun,
--
Chris J. Kiick Robot builder and all-around geek.
ckiick
 
Posts: 12
Joined: Tue Jan 03, 2012 4:13 pm

PreviousNext

Return to Community Supported

Who is online

Users browsing this forum: No registered users and 69 guests