I'm glad someone else is looking at the air-gateway as well. Here was
my approach:
I added the following to the bottom of mach-ubnt-xm.c
#define AIRGW_MAC0_OFFSET 0x0000
#define AIRGW_MAC1_OFFSET 0x0006
#define AIRGW_CALDATA_OFFSET 0x1000
static struct gpio_led ubnt_airgateway_gpio_leds[] __initdata = {
{
.name = "ubnt:blue",
.gpio = 0,
}, {
.name = "ubnt:white",
.gpio = 1,
},
};
static void __init ubnt_airgateway_setup(void)
{
u32 t;
u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
t = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP);
t |= AR933X_BOOTSTRAP_MDIO_GPIO_EN;
ath79_reset_wr(AR933X_RESET_REG_BOOTSTRAP, t);
ath79_register_m25p80(NULL);
ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_airgateway_gpio_leds),
ubnt_airgateway_gpio_leds);
ath79_init_mac(ath79_eth1_data.mac_addr,
art + AIRGW_MAC0_OFFSET, 0);
ath79_init_mac(ath79_eth0_data.mac_addr,
art + AIRGW_MAC1_OFFSET, 0);
ath79_register_mdio(0, 0x0);
ath79_register_eth(1);
ath79_register_eth(0);
ath79_register_wmac(art + AIRGW_CALDATA_OFFSET, NULL);
ath79_register_usb();
}
MIPS_MACHINE(ATH79_MACH_UBNT_AIRGW, "UBNT-AGW", "Ubiquiti AirGateway",
ubnt_airgateway_setup);
Add an entry to machtypes.h
ATH79_MACH_UBNT_AIRGW, /* Ubiquiti AirGateway */
Add the target/linux/ar71xx/image/Makefile:
$(eval $(call
SingleProfile,UBNTXM,$(fs_64k),UBNTAIRGW,ubnt-air-gateway,UBNT-AGW,ttyATH0,115200,XM,UBNTAirGW,ar933x))
This also builds a separate image, for the air-gateway..
My only problem is that the watchdog isn't working correctly. I get
random reboots on it, i tried applying Felix's ar933x watchdog timer
fix ( i thought that may have been causing it, but didn't seem to help
). Anyway, that's my start, I was able to atleast get it running. The
architecture needs to get cleaned up a bit, hence why I haven't built
any patches and attempted to submit them ( haven't had enough time :-/
)
-- Davey
On Sat, Dec 21, 2013 at 1:58 PM, Federico Lorenzi <[email protected]> wrote:
> Hi all,
>
> The Ubiquiti airGateway [1] is a tiny "POE" (not 802.11af,
> unfortunately) powered AP that clips on to the end of Ubiquiti's POE
> adapters. They intend it to be used as a local repeater for an AP
> mounted off on a pole off on the roof, and as such has dual Ethernet
> ports - one with POE passthrough.
>
> It's based around the AR9280 chipset, just like quite a few TP-LINK
> devices already supported by OpenWRT. Out of the box, if you try to
> flash the firmware for the Ubiquiti AirRouter, it fails.
>
> This is due to a simple magic string mismatch. It expects something
> along the lines of: "UBNTAirGW.ar933x.v6.0.0-OpenWrt-r39036"
>
> After changing the magic string, OpenWRT boots fine, but the WiFi
> doesn't work. As a quick hack (and since I'm currently unfamiliar with
> the correct way of doing things) I went about modifying the existing
> entry for the AirRouter in arch/mips/ath79/mach-ubnt-xm.c
>
> All that needed to be done was for the line "ap91_pci_init(ee, NULL);"
> to be commented out, and for "ath79_register_wmac(ee, mac1);" to be
> added at the end of the function ubnt_airrouter_setup.
>
> With this, the compiled image booted and ran perfectly on the
> airGateway, with WiFi. I haven't tested much beyond basic AP
> functionality, but it seems stable enough. If you manage to open the
> device (for which I had to use a dremel to cut it open...) you'll see
> an unsoldered 3.3V serial port that can be used for debugging.
>
> Cheers,
> Federico
>
> [1] http://dl.ubnt.com/datasheets/airgateway/airGateway_DS.pdf
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel