Wireless: Issue to associate to network

151 views
Skip to first unread message

HKAipost

unread,
Jan 20, 2012, 5:53:34 PM1/20/12
to biffe...@googlegroups.com
Hello, I finally got my dongle working, thanks Nicolas!

Now I have an issue to associate to a network. Here is my config:

==8<===============8<=============
root@OpenWrt:/# cat /etc/config/network
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'

config 'interface' 'lan'
option 'ifname' 'eth0'
option 'hostname' 'Bifferboard'
option 'proto' 'dhcp'

config 'interface' 'wlan'
option 'proto' 'dhcp'

root@OpenWrt:/# cat /etc/config/wireless
config wifi-device wlan0
option type wext
option channel 1

# REMOVE THIS LINE TO ENABLE WIFI:
#option disabled 1

config wifi-iface
option device wlan0
option network wlan
option mode sta
option ssid WRT2
option encryption none
root@OpenWrt:/#
==8<===============8<=============

At bootup i get this:

==8<===============8<=============
root@OpenWrt:/# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11bgn ESSID:"WRT2"
Mode:Managed Frequency:2.412 GHz Access
Point:00:18:84:2D:6C:10
Bit Rate=72.2 Mb/s Tx-Power=20 dBm
RTS thr=2347 B Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=70/70 Signal level=-35 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

root@OpenWrt:/# ifconfig
eth0 Link encap:Ethernet HWaddr 00:B3:F6:00:36:8E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:11890 (11.6 KiB)
Interrupt:10

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 00:A1:B0:60:18:B1
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:11421 (11.1 KiB)
==8<===============8<=============

But when udhcpc has finish his work i get

==8<===============8<=============
root@OpenWrt:/# ifconfig
eth0 Link encap:Ethernet HWaddr 00:B3:F6:00:36:8E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:159 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:65190 (63.6 KiB)
Interrupt:10

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 00:A1:B0:60:18:B1
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:42300 (41.3 KiB)

root@OpenWrt:/# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Frequency:2.412 GHz Access Point:
Not-Associated
Tx-Power=20 dBm
RTS thr=2347 B Fragment thr:off
Encryption key:off
Power Management:off
==8<===============8<=============

We see that wlan0 isn't associated anymore because it doesn't get any ip
I think. as a matter of fact:

==8<===============8<=============
root@OpenWrt:/# udhcpc -i wlan0 -b
udhcpc (v1.18.5) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
==8<===============8<=============

I also gave it a try with a fixed IP it is the same. Any pointer would help.

hka.

Andrew Scheller

unread,
Jan 21, 2012, 10:22:01 AM1/21/12
to biffe...@googlegroups.com
> Hello, I finally got my dongle working, thanks Nicolas!

Yay! :)

> Now I have an issue to associate to a network. Here is my config:

> I also gave it a try with a fixed IP it is the same. Any pointer would help.

Does http://wiki.openwrt.org/doc/uci/wireless help?

Lurch

HKAipost

unread,
Jan 21, 2012, 11:20:39 AM1/21/12
to biffe...@googlegroups.com
On 1/21/12 4:22 PM, Andrew Scheller wrote:
> Does http://wiki.openwrt.org/doc/uci/wireless help?
>
> Lurch
>

Hello Lurch, not really, but this one helped a little:
http://wiki.openwrt.org/doc/recipes/routedclient i used "ifup wan"
instead of "wifi" now it seams to associate, to the signal, but still
don't get IP from DHCP, and if I use static IP. I can't ping the router
either.

Also not that I installed wpa_supplicant I have the following error:
"ioctl[SIOCSIWENCODEEXT]: Invalid argument" but i don't think the
problems come from there.

