• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: AP mode not working  (Read 1425 times)

Karma: 0
Posts: 6

View Profile
« on: June 11, 2010, 07:20:15 AM »


I have a guru plus server plus and it fails to reboot to AP Mode. I have an ethernet cable that I have attached to my home router and attached to eth0. The plusg always boots up in wifi client mode. I am not sure how wlan0 is getting up and its driver is getting loaded. Any help will be appreciated. I have included init_setup.sh, rc.local, wlan.sh and dmesg in this post.


# This is called from /etc/rc.local to perform the initial setup.

# We always bootup in AP mode. Delete any stale files
rm -f /etc/wlanclient.mode
SSID=Plug2-uAP-`ifconfig eth0 | awk -F ":" '/HWaddr/ {print $6$7}'`

insmod /root/uap8xxx.ko
ifconfig uap0 up
/usr/bin/uaputl sys_cfg_ssid $SSID
/usr/bin/uaputl bss_start
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
/etc/init.d/udhcpd start
/etc/init.d/dnsmasq start
iptables -A INPUT -i uap0 -p tcp -m tcp --dport 80 -j ACCEPT

# Re-enable bluetooth. In the earlier case, it didn't find the firmware.
#rmmod libertas_sdio libertas btmrvl_sdio btmrvl bluetooth 2>/dev/null
rmmod btmrvl_sdio btmrvl
/etc/init.d/bluetooth start

modprobe btmrvl_sdio
hciconfig hci0 up
hciconfig hci0 piscan
/usr/bin/mute-agent &

# Set leds
echo 1 > `eval ls /sys/class/leds/*plug*\:green\:health/brightness`
echo 1 > `eval ls /sys/class/leds/*plug*\:green\:wmode/brightness`

#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.

mount -a
date 080808082009
mkdir -p /var/cache/apt/archives/partial



# The firmware files are -> sd8688.bin & sd8688_helper.bin
# The firmware files need to be present in /lib/firmware
rmmod libertas_sdio libertas
cp /root/firmware/sd8688* /lib/firmware/
/etc/init.d/udhcpd stop
/etc/init.d/dnsmasq stop

echo 2 > /proc/uap/uap0/hwstatus
ifconfig uap0 down
rmmod uap8xxx

modprobe libertas_sdio

# This will be deleted on bootup.
# Bootup by-default is always AP mode.
touch /etc/wlanclient.mode
# Delete the firmware immediately so that next bootup is in AP mode.
rm -f /lib/firmware/sd8688*

# The newly created interface will be eth(n)
# The following command lists all the available wireless networks
# iwlist <ifc-name> scanning
# To connect to a particular SSID
# iwconfig <ifc-name> <essid>

ifup eth0

#ifconfig wlan0 up
#wpa_supplicant -i wlan0 -c /root/my.conf -B
#iwconfig wlan0 essid "STARAN"
#dhclient3 wlan0
#route add default gateway wlan0

