Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
toh:aerohive:hiveap-330 [2022/02/16 21:49] – [Photos] added PCB Top and Bottom Side chunkeeytoh:aerohive:hiveap-330 [2022/02/19 18:32] – [Snapshot Releases] new method chunkeey
Line 83: Line 83:
   * This entry will be updated once the device boots with the 5.10 snapshots again.   * This entry will be updated once the device boots with the 5.10 snapshots again.
  
-Connect your PC's ethernet port to the RJ45 port labeled "eth0", and the serial connection to the RJ45 port labeled "console". 
  
-Open the serial connection (9600, 8N1) and power on the AP121.+ 
 +1. setup a network with a tftp server 
 + 
 +Start a tftp server at serverip (192.168.1.101) with the initramfs image in the servers root tftp directory. Having a dhcp server is advantageous. However static IPv4s can be set in the uboot environment later on. 
 + 
 +2. setup console port and pass uboot login challenge 
 + 
 +The AP has a serial port on the RJ45 port labeled "console". This needs special setup see above in the prerequisite section. Open the serial connection (9600, 8N1) on your PC and power on the AP330.
  
 When you see ''Hit the space bar to stop the autoboot process'' ... hit the space bar to stop the autoboot process. Enter the password to access the uboot console, which is either ''AhNf?d@ta06'' or ''administrator''. If neither works, you can try to factory reset the device by pressing and holding the reset button with a needle/paperclip when it is in the stock OS. When you see ''Hit the space bar to stop the autoboot process'' ... hit the space bar to stop the autoboot process. Enter the password to access the uboot console, which is either ''AhNf?d@ta06'' or ''administrator''. If neither works, you can try to factory reset the device by pressing and holding the reset button with a needle/paperclip when it is in the stock OS.
  
-Now is a good time to confirm your bootloader version. Issue the command+3. confirm uboot is supported 
 + 
 +confirm your bootloader version. Issue the command
 <code> <code>
 version version
 </code> </code>
  
