[Solved]How to upload a folder (not file) to OpenWrt router?

I'm trying to upload a repository (https://github.com/NovelSense/Atheros-CSI-Tool-UserSpace-APP) from github which is stored on the Ubuntu machine as a folder to my OpenWrt TL-WDR4300 v1.7 which has a modified version of OpenWrt running (Atheros CSI tool : https://github.com/xieyaxiongfly/OpenWRT_firmware).

I'm aware of scp but can that only be used for files? Apologies, I'm new to OpenWrt.

don't know why you would want it accessible on your router, but click the green button -> Download ZIP, you can then transfer the ZIP to the router, or wget the ZIP using the URL, obtained by right clicking.

Well there is a program which I need to run with specified MAC address which send HT sounding packets to that address. The directory contains both the send and recieve versions of the program. There is already another version of the program available by default on this modified version of OpenWrt firmware that I'm using but I'm trying to increase funtionality which is why I need to run this modified program.

Are you saying I'm able to access the router via the file manager?

I have tried using scp and I get an error:
scp: .: not a regular file

You should be able to run scp from a client on your pc to the router without any additional packages.
If you cannot find a proper scp client, then you can add package openssh-sftp-server in OpenWrt and use Filezilla on your pc.

This is how I'm using it:
scp root@192.168.1.1: NovelSense/Atheros-CSI-Tool-UserSpace-APP/sendData/send_Data /bin

I've also tried:
scp -r root@192.168.1.1: /NovelSense/Atheros-CSI-Tool-UserSpace-APP/sendData /bin

Is this the correct way to use it?

Ok, I'll try Filezilla, thanks.

no space after the :, read the man page.

1 Like

The syntax is wrong.
Should be
scp -r /NovelSense/Atheros-CSI-Tool-UserSpace-APP/sendData root@192.168.1.1:/bin

1 Like

depends on which direction the transfer's going in, but you're probably correct :wink:

I saw both ways so I wasn't sure. Thanks.

Thanks for the help guys, it worked :smile:

First is the source and then the destination.