User Tools

Site Tools


toh:alfa.network:ap121

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Previous revision
toh:alfa.network:ap121 [2013/11/03 12:23]
toh:alfa.network:ap121 [2015/07/30 21:12] (current)
benzea change headline depth
Line 3: Line 3:
 For a detailed description see [[toh:​alfa.network:​Hornet-UB]]. The Hornet UB is the baseboard of the AP121U, which is the AP121 with an USB jack. For a detailed description see [[toh:​alfa.network:​Hornet-UB]]. The Hornet UB is the baseboard of the AP121U, which is the AP121 with an USB jack.
  
-The AP121 design is very similar ​like the Atheros AP121 reference design which is the base design of many routers. See AP121 tag below.+The AP121 design is very similar ​to the Atheros AP121 reference design which is the base design of many routers. See AP121 tag below.
  
 ===== Supported Versions ===== ===== Supported Versions =====
Line 40: Line 40:
 | **[[doc:​hardware:​port.jtag|JTAG]]:​** ​      | [[#​JTAG|?​]] ​ | | **[[doc:​hardware:​port.jtag|JTAG]]:​** ​      | [[#​JTAG|?​]] ​ |
  
-==== Bootlog ====+===== Installation ===== 
 + 
 +See also the [[toh:​alfa.network:​Hornet-UB]] article. 
 + 
 +==== Firmware flashing ==== 
 + 
 +=== Firwmare file fixup === 
 + 
 +At least with OpenWRT Barrier Braker, there is an issue that the tarball is build in the wrong way. The following script can be used to rebuild the firmware image. It requires the firmware file as the first parameter, and a different output filename as the second parameter. The script simply modifies the filenames in the contained tarball to end in ''​.image''​ instead of ''​_image''​. 
 +<code bash> 
 +#! /bin/sh 
 + 
 +SIZE=$(stat -c%s "​$1"​) || exit 1 
 + 
 +tmpdir=$( mktemp -d ) 
 + 
 +tar -xzf "​$1"​ -C "​$tmpdir"​ 
 + 
 +
 + 
 +cd "​$tmpdir"​ 
 + 
 +for f in *_image; do 
 + mv "​$f"​ "$( basename "​$f"​ _image ).image"​ 
 +done 
 + 
 +tar -czf newfw * 
 + 
 +
 + 
 +mv "​$tmpdir/​newfw"​ "​$2"​ 
 + 
 +rm -rf "​$tmpdir"​ 
 + 
 +dd if="​$1"​ bs=1 skip=$(( $SIZE - 0x21 )) >>"​$2"​ 
 + 
 +</​code>​ 
 + 
 +=== Automated flashing with a script === 
 + 
 +You can use this shell script to flash devices that have the original firmware: 
 +<code bash> 
 +#!/bin/sh 
 +  
 +# Pass the firmware image file to be flashed as the first and only 
 +# command line argument. 
 +
 +# Some of the curl calls are probably not quite neccessary. The last 
 +# one uploads the firmware, if the image was OK, then a website is 
 +# returned, otherwise "​Firmware file error" is thrown. 
 + 
 +fw="​$1"​ 
 + 
 +if [ "​x$fw"​ = "​x"​ -o ! -f "​$fw"​ ]; then 
 + echo "​Please specify firmware file as parameter"​ 
 + exit 1 
 +fi 
 + 
 +curl \ 
 +  --user-agent '​Mozilla/​5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/​20100101 Firefox/​12.0'​ \ 
 +  "​http://​192.168.2.1/​login.asp"​ 
 + 
 +curl  \ 
 +  --user-agent '​Mozilla/​5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/​20100101 Firefox/​12.0'​ \ 
 +  --referer '​http://​192.168.2.1/​login.asp'​ \ 
 +  --data '​admuser=admin'​ --data '​admpass=admin'​ \ 
 +  http://​192.168.2.1/​goform/​checkSysAdm 
 + 
 +curl \ 
 +  --user-agent '​Mozilla/​5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/​20100101 Firefox/​12.0'​ \ 
 +  --referer '​http://​192.168.2.1/​index.asp'​ \ 
 +  "​http://​192.168.2.1/​management.asp"​ 
 + 
 +curl \ 
 +  --user-agent '​Mozilla/​5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/​20100101 Firefox/​12.0'​ \ 
 +  --referer '​http://​192.168.2.1/​management.asp'​ \ 
 +  -F filename=@"​$fw"​\;​filename=firmware.img -F uploadFWButton=Upload \ 
 +  "​http://​192.168.2.1/​cgi-bin/​import_settings.cgi"​ 
 +  
 + 
 +</​code>​ 
 + 
 +===== Bootlog ​=====
  
 For comparing with other routers based on AP121 design (i.e. TP-Link) the complete bootlog: For comparing with other routers based on AP121 design (i.e. TP-Link) the complete bootlog:
Line 295: Line 377:
  
  
-==== Tags ====+===== Tags =====
  
 {{tag>​FastEthernet 2NIC 1WNIC DevBoard ar9331 no_switch Serial 802.11bgn 1Ant integrated 32RAM 8Flash MIPS MIPS32 24k AP121 AR7240 AR9331 ath9k}} {{tag>​FastEthernet 2NIC 1WNIC DevBoard ar9331 no_switch Serial 802.11bgn 1Ant integrated 32RAM 8Flash MIPS MIPS32 24k AP121 AR7240 AR9331 ath9k}}
- 
toh/alfa.network/ap121.1383477804.txt.bz2 · Last modified: 2013/11/03 12:23 (external edit)