-...+Check if the version listed there matches one of the supported uboot version. 
 + 
 +4setup IPv4 connection 
 + 
 +If you are using dhcp, you can just enter ''dhcp'' into the uboot prompt. This will 
 +set you up with an ipv4. 
 + 
 +If you are going the static assignment route. You have to set your IPv4 Address by 
 +entering: ''setenv ipaddr 192.168.1.1'' into the uboot prompt. (This requires that 
 +this IP isn't already taken by another device). 
 + 
 +5. upload initramfs firmware 
 + 
 +The next step is to transfer the OpenWrt binary to the HiveAP-330's memory. 
 +The method depends on what release you want to install. 
 + 
 +==== Snapshot Releases ==== 
 + 
 +If you start out fresh you can preemptively set the new openwrt boot command. 
 +For this to work, the uboot has to be modified (which we do in a later step). 
 +Otherwise, the stock uboot will always use a internal bootcmd that can't be 
 +overwritten and it won't boot the sysupgraded'/installed kernel later. 
 + 
 +<code> 
 +setenv owrt_boot 'setenv bootargs \"console=ttyS0,$baudrate\";bootm 0xEC040000 - 0xEC000000' 
 +save 
 +</code> 
 + 
 +To boot the initramfs, enter the following commands into uboot's prompt:  
 +<code> 
 +setenv bootargs console=ttyS0,$baudrate 
 +tftpboot 1000000 192.168.1.101:mpc85xx-p1020-hiveap-330-initramfs.bin 
 +bootm 
 +</code> 
 + 
 +6. Once OpenWrt booted: 
 +carefully copy and paste this into the root shell. One step at a time. 
 + 
 +6.1 install kmod-mtd-rw from the internet and load it 
 + 
 +  opkg update; opkg install kmod-mtd-rw 
 +  insmod mtd-rw i_want_a_brick=y 
 + 
 +6.2 create scripts that modifies uboot 
 + 
 +  cat <<- "EOF" > /tmp/uboot-update.sh 
 +  . /lib/functions/system.sh 
 +  cp "/dev/mtd$(find_mtd_index 'u-boot')" /tmp/uboot 
 +  cp /tmp/uboot /tmp/uboot_patched 
 +  ofs=$(strings -n80 -td < /tmp/uboot | grep '^ [0-9]* setenv bootargs.*cp\.l' | cut -f2 -d' ') 
 +  for off in $ofs; do 
 +    printf "run owrt_boot;            " | dd of=/tmp/uboot_patched bs=1 seek=${off} conv=notrunc 
 +  done 
 +  md5sum /tmp/uboot* 
 +  EOF 
 + 
 +6.2 run the script to generated a patched uboot 
 + 
 +  sh /tmp/uboot-update.sh 
 + 
 +The script will print out three md5sums to verify that /tmp/uboot and /tmp/uboot_patched are good. You can verify your results with the md5sums in [[toh:aerohive:hiveap-330|Aerohive HiveAP 330 / HiveAP 350]] 
 +    
 +For reference: my md5sum looked like this 
 + 
 +   d84b45a2e8aca60d630fbd422efc6b39  /tmp/uboot 
 +   6dc420f24c2028b9cf7f0c62c0c7f692  /tmp/uboot_patched 
 +   98ebc7e7480ce9148cd2799357a844b0  /tmp/uboot-update.sh <-- just for reference (an extra space/newline will change it) 
 + 
 +6.3 flash the patched uboot 
 + 
 +  mtd write /tmp/uboot_patched u-boot 
 +   
 +This uboot runs the bootcommand in the //owrt_boot// in the uboot environment. You can now upgrade back and forth by 
 +editing this uboot environment variable. 
 + 
 +7. permanent installation 
 + 
 +If you have LuCI (included in Releases), you can now load up LuCI at 192.168.1.1, and use the sysupgrade option to flash the full image to the device using the sysupgrade file for the HiveAP-330. From this point on, any future updates/builds can just be flashed through LuCI. 
 + 
 +If you don't have LuCI, you have to copy over the sysupgrade file via SFTP/SCP/SSH or download it on the device through wget or curl and use sysupgrade -n hiveap-330-sysupgrade.bin to make the installation permanent. 
 +==== (Downgrade) to Releases older or equal to 21.02 ==== 
 + 
 +If you are downgrading from a later snapshot release: You need to set and save the original boot command parameters that were used before the re-partitioning of the device: 
 +<code> 
 +setenv owrt_boot "setenv bootargs root=/dev/ram console=ttyS0,9600 ramdisk_size=700000 cache-sram-size=0x10000; cp.l 0xEC040000 0x2000000 0x500000; bootm 0xEE840000 0x2000000 0xEC000000" 
 +save 
 +</code> 
 + 
 +To run the installation enter the following commands in uboot: 
 +<code> 
 +tftpboot 0x1000000 192.168.1.101:mpc85xx-p1020-hiveap-330-initramfs 
 +tftpboot 0x6000000 192.168.1.101:mpc85xx-p1020-hiveap-330.fdt 
 +bootm 0x1000000 - 0x6000000; 
 +</code> 
 + 
 +Once OpenWrt boots and you have LuCI (included in Releases), you can now load up LuCI at 192.168.1.1, and use the sysupgrade option to flash the full image to the device using the sysupgrade file for the HiveAP-330. From this point on, any future updates/builds can just be flashed through LuCI.
  
 +If you don't have LuCI, you have to copy over the sysupgrade file via SFTP/SCP/SSH or download it on the device through ''wget'' or ''curl'' and use ''sysupgrade -n hiveap-330-sysupgrade.bin'' to make the installation permanent. This will overwrite the existing vendor firmware.
 ===== Troubleshooting/Unbricking ===== ===== Troubleshooting/Unbricking =====
  
  • Last modified: 2024/02/11 21:39
  • by 127.0.0.1