Uploading with curl

I'm trying to upload a firmware while in the download directory of the firmware, using:

curl -F "firmware=@/Downloads/DCS-932L/openwrt/openwrt-18.06.8-ramips-rt305x-dcs-930-squashfs-factory.bin" http://192.168.0.20

And I get:

quote>

I tried single ' and double " and the results are the same.

And the file is not uploaded. I haven't used curl before, so that's part of the problem. Can someone PLEASE walk me through it.
Thanks a lot!

You might want to read the curl documentation... but there is another (easier) way...

Is the file already downloaded to your computer? If so, just use scp to copy it to your router.
from your computer:

scp < filename > root@< router IP >:/tmp/

You should also verify that you're using the right image for your specific variant... info here:

Finally, it is worth noting that 18.06 has been EOL for years and is unsupported. It has numerous known security vulnerabilities. I realize that your device is a camera (different use case than a normal router, of course) and that 18.06 is the latest version for your model, so there's not a lot you can do... but please take appropriate precautions with respect to securing your device, or consider buying new devices when appropriate.

1 Like

Thanks a lot.

Thanks for the warning. This is only to watch birds.

With scp:

scp openwrt-18.06.8-ramips-rt305x-dcs-930-squashfs-factory.bin admin@192.168.0.20:/tmp/

I get:

ssh: connect to host 192.168.0.20 port 22: Operation timed out
lost connection

But I'm not asking for port 22, in fact, I think this old crap only uses port 21.
I tried 'root' as well, no luck. I don't think it uses 'root' the default user is 'admin' and no password.

That would be FTP... so try using an FTP client to "put" the file from your computer to the camera.

at this late in the day, I'd fight with that 'put' command, which I don't use often some other time.
thanks a lot, however.

FTP is generally quite easy to use, and there are GUI based applications you can run on your computer to make it even easier.

thought I'd give filezilla a chance, but that did not get anywhere.
Screenshot 2023-01-23 at 01.50.54
and osx gives, just to test for connection:

ftp 192.168.0.20
zsh: command not found: ftp

well, I will continue in the morning. this has been headache-fun!

Ftp and telnet have been removed from Mac OS since they are not secure. Same as pptp vpn.

1 Like
  1. Are you sure it's a correct IP?
  2. Less relevant given the error above, but might a deal breaker when you figure out an IP -- did you rename the root user to admin?
1 Like

If you have OpenSSH v9.0 or newer use the -O switch to use SCP as v9.0 and newer use SFTP.

@stangri @psherman @account4538 ; yes, I'm absolutely sure of the ip. the camera has as 'admin' the root user, this is my assumption, because when it's reset, the defaults are: user: admin password: (blank)
how could I rename the 'root user to admin' without re-writing the firmware of the camera?
thanks for your contribution.

this is such an old device, scp/sftp, won't work. curl or basic ftp, I think are the only real solutions to get the firmware to the camera. perhaps someone may suggest the proper line to use curl?

i got the curl line I tried from here by @honken, and adjusted, accordingly, as I posted earlier:

https://forum.openwrt.org/t/support-for-the-d-link-dcs-930l-webcam/89212?u=tmomas

@psherman, i did confirm that I'm using the "A" version, not the "B" version of 18.06.

The post in the link provided doesn't use any quotes at all

@d687r02j8g i also tried without the quotes, but I will try again to make sure.

@d687r02j8g I just tried without any quotes and got this:

curl: (26) Failed to open/read local data from file/application

Am I lost here folks?

The OP's router is running a HTTP-based file server or something?

This won't work.

curl isn't mentioned in the Wiki. Are you following the installation instructions for your device? - https://openwrt.org/toh/d-link/dcs-930l#installation

  • Fire up a web browser and connect to 192.168.0.20
  • Upload your new firmware in the emergency web interface

(The instructions also explain how to activate this Emergency Web Interface.)

1 Like

@account4538 @lleachii
if the web broswer worked, trust me, i won't be wasting your time. the wiki isn't the guide i'm following. here's the guide again, from the wiki:
https://forum.openwrt.org/t/support-for-the-d-link-dcs-930l-webcam/89212

1 Like

It would really be nice to know that post...or why the web GUI interface doesn't work.

This is the forum. I was actually thinking the information needs to go into the Wiki (a.k.a. openwrt.org), if it works. For that, see: Applying for OpenWrt wiki account

@lleachii no one seems to know whey the GUI interface won't work. and that's why @honken had used curl. and all I need now is for someone to troubleshoot with me that curl error message:

curl: (26) Failed to open/read local data from file/application

@honken - any ideas?