OSBRiDGE 5GXi/5XLi OpenWrt HowTo

[Under Construction]

UPDATE 20 June 2009

I’m working with Gabor, the ADM5120 target mantainer of OpenWrt. He’s interested in officially supporting this boards. Our purpose is to dump the original bootloader to build OpenWrt images that doesn’t need bootloader replacement. Stay tuned!
OpenWrt forum discussion is located here: http://forum.openwrt.org/viewtopic.php?id=19682

UPDATE 25 June 2009 12:50

Gabor officially relased the port this morning!
Details here:
https://dev.openwrt.org/changeset/16558
And forum thread here:
http://forum.openwrt.org/viewtopic.php?id=20811
Original bootloader dump should arrive soon!

UPDATE 25 June 2009 13:00

Original bootloader download:
http://www.mediafire.com/file/yuzijibqzi0/5gxi_5xli_bootloader.bin
Courtesy of Gabor 😀

Information found on this page may be partially outdated. I’ll provide a newer version ASAP!

Outer look...

Outer look...

HowTo install OpenWrt Kamikaze 8.09 on OSBRiDGE 5GXi/5XLi wireless CPEs… I’ve been working on this port for months so, please, leave a comment if you find this page useful!
At the moment, works only in NAT mode, no eth0/wlan0 bridging. For this feature, we’ll have to wait for future releases.
If you get poor data rates over your wireless it’s ath5k driver fault, it’s not stable yet, and lot of features arn’t yet implemented. What? Madwifi you say? Oh well, it just don’t fit in our flash while ath5k does! 🙁
And forget dropbear and web interface, there’s no room for them. We’ll use telnet for remote management. (unsecure… I know)

Disclaimer

This is a really dangerous procedure: it may brick your device in many different ways. I reflashed a dozen of these units during my tests, and I never failed.
Opening your OSBRiDGE will void your warranty.
I’ve heard of different hardware revisions. The 5GXi and 5XLi I’ve been working on, report “AW-6000-ABG” on the top of the pcb and “FAB-NF1014” on the bottom. Newer products may have different hardware, since latest firmware changelogs on OSBRiDGE support site reports different firmwares for “classic” and “v2” hardware revision. See reference #6 at the end of the post for details, since there you can check your MAC address to find out your board hardware revision.
I’m Italian. I write in English the best I can! 🙂
You’ve been warned. Now, let’s get down to business.

Requirements

  • Phillips screwdriver
  • PC with serial port
  • NULL Modem cable
  • Avarage Linux knowledge (Advanced for building your own firmware)
  • vi editor familiarity
  • xmodem capable terminal (minicom+sx or HyperTerminal) familiarity or tftp server

Technical Specifications

Soc, flash and rams all together...

SoC, flash and rams all together...

System-on-a-Chip:

Model: Infineon/ADMtek ADM5120
Processor: MIPS 4Kc 32-Bit RISC @175MHz

RAM:

Model: 2x ISSI IS42S32200C1
Size: 16MB

Flash:

Model: Macronix 29LV160CBTC
Size: 2MB

Wireless miniPCI card

Model: Compex WLM54AG 802.11a/b/g
Chipset: Atheros AR5414

WLM54AG, 802.11a/b/g miniPCI card

WLM54AG, 802.11a/b/g miniPCI card

Connectors

1x Fast Ethernet port with passive PoE
1x 12V Power jack
1x miniPCI slot

Serial Connection

Take your favourite Phillips screwdriver and rip open the victim.

RS232 12V Pinout

RS232 12V Pinout

See reference #1 at the bottom of the post for wiring and pinout instructions.

Building your custom Firmware

TODO!

Uploading Firmware

TODO!
Still working with latest OpenWrt trunk changesets that introduced the new OSBRiDGE profile. Pre-built images will be provided soon.

Wireless Configuration

Setting your regulatory domain with ath5k driver.

UPDATE: For recent OpenWrt revisions (since January 2010) check http://www.aracne.name/linnotes/2010/03/setting-wireless-regulatory-domain-in-openwrt/ for newer instructions.

If you live outside US (like me!) you’ll need to set the correct regulatory domain code in wireless module loading script.
You should modify your /etc/modules.d/20-mac80211 script using vi editor in order to get something like this:

root@OpenWrt:/# cat /etc/modules.d/20-mac80211
cfg80211 ieee80211_regdom=EU
mac80211
root@OpenWrt:/# reboot

Valid parameters are US (default) EU (European Countries) JP (Japan). Choose the one matching your needs. Upon reboot your wifi card will use frequencies and txpower limits according to your local laws. See reference #4 for details.

Wi-Fi Client configuration.

Let’s set up the connection to the AP. Make your /etc/config/wireless look like this:

root@OpenWrt:~# cat /etc/config/wireless

config 'wifi-device' 'wlan0'
        option 'type' 'mac80211'
        option 'disabled' '0'
        option 'txpower' '7dBm'

config 'wifi-iface'
        option 'device' 'wlan0'
        option 'mode' 'sta'
        option 'ssid' 'YOUR_SSID'
        option 'encryption' 'YOUR_ENCRYPTION'
        option 'key' 'YOUR_SECRET'
        option 'network' 'wan'

To calculate the right wlan0.txpower parameter you need to know the max output power allowed in your country (30dBm for 5GHz band in Italy) and the antenna gain (23dBi for 5GXi, 15dBi for 5XLi) then, maxpower minus antennagain is the right value to put in there. As you can see from reference #3, YOUR_ENCRYPTION possible values are: wep, psk (WPA-PSK), psk2 (WPA2-PSK), etc…

