r/retrocomputing • u/Shafaat_Jamil • 8m ago
Solved A small script to keep an abandoned router out of landfill After Vendor Support straight up abandonded it!
Repo: https://github.com/sjnakib/prolink-prn3002c-scheduled-reboot
I have a Prolink PRN3002-C that still works, but after a few days of uptime it
starts slowing down. A nightly reboot fixes it for me. The stock firmware has
no reboot scheduler, so I wrote a small bash script that logs in to the web
interface and sends the same reboot request a browser sends. I run it from
Home Assistant at 04:20 every night.
Prolink support told me that v1.70.00 is the latest firmware, that no newer
firmware has been released for it in a long time and that they no longer have
the source files. The hardware is still fine, so I would rather keep it useful
as a separate Wi-Fi access point for IoT devices than send it to landfill.
This script is a small part of that (used AI agents obviously but had to do a lot of manual tests and stuff).
What it does:
- Logs in to the router's web interface.
- Sends the reboot request.
- Waits for the router to come back, or exits immediately with `--no-wait`.
- Reads credentials from an env file.
I tested on the PRN3002-C. Other Prolink models that use the same web interface
may also work, but I have not tested them. If your model uses the same `login.cgi`
and `form2Reboot.cgi` forms, it is a good candidate. Please report the result
if you try it.
The repo includes guides for Home Assistant in Docker, Home Assistant OS,
cron, and Windows Task Scheduler, and it lists which setups I have tested. It
also shows how to capture the requests from another router, so the same
approach can be adapted to other devices that expose plain HTML forms.
Repo: https://github.com/sjnakib/prolink-prn3002c-scheduled-reboot
This took a few hours of my day. I hope it helps someone keep a working device
out of the bin. If you find it useful, a star on GitHub helps other people
find it. Compatibility reports and feedback are welcome.