Posted: Wed Apr 07, 2021 1:09 Post subject: wget https on limited memory
Hello
I need wget, curl or netcat with https support, and the best way to do it is using Entware, as stated here.
My router has 4/32 MB memory, its possible to use Entware entirely on ramfs? It's a tplink wr740n
Posted: Wed Apr 07, 2021 2:54 Post subject: End goal
Just out of curiosity, what is your end goal in requiring https?
If it is for Command line upgrading the router, just use the ftp link. Works fine. I use it most times. _________________ Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.
QCA Best WiFi Settings
Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one.
Atheros:
Netgear R7800 x3 - WDS AP / station, gateway, QoS
TP-Link Archer C7 v2 x2 - WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - NU
D-Link 615 C1/E3/I1 x 7 - 1 WDS station
D-Link 825 B1 - NU
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - NU
UBNT loco M2 x2 - airOS
Broadcom
Linksys EA6400 - Gateway, QoS
Asus N66U - AP
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - switch
Posted: Wed Apr 07, 2021 10:48 Post subject: Re: End goal
ian5142 wrote:
Just out of curiosity, what is your end goal in requiring https?
If it is for Command line upgrading the router, just use the ftp link. Works fine. I use it most times.
It's to automatically login on a hotspot portal, need to do it every 15 minutes.
Works fine from PC with Linux, but will be better porting it to router. _________________ In use, community ISP:
1 tplink WR842ND; 2 WR741N; 3 WR740N : with DD-WRT
1 mymax WR934-BK "original" firmware
1 d-link dsl-2740e with Totolink ND300
2 Sagem F@ST2704 with OpenWrt
1 wavlink ND300
1 wrt54g
waiting:
1 wrt54g
airgrid m5 bullet
Just resolved my issue by compiling wget from openwrt SDK for my router.
You need to use the SDK downloaded for you router, its on Supplementary files section on the page where the router build is listed, in my case for tl-wr740n:
https://downloads.openwrt.org/releases/18.06.2/targets/ar71xx/tiny/
The process using SDK is quite straightforward:
Once downloaded and inside the root folder of SDK:
Install dependencies needed for build system and the code for your packages.
And then
Code:
./scripts/feeds install wget #or pkg you want to build
Code:
make package/wget/compile
The .ipk is inside <SDK_root_dir>/bin/packages/mips_24kc/packages
Extract them using
Code:
tar zxpvf package.ipk
Inside data.tar.gz you can find the binary for the program.
Just place it on the ./tmp folder of the router, chmod and execute it.
If it has dependencies, they will appear
Code:
Error loading shared library libpcre.so.1: No such file or directory (needed by /tmp/wget-ssl)
Error loading shared library libssl.so.1.0.0: No such file or directory (needed by /tmp/wget-ssl)
Error loading shared library libcrypto.so.1.0.0: No such file or directory (needed by /tmp/wget-ssl)
Error loading shared library libz.so.1: No such file or directory (needed by /tmp/wget-ssl)
So extract the libs and links listed above from the same folder you extracted the binary and place it on router in a lib folder on tmp.
Modify LD_LIBRARY_PATH to add that folder:
Code:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/lib
Here you are done.
If needed, download ca certificates to /tmp and use them with parameter --certificate=FILE or just --no-check-certificate .
Need to do the setup after every boot, you can use a startup script, this one is suitable for wr740n router: