Litestation

Un article de Toulouse Sans Fil, un réseau wifi libre sur Toulouse.

Accueil | Technique | Litestation

Bien que le Linksys WRT54G constitue la plateforme la plus utilisée sur le réseau TSF, nous étudions également d'autres plateformes telle que la LiteStation2 d'Ubiquity [1] (http://www.ubnt.com/litestation2.php4).

La Litestation est basée sur un processeur Atheros tout en un qui sert aussi de chipset Wifi. Sa puissance d'émission est de 400 mW et ses dimensions très réduites en font un candidat de choix à poser sur un toit. Comme le Linksys WRT54G, la LiteStation2 est supportée par OpenWRT.

Notes de fonctionnement

A priori, pour le moment, il faut changer le bootloader pour pouvoir installer OpenWRT. La version du bootloader en place a la livraison de la Litestation est :

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version UNKNOWN - built 17:31:09, Feb  6 2006

Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.

Board: ap51
RAM: 0x80000000-0x80800000, [0x8003d830-0x807e1000] available
FLASH: 0xbfc00000 - 0xbfff0000, 64 blocks of 0x00010000 bytes each.
== Executing boot script in 1.000 seconds - enter ^C to abort

Voila le dmesg d'origine

RedBoot> cache off
RedBoot> fis load kernel -d -e
Image loaded from 0x80041000-0x801ac5bc
Parsing ELF headers...
Entry point: 0x80168040, address range: 0x80041000-0x80041000
RedBoot> go
CPU revision is: 00019064
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB 4-way, linesize 16 bytes.
Linux version 2.4.27-ubnt0 (ubnt@ubnt-dev) (gcc version 3.3.3) #14 Fri Jan 26 12:06:32 PST 2007
Determined physical RAM map:
 memory: 00800000 @ 00000000 (usable)
On node 0 totalpages: 2048
zone(0): 2048 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS0,9600 console=ttyS0,9600 root=/dev/mtdblock2 rootfstype=squashfs init=/linuxrc ro
Using 92.000 MHz high precision timer.
Calibrating delay loop... 183.50 BogoMIPS
Memory: 6340k/8192k available (1171k kernel code, 1852k reserved, 84k data, 64k init, 0k highmem)
Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 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: 2048 (order: 1, 8192 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Squashfs 2.2-r2 (released 2005/09/08) (C) 2002-2005 Phillip Lougher
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xb1100003 (irq = 37) is a 16550A
MTD driver for SPI flash.
spiflash: Probing for Serial flash ...
spiflash: Found SPI serial Flash.
4194304: size
mtd: adjusted dev mtd2 size from 61440 to 65536 bytes
Creating 7 MTD partitions on "spiflash":
0x00000000-0x00030000 : "RedBoot"
0x00030000-0x00100000 : "kernel"
0x00100000-0x003c0000 : "cramfs"
0x003c0000-0x003e0000 : "cfg"
0x003e0000-0x003f0000 : "FIS directory"
0x003ef000-0x003f0000 : "RedBoot config"
mtd: partition "RedBoot config" doesn't start on an erase block boundary -- force read-only
0x003f0000-0x00400000 : "EEPROM"
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 1024)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Ebtables v2.0 registered
NET4: Ethernet Bridge 008 for NET4.0
Bridge firewalling registered
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 64k freed
Algorithmics/MIPS FPU Emulator v1.5
Checking configuration ....[passwd][group][login.defs][profile][hosts][host.conf][fstab][udhcpc/udhcpc][startup.list][servi.Executing   init...
Using /lib/modules/ae531x.o
Warning: loading ae531x will taint the kernel: non-GPL license - Atheros
  See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Using /lib/modules/gpio.o
Using /lib/modules/ar531xwatchdog.o
Warning: loading ar531xwatchdog will taint the kernel: non-GPL license - Atheros
  See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Using /lib/modules/net/ath_hal.o
Warning: loading ath_hal will taint the kernel: non-GPL license - Proprietary
  See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Using /lib/modules/net/wlan.o
Using /lib/modules/net/wlan_wep.o
Using /lib/modules/net/wlan_acl.o
Using /lib/modules/net/wlan_ccmp.o
Using /lib/modules/net/wlan_tkip.o
Using /lib/modules/net/wlan_xauth.o
Using /lib/modules/net/ath_rate_onoe.o
Using /lib/modules/net/wlan_scan_ap.o
Using /lib/modules/net/wlan_scan_sta.o
Using /lib/modules/net/ath_ahb.o
/etc/rc.d/rc.sysinit: ath0
The kernel doesn't support the ebtables filter table.

flashage depuis le firmware de base. le firmware livré de base etait le suivant : Ubiquiti LiteStation2 Firmware V 1.3.2 (Old Version) j'ai essayé d'uploader le firmware openwrt proposé sur le la page de support de ubiquiti , mais la tentative echoutait.
j'ai ensuite uploadé le firmware version 1.5, et depuis le firmware v1.5 , l'upload d'un firmware third party depuis l'interface web a l'air possible mais donne un message d'avertissement : WARNING: Uploaded firmware is third-party, make sure you're familiar with recovery procedure!

j'uploade ici le firmware LS2 Open WRT Kamikaze v.6279 (Third Party).

le flashage est en deux temps : on uploade via l'interface web le firmware , et ensuite on doit recliquer sur un bouton de l'interface pour réaliser le flashage en lui même. le flashage est tres lent : plus de 3 minutes ne pas perdre patience pendant le flashage la diode readuy est eteinte la machine n'est plsu pinguable pendant toute la phase de flashage. losrque la machine reboote , la page web de l'interface d'upload se ferme toute seule.



lors de l'upload du firmware , les diodes monitorant la qualité de reception s'allument successivement comme un chenillard (periode 5 secondes)

a la fin du flashage apres avoir attendu : pas de ping sur 192.168.1.20 pas de diode ready allumée pas de diode rf allumée, je ressort la console serie, (cable droit je rappelle) : miracle :

BusyBox v1.4.1 (2007-02-09 13:52:27 EET) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
 _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
         |__| W I R E L E S S   F R E E D O M
KAMIKAZE (bleeding edge, r6279) -------------------
 * 10 oz Vodka       Shake well with ice and strain
 * 10 oz Triple sec  mixture into 10 shot glasses.
 * 10 oz lime juice  Salute!
---------------------------------------------------
root@OpenWrt:/# AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
/bin/ash: AT: not found
/bin/ash: c1: not found
[1] + Done(127)                  AT S7=45 S0=0 L1 V1 X4

mount donne ceci :

root@OpenWrt:/# mount
rootfs on / type rootfs (rw)
/dev/root on / type jffs2 (rw)
none on /dev type devfs (rw)
none on /proc type proc (rw)
none on /tmp type tmpfs (rw,nosuid,nodev)
none on /dev/pts type devpts (rw)
none on /sys type sysfs (rw)

attention donc tout est rw ; certaines manips houleuses peuvent mener a la cata.

ifconfig me rapelle a mon manque d'intuition : openwrt a positionné l'adresse ip de la litestation sur 192.168.1.1 par defaut.

telnet fonctionne , je rappelle le principe : au premier boot telnet , ensuite si l'on tape passwd , cela desactive telnet et active ssh.