OpenWrt One -- config editing solution

I purchased an OpenWrt One a couple months back, and am now trying to configure it. The main issue is that I would prefer to edit config files directly, rather than go via the web or cli interfaces, since it seems to be the best path. And even the manual recommends this approach. However, I can't figure out how to install anything better than the stock vi / vim, which is so impoverished as to be useless. I see that vim-full is a thing, but opkg doesn't show it. I tried scp and sshfs, but they both fail for lack of sftp support in dropbear. What's going on here? How do I get out of these doldrums? Ideally I want to just work with text config files, for the sake of resilience.

Tried installing nano?

Wow...it's pretty much the common standard in Linux (aside from nano). Or are you saying it's missing features?

Works here (from the router) on 24.10.2. I think you referring to simply adding arguments to the client, but uncertain.

  • But if you're copying files using a CLI (I assume that why you mentioned scp in a post about 'editing'), also just use the web GUI to download it?
  • I assume this does mean an issue with scp when ran on the client?
1 Like
opkg update
opkg install nano-full
2 Likes
scp -O srcfile dest:path

But other than that, vi is the de facto editor on every tiny embedded system. I've been using it for 30 years without a problem.

[Yes yes, 30 years without knowing how to exit the editor, I know :slightly_smiling_face: ]

3 Likes

I did opkg list | grep ... and opkg search ... for vi, vim, nano, and got no results. The packages just don't seem to be in the repo. Do I need to add a third party repo?

scp doesn't work, because the default dropbear ssh server doesn't support sftp by default. I searched opkg for anything related to sftp and got nothing.

SCP works, with the additional param posted earlier.

As for opkg, are you still running the RC2 the device ships with ?

1 Like

Yes, it's still the RC2. Is that the problem?

Most likely.

Upgrade to a stable release.

It won't solve the SFTP issue though, you'll still need to force SCP for secure transfers, unless you install a SFTP server.

Okay. I wish that had been mentioned somewhere on the OpenWrt One landing page, but at least I know what to try next. Hopefully nothing in the config needs to change, and I can just restore it after the update.

if you update, you shouldn't really have to restore anythig, since config doesn't usually get wiped.

it never hurts to make a backup anyway.

Sure it does:

Brand Model Supported Current Rel OEM Device Homepage URL FCCID Forum search
OpenWrt One 24.10.2 openwrt.org One

And:
Each Openwrt One comes flashed with the most current OpenWrt Release Firmware available based on the current manufacturing batch date.

1 Like

Oh, absolutely. The basic tiny-vim we deliver is totally deficient, my first act on any new device is to install vim-fuller and scp a reasonable .vimrc to the device.

2 Likes

Yeah, it's missing v for selections, u for undo, and Ctrl+v for visual block mode. I use these all the time, particularly when editing config files: copy a stanza, then paste it somewhere else, then make a few changes etc. Ctrl+V is useful for commenting large regions of text.

Okay, this [edit: the RC2 firmware that shipped with the device] was definitely the main issue. And now I have both sftp support and vim on the device, so I can move on with life. Thanks all.

2 Likes

Are you sure you did opkg update first?

I definitely did. The issue has been resolved -- the RC2 release did not have a number of packages. Switching to a stable release has fixed the problem. Thanks, everyone.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.