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.
usage="USAGE: TL902AC_tftp_recovery.sh <[start | stop]> <complete_path_to_recovery file>"
# OS/System specific variables
# Device specific variables
# TP-Link TL-WR902AC v1
# If we are starting the tftp Server
if [ $1 = start ]
echo Starting revovery mode...
# Check that 2nd argument (recovery image) has been specified (does not validate file)
if [ -z $2 ]
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
# If we are stopping the tftp Server
elif [ $1 = stop ]
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
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.
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?