Network Configuration

Edit you /etc/config/network like this:

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 'proto' 'static'
        option 'netmask' '255.255.255.0'
        option 'dns' ''
        option 'gateway' ''
        option 'ipaddr' '192.168.10.1'

config 'interface' 'wan'
        option 'ifname' 'wlan0'
        option 'proto' 'static'
        option 'netmask' '255.255.255.0'
        option 'dns' '192.168.1.1'
        option 'gateway' '192.168.1.1'
        option 'ipaddr' '192.168.1.200'

The IP Addresses listed above are just for reference. Edit them to reflect your network configuration.

Enable Telnet LogIn

First, set your root password. If you won’t, after this steps you’ll end locked out of your router.

root@OpenWrt:/# passwd
Changing password for root
New password: TYPE_YOUR_PASS_HERE
Retype password: RETYPE_YOUR_PASS_HERE
Password for root changed by root
root@OpenWrt:/#

Now OpenWrt has disabled telnet. Re-enable it editing your /etc/init.d/telnet. Make it look like this one:

root@OpenWrt:/# cat /etc/init.d/telnet
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50

start() {
        telnetd -l /bin/login
}

stop() {
        killall telnetd
}
root@OpenWrt:/#

Now reboot. At restart, telnetd will answer to your connections and it’ll ask for your credentials.

Firewall Configuration

By default, Kamikaze firewall set up a NAT from lan to wan interface. So everything works out of the box.

If you want to enable ping to the WAN port of your router add these lines to your /etc/config/firewall:

config rule
        option _name    ping
        option src      wan
        option proto    ICMP
        option target   ACCEPT

To add a port forward, add a config section like this:

config redirect
       option src              wan
       option src_dport        80
       option dest             lan
       option dest_ip          192.168.10.100
       option dest_port        80
       option proto            tcp

Todo

  • LED mapping
  • Wifi AP mode

References

  1. Serial pinout: Funkfeuer.at Wiki
  2. Bootloader provided by: Funkfeuer.at Forum
  3. LuCI Reference
  4. Wikipedia: List of WLAN channels
  5. Linux-MIPS.org ADM5120 wiki page
  6. OSBRiDGE software support page
  7. OpenWrt Forum topic about telnet enabling
root@OpenWrt:/#

Tags: , , , , , , ,

  1. dave’s avatar

    Hey nice work. ive followed it perfectly and mine is working. How ever How do you Make the changes to the scripts using the VI editor. that part it confusing me.
    or is there telnet commands to change some of the device settings..

    Hope you will get in touch
    ——-
    Hey lavoro piacevole. il ive lo ha seguito perfettamente e mio sta funzionando. Quanto mai come fate i cambiamenti agli scritti usando il redattore VI. quella parte esso che lo confonde. o è ci ordini del telnet cambiare alcune delle regolazioni del dispositivo. Speranza che vi metterete in tocco

  2. Mattia’s avatar

    VI is a console text editor, to use it you need to log into the terminal via serial console or via telnet.

    Once you log into openwrt, and get this prompt:
    root@OpenWrt:/#
    type:
    vi path/filename
    to start edit “filename”

    Using vi isn’t easy the first times. You should take a look to the manual pages of vi editor, or read some tutorials like this one:
    http://www.eng.hawaii.edu/Tutor/vi.html

    Bye!!!

  3. Debiano’s avatar

    Ciao, sto per abbandonare openwrt (ho problemi con il bridging delle interfaccie su un 5xli) come posso ritornare al firmware originale della osbridge ? sempre che si possa fare 😀
    Grazie…
    Ciauz

  4. Mattia’s avatar

    Ciao, al momento sto lavorando con Gabor anche per questo.
    è già riuscito a copiare il bootloader originale, e tra non molto dovremmo aver la possibilità di installare OpenWrt senza cambiare il bootloader.
    Appena ci saranno novità le scriverò qui, farò anche in modo di creare un immagine del bootloader originale il prima possibile!
    Ciao!

  5. Debiano’s avatar

    Ciao Mattia…grazie per la risposta… visto che dovrei usare questo 5xli in questi giorni…mi puoi aiutare in qualche modo ?
    Ripristinando il firmware ?
    Usando l’openwrt con parprouted (se magari hai gia’ il bin compilato) ?
    Ho provato con dd-wrt…ma vuole il codice di attivazione…e visto che ho contribuito anche io a sviluppare dd-wrt…mi sono incazzato e l’ho mandato a fan…. alla faccia del free opensource !
    Ciauz 😀

  6. Debiano’s avatar

    Dimenticavo…ho sotto mano anche 4 board basate su chipset ipx4XX se magari mi sai essere di aiuto anche li te ne sarei grato 😛
    ciauz

  7. Mattia’s avatar

    Ciao… allora, prima una buona notizia, Gabor ha appena rilasciato il supporto ufficiale alle OSBRiDGE 5GXi/5XLi (Changeset 16558, 10 minuti fa!), adesso gli chiedo anche se può fare un immagine del bootloader… penso ci metterà 2 secondi 😀

    Stasera quando arrivo a casa provo a fare un immagine che include parprouted in modo da fare il bridge delle interfacce!

  8. Mattia’s avatar

    Ciao, non ho mai avuto a che fare con delle board ipx4XX, quindi non ho materiale ne esperienza a riguardo 🙁

Rispondi

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.