[OpenWrt-Devel] wifi Command 'set ssid' failed: -1

2010-04-19 Thread Nuno Gonçalves
Is the message 'set ssid' failed normal?
Latest trunk on Asus WL500GP v1.

r...@openwrt:/# wifi
Command 'set ssid' failed: -1
r...@openwrt:/# dmesg | grep corerev
wl0: wlc_attach: chiprev 2 coreunit 0 corerev 9 cccap 0x640009 maccap
0x0 band 2.4G, phy_type 2 phy_rev 7 ana_rev 3
r...@openwrt:/# cat /etc/config/wireless
config wifi-device  wl0
option type broadcom
option channel  5

config wifi-iface
option device   wl0
option network  lan
option mode ap
option ssid NrSrBerlengas
option encryption psk2
option key  maria+maria

config wifi-iface
option device   wl0
option network  lan
option mode ap
option ssid NrSrMadeira
option encryption psk
option key  francisca
r...@openwrt:/# dmesg
CPU revision is: 00029006
Primary instruction cache 16kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, linesize 16 bytes.
Linux version 2.4.37.9 (n...@ground2) (gcc version 3.4.6
(OpenWrt-2.0)) #3 Mon Apr 19 08:50:56 WEST 2010
Setting the PFC to its default value
Determined physical RAM map:
 memory: 0200 @  (usable)
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2
init=/etc/preinit noinitrd console=ttyS0,115200
CPU: BCM4704 rev 9 at 264 MHz
Using 132.000 MHz high precision timer.
Calibrating delay loop... 263.78 BogoMIPS
Memory: 30460k/32768k available (1439k kernel code, 2308k reserved,
96k data, 84k init, 0k highmem)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
PCI: Initializing host
PCI: Fixing up bus 0
PCI: Fixing up bridge
PCI: Setting latency timer of device 01:00.0 to 64
PCI: Fixing up bus 1
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Registering mini_fo version $Id$
devfs: v1.12c (20020818) Richard Gooch (rgo...@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
squashfs: version 3.0 (2006/03/15) Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ
SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
b44.c:v0.93 (Mar, 2004)
PCI: Setting latency timer of device 00:01.0 to 64
eth0: Broadcom 47xx 10/100BaseT Ethernet 00:1d:60:15:5f:a3
PCI: Setting latency timer of device 00:02.0 to 64
eth1: Broadcom 47xx 10/100BaseT Ethernet 40:10:18:00:00:2d
Physically mapped flash: Found an alias at 0x80 for the chip at 0x0
Physically mapped flash: Found an alias at 0x100 for the chip at 0x0
Physically mapped flash: Found an alias at 0x180 for the chip at 0x0
 Amd/Fujitsu Extended Query Table v1.3 at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling fast programming due to code brokenness.
Flash device: 0x80 at 0x1c00
bootloader size: 262144
Physically mapped flash: Filesystem type: squashfs, size=0x15f295
Updating TRX offsets and length:
old trx = [0x001c, 0x0904, 0x0007b000], len=0x00201000 crc32=0x60c6a41e
new trx = [0x001c, 0x0904, 0x0007b000], len=0x001e crc32=0x850e33b8
Done
Creating 5 MTD partitions on Physically mapped flash:
0x-0x0004 : cfe
0x0004-0x007f : linux
0x000bb000-0x0022 : rootfs
mtd: partition rootfs doesn't start on an erase block boundary --
force read-only
0x007f-0x0080 : nvram
0x0022-0x007f : rootfs_data
sflash: found no supported devices
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
Linux IP multicast router 0.06 plus PIM-SM
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.8 Ben Greear gree...@candelatech.com
All bugs added by David S. Miller da...@redhat.com
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 84k freed
diag: Detected 'ASUS WL-500g Premium'
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
roboswitch: Probing device eth0: found a 5325! It's a 5350.
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
mini_fo: using base directory: /
mini_fo: using storage 

Re: [OpenWrt-Devel] wifi Command 'set ssid' failed: -1

2010-04-19 Thread Chris Martin
Yes it is normal..

I have looked in to this issue myself.
It occurs because the interfaces are configured twice
Once by the the init scripts and then again by hotplug.
There is a little bit of a race condition and usually the second
configuration is being performed
on an interface that is already up.

Setting the ssid can only be performed when the radio is off.
If it is already on.  You will get the error.

--
Chris Martin
m: 0419812371
--


2010/4/19 Nuno Gonçalves nuno...@gmail.com

 Is the message 'set ssid' failed normal?
 Latest trunk on Asus WL500GP v1.

 r...@openwrt:/# wifi
 Command 'set ssid' failed: -1
 r...@openwrt:/# dmesg | grep corerev
 wl0: wlc_attach: chiprev 2 coreunit 0 corerev 9 cccap 0x640009 maccap
 0x0 band 2.4G, phy_type 2 phy_rev 7 ana_rev 3
 r...@openwrt:/# cat /etc/config/wireless
 config wifi-device  wl0
option type broadcom
option channel  5

 config wifi-iface
option device   wl0
option network  lan
option mode ap
option ssid NrSrBerlengas
option encryption psk2
option key  maria+maria

 config wifi-iface
option device   wl0
option network  lan
option mode ap
option ssid NrSrMadeira
option encryption psk
option key  francisca
 r...@openwrt:/# dmesg
 CPU revision is: 00029006
 Primary instruction cache 16kB, physically tagged, 2-way, linesize 16
 bytes.
 Primary data cache 16kB, 2-way, linesize 16 bytes.
 Linux version 2.4.37.9 (n...@ground2) (gcc version 3.4.6
 (OpenWrt-2.0)) #3 Mon Apr 19 08:50:56 WEST 2010
 Setting the PFC to its default value
 Determined physical RAM map:
  memory: 0200 @  (usable)
 On node 0 totalpages: 8192
 zone(0): 8192 pages.
 zone(1): 0 pages.
 zone(2): 0 pages.
 Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2
 init=/etc/preinit noinitrd console=ttyS0,115200
 CPU: BCM4704 rev 9 at 264 MHz
 Using 132.000 MHz high precision timer.
 Calibrating delay loop... 263.78 BogoMIPS
 Memory: 30460k/32768k available (1439k kernel code, 2308k reserved,
 96k data, 84k init, 0k highmem)
 Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
 Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
 Mount cache hash table entries: 512 (order: 0, 4096 bytes)
 Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
 Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
 Checking for 'wait' instruction...  unavailable.
 POSIX conformance testing by UNIFIX
 PCI: Initializing host
 PCI: Fixing up bus 0
 PCI: Fixing up bridge
 PCI: Setting latency timer of device 01:00.0 to 64
 PCI: Fixing up bus 1
 Linux NET4.0 for Linux 2.4
 Based upon Swansea University Computer Society NET3.039
 Initializing RT netlink socket
 Starting kswapd
 Registering mini_fo version $Id$
 devfs: v1.12c (20020818) Richard Gooch (rgo...@atnf.csiro.au)
 devfs: boot_options: 0x1
 JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications
 AB.
 squashfs: version 3.0 (2006/03/15) Phillip Lougher
 pty: 256 Unix98 ptys configured
 Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ
 SERIAL_PCI enabled
 ttyS00 at 0xb8000300 (irq = 3) is a 16550A
 ttyS01 at 0xb8000400 (irq = 3) is a 16550A
 b44.c:v0.93 (Mar, 2004)
 PCI: Setting latency timer of device 00:01.0 to 64
 eth0: Broadcom 47xx 10/100BaseT Ethernet 00:1d:60:15:5f:a3
 PCI: Setting latency timer of device 00:02.0 to 64
 eth1: Broadcom 47xx 10/100BaseT Ethernet 40:10:18:00:00:2d
 Physically mapped flash: Found an alias at 0x80 for the chip at 0x0
 Physically mapped flash: Found an alias at 0x100 for the chip at 0x0
 Physically mapped flash: Found an alias at 0x180 for the chip at 0x0
  Amd/Fujitsu Extended Query Table v1.3 at 0x0040
 number of CFI chips: 1
 cfi_cmdset_0002: Disabling fast programming due to code brokenness.
 Flash device: 0x80 at 0x1c00
 bootloader size: 262144
 Physically mapped flash: Filesystem type: squashfs, size=0x15f295
 Updating TRX offsets and length:
 old trx = [0x001c, 0x0904, 0x0007b000], len=0x00201000
 crc32=0x60c6a41e
 new trx = [0x001c, 0x0904, 0x0007b000], len=0x001e
 crc32=0x850e33b8
 Done
 Creating 5 MTD partitions on Physically mapped flash:
 0x-0x0004 : cfe
 0x0004-0x007f : linux
 0x000bb000-0x0022 : rootfs
 mtd: partition rootfs doesn't start on an erase block boundary --
 force read-only
 0x007f-0x0080 : nvram
 0x0022-0x007f : rootfs_data
 sflash: found no supported devices
 Initializing Cryptographic API
 NET4: Linux TCP/IP 1.0 for NET4.0
 IP Protocols: ICMP, UDP, TCP, IGMP
 IP: routing cache hash table of 512 buckets, 4Kbytes
 TCP: Hash tables configured (established 2048 bind 4096)
 Linux IP multicast router 0.06 plus PIM-SM
 NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
 NET4: Ethernet Bridge