I can't paste / type more than 625 characters in the openwrt console

I was trying to download a torrent with aria when I found out about this. When you paste something with more than 625 characters in length into the openwrt console (with ssh) it gets cut off. Here's the magnet link I was trying to download:

magnet:?xt=urn:btih:4IHYKQEPEPRM7AQ37RKU2YZYHLIJEUWV&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://tracker.coppersurfer.tk:6969/announce&tr=udp://tracker.internetwarriors.net:1337/announce&tr=udp://tracker.leechers-paradise.org:6969/announce&tr=http://tracker.internetwarriors.net:1337/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=http://tracker.opentrackr.org:1337/announce&tr=udp://tracker.zer0day.to:1337/announce&tr=http://explodie.org:6969/announce&tr=http://p4p.arenabg.com:1337/announce&tr=udp://p4p.arenabg.com:1337/announce&tr=http://mgtracker.org:6969/announce&tr=udp://mgtracker.org:6969/announce

Pasting the magnet link into the console is fine but when you add the command aria2c in the beginning, the magnet link gets cut off. Is there a way to get rid of this? I want to be able to paste as many characters as possible, at least 1000 characters in length so that I can download magnet links without a hassle.

Note that pasting more than 625 characters inside vi or vim on openwrt works just fine, it just doesn't work when you paste it right into the console.

You will need to make your own build with larger console buffer length with the following in the .config file:

CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_MAX_LEN=

Can I do this from the Image Builder or do I have to build from scratch ?

EDIT:
There's

CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_MAX_LEN=512

in the .config of my image builder, I can probably do this here. If only I can just compile the busybox only without having to compile the whole firmware.

UPDATE:
I can actually just compile the busybox without compiling the whole firmware, here's how:

  1. Find the option CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_MAX_LEN=512 and change 512 to something bigger, I changed mine to 2048
  2. This is optional but I love to have history on my openwrt so I also enabled this CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_SAVEHISTORY=y
  3. Compile busybox with make package/busybox/compile V=99
  4. Transfer the new busybox to your openwrt with scp
  5. Install the new busybox with opkg install --force-checksum /tmp/busybox*ipk
  6. Reboot your router with reboot
1 Like