Still I have no idea where the issue comes from :(
Full log bellow if it can help.

root@OpenWrt:/# ifup wan
Received SIGTERM
Entering released state
rtl8192cu: MAC auto ON okay!
rtl8192cu: Tx queue select: 0x05
rtl8192c: Loading firmware file rtlwifi/rtl8192cufw.bin


udhcpc (v1.18.5) started
Sending discover...

cfg80211: Calling CRDA for country: US
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Received SIGTERM
Entering released state
root@OpenWrt:/# udhcpc (v1.18.5) started


Sending discover...
Sending discover...
Sending discover...

root@OpenWrt:/# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11bgn ESSID:"OpenWrt"
Mode:Managed Frequency:2.437 GHz Access Point:
00:0D:0B:83:88:FF
Bit Rate=54 Mb/s Tx-Power=20 dBm


RTS thr=2347 B Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=70/70 Signal level=-35 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

root@OpenWrt:/# ifconfig
eth0 Link encap:Ethernet HWaddr 00:B3:F6:00:36:8E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:170 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:69700 (68.0 KiB)
Interrupt:10

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 00:A1:B0:60:18:B1
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:7191 (7.0 KiB)

root@OpenWrt:/# udhcpc -i wlan0 -b
udhcpc (v1.18.5) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background

root@OpenWrt:/# logread
[...]
Aug 7 04:08:10 OpenWrt kern.info kernel: rtl8192cu: MAC auto ON okay!
Aug 7 04:08:10 OpenWrt kern.info kernel: rtl8192cu: Tx queue select: 0x05
Aug 7 04:08:10 OpenWrt kern.info kernel: rtl8192c: Loading firmware
file rtlwifi/rtl8192cufw.bin
Aug 7 04:08:13 OpenWrt kern.info kernel: rtl8192cu: MAC auto ON okay!
Aug 7 04:08:13 OpenWrt kern.info kernel: rtl8192cu: Tx queue select: 0x05
Aug 7 04:08:13 OpenWrt kern.info kernel: rtl8192c: Loading firmware
file rtlwifi/rtl8192cufw.bin
Aug 7 04:09:57 OpenWrt kern.info kernel: rtl8192cu: MAC auto ON okay!
Aug 7 04:09:57 OpenWrt kern.info kernel: rtl8192cu: Tx queue select: 0x05
Aug 7 04:09:57 OpenWrt kern.info kernel: rtl8192c: Loading firmware
file rtlwifi/rtl8192cufw.bin
Aug 7 04:09:59 OpenWrt kern.debug kernel: wlan0: authenticate with
00:0d:0b:83:88:ff (try 1)
Aug 7 04:09:59 OpenWrt kern.debug kernel: wlan0: authenticated
Aug 7 04:09:59 OpenWrt kern.debug kernel: wlan0: associate with
00:0d:0b:83:88:ff (try 1)
Aug 7 04:09:59 OpenWrt kern.debug kernel: wlan0: RX AssocResp from
00:0d:0b:83:88:ff (capab=0x401 status=0 aid=1)
Aug 7 04:09:59 OpenWrt kern.debug kernel: wlan0: associated
Aug 7 04:10:02 OpenWrt kern.debug kernel: wlan0: deauthenticating from
00:0d:0b:83:88:ff by local choice (reason=3)
Aug 7 04:10:02 OpenWrt kern.info kernel: cfg80211: Calling CRDA for
country: US
Aug 7 04:10:03 OpenWrt kern.debug kernel: wlan0: authenticate with
00:0d:0b:83:88:ff (try 1)
Aug 7 04:10:03 OpenWrt kern.debug kernel: wlan0: authenticated
Aug 7 04:10:03 OpenWrt kern.debug kernel: wlan0: associate with
00:0d:0b:83:88:ff (try 1)
Aug 7 04:10:03 OpenWrt kern.debug kernel: wlan0: RX AssocResp from
00:0d:0b:83:88:ff (capab=0x401 status=0 aid=1)
Aug 7 04:10:03 OpenWrt kern.debug kernel: wlan0: associated

root@OpenWrt:/# cat /etc/config/network
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'

config 'interface' 'lan'
option 'ifname' 'eth0'

option 'hostname' 'NPlug'
option 'proto' 'dhcp'

#config 'interface' 'wlan'
#option 'proto' 'static'
#option 'ifname' 'wlan0'
#option 'ipaddr' '192.168.0.67'
#option 'netmask' '255.255.255.0'
#option 'gateway' '192.168.0.1'

config 'interface' 'wan'
option 'proto' 'dhcp'
option 'ifname' 'wlan0'

root@OpenWrt:/# cat /etc/config/wireless
config 'wifi-device' 'wlan0'
option 'type' 'wext'

option 'channel' '6'

config 'wifi-iface'
option 'device' 'wlan0'

option 'network' 'wan'
option 'mode' 'sta'
option 'ssid' 'OpenWrt'
option 'encryption' 'none'

nicolas le falher

unread,
Jan 21, 2012, 11:28:51 AM1/21/12
to biffe...@googlegroups.com
Try to post your problem on irc channel of Openwrt.
Maybe you get a solution by someone.

Nicolas

HKAipost

unread,
Jan 21, 2012, 12:02:53 PM1/21/12
to biffe...@googlegroups.com
Thanks, I did, btw why did you create the wext.sh? mac80211.sh wasn't
working? For me two do work as bad.

Another question, could you let us know pid:vid of the devices you used
in this how to:
https://groups.google.com/group/bifferboard/browse_thread/thread/b67df618eabbfed6/0803959fc988029c?lnk=gst&q=wifi+openwrt#0803959fc988029c

Best
hka

nicolas le falher

unread,
Jan 21, 2012, 12:13:07 PM1/21/12
to biffe...@googlegroups.com
> Thanks, I did, btw why did you create the wext.sh? mac80211.sh wasn't working? For me two do work as bad.

Someone told me to use  this.
I think because we use a kernel driver (so a wireless extension : http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Linux.Wireless.Extensions.html),
and not a driver already packaged by Openwrt.0bda:8171 Realtek Semiconductor Corp. RTL8188SU 802.11n WLAN Adapter

Nicolas

HKAipost

unread,
Jan 21, 2012, 12:35:34 PM1/21/12
to biffe...@googlegroups.com
On 1/21/12 6:13 PM, nicolas le falher wrote:
> > Thanks, I did, btw why did you create the wext.sh? mac80211.sh wasn't
> working? For me two do work as bad.
>
> Someone told me to use this.
> I think because we use a kernel driver (so a wireless extension :
> http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Linux.Wireless.Extensions.html),
> and not a driver already packaged by Openwrt.

Hmm OK I have to check on that, thanks

Mine is:

0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN

:(

HKAipost

unread,
Jan 22, 2012, 5:46:25 AM1/22/12
to biffe...@googlegroups.com
Hello Nicolas,

Maybe it comes from the 3.0 kernel this association issue, did you try
your wireless dongle under this kernel?

By the way does yours look like this:
http://www.trendnet.com/langen/products/proddetail.asp?prod=190_TEW-648UB&cat=42
or like this:
http://www.newegg.com/Product/Product.aspx?Item=N82E16833320049 ?

By any chance would you try to port linux-2.6.39.4 kernel to the
bifferboard? Maybe openwrt environment isn't yet ready for the 3.0 kernel.

Best
hka.

nicolas le falher

unread,
Jan 22, 2012, 5:56:11 AM1/22/12
to biffe...@googlegroups.com
> Maybe it comes from the 3.0 kernel this association issue, did you try your wireless dongle under this kernel?

I use wext on 2.6.37.6.

Like this one :
http://www.kextech.com/Mini-wireless-usb-apater-no-steel-casing--46.html

> By any chance would you try to port linux-2.6.39.4 kernel to the bifferboard? Maybe openwrt environment isn't yet ready for the 3.0 kernel.

I can take a look, but for me is not the solution.

nicolas le falher

unread,
Jan 22, 2012, 7:08:19 AM1/22/12
to biffe...@googlegroups.com
I prefer prevent you if you search to buy this one.
I've got a problem, if you don't have network activity, device goes to
sleep mode, and you need to relaunch a "wifi up" to get interface
active.

I've not searched where is the problem, I added a script in cron who
make a ping.
With that, device never goes to sleep mode.

Nicolas.

HKAipost

unread,
Jan 22, 2012, 11:19:44 AM1/22/12
to biffe...@googlegroups.com
On 1/22/12 1:08 PM, nicolas le falher wrote:
> I prefer prevent you if you search to buy this one.

Right i should still focus on having mine work. I'm hoping a kernel
bellow 3.0 will work better on openwrt

> I've not searched where is the problem, I added a script in cron who
> make a ping.

Just for information, how often do you have to ping for it to stay
connected?

hka.

nicolas le falher

unread,
Jan 22, 2012, 12:03:31 PM1/22/12
to biffe...@googlegroups.com
> Just for information, how often do you have to ping for it to stay
> connected?

Every hour.

Nicolas

Andrew Scheller

unread,
Jan 22, 2012, 12:29:44 PM1/22/12
to biffe...@googlegroups.com
> By any chance would you try to port linux-2.6.39.4 kernel to the
> bifferboard? Maybe openwrt environment isn't yet ready for the 3.0 kernel.

There's nothing significant about kernel 3.x as opposed to 2.6.x -
it's simply a change in numbering schemes. Kernel 3.0 is basically
kernel 2.6.40, just with a different label.

Lurch

nicolas le falher

unread,
Jan 22, 2012, 1:06:55 PM1/22/12
to biffe...@googlegroups.com
> There's nothing significant about kernel 3.x as opposed to 2.6.x -
> it's simply a change in numbering schemes. Kernel 3.0 is basically
> kernel 2.6.40, just with a different label.

I agree.

But hka, if you want test, in attachement you will find the archive
with kernel 2.6.39.4.

Nicolas

kern_2.6.39.4.tar.gz

HKAipost

unread,
Jan 23, 2012, 10:50:33 AM1/23/12
to biffe...@googlegroups.com
On 1/22/12 7:06 PM, nicolas le falher wrote:
> But hka, if you want test, in attachement you will find the archive
> with kernel 2.6.39.4.

Many thanks! I will hopefully give it a try this evening!

Reply all
Reply to author
Forward
0 new messages