#Set leds for client mode
echo 0 > `eval ls /sys/class/leds/*plug*\:green\:wmode/brightness`
echo 1 > `eval ls /sys/class/leds/*plug*\:red\:wmode/brightness`
dmesg output
Linux version 2.6.32-00007-g56678ec (root@msi-linux-build.marvell.com) (gcc version 4.1.2 20070925 (Red Hat 4.1.2-33.fa1)) #1 PREEMPT Mon Feb 8 03:49:55 PST 2010
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell Plug2L Reference Board
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 131072
free_area_init_node: node 0, pgdat c05881c8, node_mem_map c065f000
  Normal zone: 1024 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 130048 pages, LIFO batch:31
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 256MB 256MB = 512MB total
Memory: 513024KB available (5144K code, 1034K data, 148K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
Console: colour dummy device 80x30
Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Kirkwood: MV88F6281-A1, TCLK=200000000.
Feroceon L2: Cache support initialised.
initial MPP regs: 01111111 11113311 33331111 33333333 00003333 00000222 00000000
  final MPP regs: 01111111 11113311 33331111 33333333 00003333 00000222 00000000
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
        (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
        (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
        (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
Switching to clocksource orion_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 4010, nTxLock = 32080
msgmni has been set to 1002
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
brd: module loaded
loop: module loaded
sata_mv sata_mv.0: version 1.28
sata_mv sata_mv.0: slots 32 ports 1
scsi0 : sata_mv
ata1: SATA max UDMA/133 irq 21
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 481 at 0x000003c20000
Creating 3 MTD partitions on "orion_nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000500000 : "uImage"
0x000000500000-0x000020000000 : "root"
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
ata1: SATA link down (SStatus 0 SControl F300)
UBI warning: ubi_eba_init_scan: cannot reserve enough PEBs for bad PEB handling, reserved 39, need 40
UBI: attached mtd2 to ubi0
UBI: MTD device name:            "root"
UBI: MTD device size:            507 MiB
UBI: number of good PEBs:        4055
UBI: number of bad PEBs:         1
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 4055
UBI: number of PEBs reserved for bad PEB handling: 39
UBI: max/mean erase counter: 2/0
UBI: image sequence number: 0
UBI: background thread "ubi_bgt0d" started, PID 454
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:50:43:01:81:b2
net eth1: port 0 with MAC address 00:50:43:01:81:b3
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
mice: PS/2 mouse device common for all mice
rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
i2c /dev entries driver
cpuidle: using governor ladder
cpuidle: using governor menu
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
Registered led device: plug2l:red:health
Registered led device: plug2l:green:health
Registered led device: plug2l:red:wmode
Registered led device: plug2l:green:wmode
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mmc0: new high speed SDIO card at address 0001
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
lib80211_crypt: registered algorithm 'NULL'
Gating clock of unused units
before: 0x00dfc3fd
 after: 0x00cf41d9
rtc-mv rtc-mv: setting system clock to 2009-08-08 08:17:26 UTC (1249719446)
usb 1-1: new high speed USB device using orion-ehci and address 2
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size:   516225024 bytes (504126 KiB, 492 MiB, 4001 LEBs)
UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: zlib
UBIFS: reserved for root:  0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:13.
Freeing init memory: 148K
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
usb 1-1.1: new high speed USB device using orion-ehci and address 3
usb 1-1.1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
Bluetooth: Core ver 2.15
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
libertas_sdio mmc0:0001:1: firmware: requesting sd8688_helper.bin
libertas_sdio mmc0:0001:1: firmware: requesting sd8688.bin
libertas: 00:24:23:1f:ab:a7, fw 10.38.3p49, cap 0x00000303
libertas: wlan0: Marvell WLAN 802.11 adapter
Bluetooth: vendor=0x2df, device=0x9105, class=255, fn=2
scsi 1:0:0:0: Direct-Access     Generic  STORAGE DEVICE   9909 PQ: 0 ANSI: 0
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] Attached SCSI removable disk
scsi 1:0:0:1: Direct-Access     Generic  STORAGE DEVICE   9909 PQ: 0 ANSI: 0
sd 1:0:0:1: Attached scsi generic sg1 type 0
sd 1:0:0:1: [sdb] Attached SCSI removable disk
usb-storage: device scan complete
NET: Registered protocol family 10
ADDRCONF(NETDEV_UP): eth1: link is not ready
ADDRCONF(NETDEV_UP): eth0: link is not ready
eth0: link up, 100 Mb/s, full duplex, flow control disabled
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (8022 buckets, 32088 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
wlan0: no IPv6 routers present
Bluetooth: L2CAP ver 2.14
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: vendor=0x2df, device=0x9105, class=255, fn=2
Bridge firewalling registered
Bluetooth: SCO (Voice Link) ver 0.6
Bluetooth: SCO socket layer initialized
eth0: no IPv6 routers present


Pages: [1]
Jump to: