It just so happens that I created a script for enabling and disabling the tftp server and switching my ethernet port between normal dhcp mode and the required tftp configuration. It's not elegant, but got the job done for my 902ac v1.
You'll probably need to make changes to this for your environment, and YMMV.
#!/bin/sh
usage="USAGE: TL902AC_tftp_recovery.sh <[start | stop]> <complete_path_to_recovery file>"
# OS/System specific variables
tftp_dir=/private/tftpboot/
ethport=en1
# Device specific variables
# TP-Link TL-WR902AC v1
# https://openwrt.org/toh/tp-link/tl-wr902ac_v1
ip_addr=192.168.0.66
subnet=255.255.255.0
tl_wr902ac_filename=wr902acv1_un_tp_recovery.bin
tftp_file_path=$tftp_dir$tl_wr902ac_filename
# If we are starting the tftp Server
if [ $1 = start ]
then
echo Starting revovery mode...
# Check that 2nd argument (recovery image) has been specified (does not validate file)
if [ -z $2 ]
then
echo $usage
else
echo "Copying file $2 to $tftp_file_path."
sudo cp $2 $tftp_file_path
echo "Setting ethernet $ethport to $ip_addr $subnet."
# Set the ethernet interface to the expected tftp server address
sudo ipconfig set $ethport manual $ip_addr $subnet
echo "Starting tftp server."
# Enable the tftp service
sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
fi
# If we are stopping the tftp Server
elif [ $1 = stop ]
then
echo Stopping... resuming normal mode
# Disable the tftp service
sudo launchctl unload -F /System/Library/LaunchDaemons/tftp.plist
echo "Deleting file $tftp_file_path"
sudo rm $tftp_file_path
echo "Setting ethernet $ethport to DHCP"
# Set the ethernet interface to back to DHCP for normal operation
sudo ipconfig set $ethport dhcp
else
echo $usage
fi
Here is the general information about setting up the tftp server on the mac.
You will connect your TL-WR902AC via its ethernet port to your mac, and your mac will be configured with the necessary device-specific details that you will find here. That includes renaming the firmware file and copying that to the location mentioned in the general information.
From there, you will trigger the tftp mode simply by powering on the 902ac. According to the information on the device page, 8-seconds after you apply power it will try to connect to the tftp server (running on your mac), and it will automatically pull the firmware file and write it to the flash memory. This may take a little while, but then the device will restart. When you see that happen, unplug the ethernet cable and reconfigure your computer to get an address via DHCP on that ethernet port, then plug the 902ac back in and when it completes booting, you should be able to access it at 192.168.1.1 using your web browser or an ssh session.
Thank you for trying to help, but I'm just not getting it. Feels like info is missing.
I'm just not getting how to trigger the transfer to the 902ac. I have no idea what command to write as I can't find it anywhere.
I'm also struggling with the terminology like the following...
● Configure your network interface for the proper server address for your device. Using System Preferences > Network is perhaps the easiest. (Configure to what?)
● Connect your device to the network interface (Does this mean plug it into your Mac?)
The apps no longer work on my Mac which is at 13.4.1. The OSX completely blocks them.
Also, does this add the Luci interface or do I have to do something else?
The transfer happens automatically -- the 902ac will request the file from the tftp server (on your mac) without any action on your part.
The IP address and subnet mask shown in the device page info link I provided. You need to configure the ethernet port, specifically.
Yes, plug it into your mac's ethernet port. If your mac doesn't have an ethernet port, you need to get a USB ethernet adapter so that you have the ability to connect via ethernet. this is mandatory.
This is not a separate app... there is a built-in tftp server that you just have to enable (follow the commands from the general tftp server on a mac guide I provided earlier).
this is how you flash firmware. The presence of LuCI depends on what firmware you install (OpenWrt snapshots do not have LuCI, stable release versions do (like 22.03.5); the factory firmware is something else entirely, but has a web interface).
---> maybe it's worth asking you this question:
What is the current status of the router? Does it have the factory/vendor firmware on it? Did you install OpenWrt already? If so, what was the specific file you installed? Is it booting properly?
It's basically fine, the issue is I need to add VPN capabilities... I saw a video about the router that was 2 years old and the tp-link UI had the ability to add a VPN. But it's gone now.