Uploading with curl

Since it's an OpenWrt forum, I was under impression that OpenWrt is on the receiving end, hence my comment. Good luck with your endeavour.

OP is trying to install OpenWrt. The title and information doesn't make that clear.

1 Like

Yeah, I figured that from @psherman's comments to OP's posts. :wink:
Hence, my comment. :wink:

1 Like

Can you do

ls -l /Downloads/DCS-932L/openwrt/openwrt-18.06.8-ramips-rt305x-dcs-930-squashfs-factory.bin
1 Like

@d687r02j8g , thanks a lot. here's the output of pwd and the command you asked about:

au@au-MacBook-Pro openwrt % pwd
au@au-MacBook-Pro openwrt % ls -l
total 9664
-rw-r--r--@ 1 autumn  staff  4194304 Jan 23 00:00 openwrt-18.06.8-ramips-rt305x-dcs-930-squashfs-factory.bin
au@au-MacBook-Pro openwrt % 

Try adding ~ as the file is in your home directory

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

or explicitly add the path

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

or relative, assuming you are running from /Users/au/Downloads/DCS-932L/openwrt as your current directory

curl -F "firmware=@openwrt-18.06.8-ramips-rt305x-dcs-930-squashfs-factory.bin"
1 Like

@d687r02j8g ., I tried the last one first and got:

au@au-MacBook-Pro openwrt % curl -F "firmware=@openwrt-18.06.8-ramips-rt305x-dcs-930-squashfs-factory.bin"
curl: (7) Couldn't connect to server
au@au-MacBook-Pro openwrt % curl -F "firmware=@openwrt-18.06.8-ramips-rt305x-dcs-930-squashfs-factory.bin"
var count = 90;
function init() { countdown(); }
function countdown()
	document.getElementById('WaitInfo').value = count;
	if (count >= 1) setTimeout('countdown()',1000);
	else top.location.href="";
</script></head><body onload='init()'><center><h1>IMAGE UPLOADED SUCCESSFULLY</h1><p>4194304 bytes uploaded.</p><p>The WEB server is shuting down and the firmware updating will start immediately. Please <font color=red><strong>DO NOT POWER OFF</strong></font> the device. And please wait for <input type='Text' readonly id='WaitInfo' value='90' size='3' style='border-width:0; color:#FF3030; text-align:center'> seconds...</p></center></body></html>%                                                               au@au-MacBook-Pro openwrt % 

camera condition: red light is one. I will let it sit for a few minutes more and unplug power to it? Your thoughts?

Do not unplug it as per the output, the firmware uploaded successfully and is being flashed.

You will get a DHCP address once openwrt has booted. Try connecting to to get to the Luci interface.

the light is still red. i haven't unplugged it since i last wrote. and my ip is still set as suggested in the thread i mentioned earlier: like, so:
Should I change to DHCP? I doubt that will make a difference because the camera is still red, that means the light is red, the light that's normally green when it's functioning. Ideas?

Yes. If the device properly upgraded, it will havea DHCP server running on the lan and will issue an IP in the subnet... your current static IP configuration will not be able to reach the device.

The LEDs are controlled by software... in this case, it is possible that the behavior with OpenWrt is different than the original firmware. Therefore, the LED may not be an accurate indicator of the current status.

I just did, leaving the camera as-is, and I don't get an address.

Good point, but is it time i unplug and re-plug power to the device?

Just to make sure -- you've got a direct physical connection by ethernet between your computer and the camera, correct? There should be no other connections.

@psherman YES! no, other connections. I have DIRECT connection between the device and my laptop.

Ok... try setting the IP address of your computer manually to:
subnet mask

Then try pinging

@psherman excellent results, it would seem:

au@au-MacBook-Pro openwrt % ping                                                                                                               
PING ( 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5

no, it was not:

7 packets transmitted, 0 packets received, 100.0% packet loss

so no response.... it's been an hour or so since you tried flashing it? I think that should be safe to power cycle at this point (although I'm not optimistic that it's going to work).

we have nothing to loose, at this point. and no one else is out there, so, Peter, let's do it! Of course, you'd have to buy me a new camera if I brick it :rofl:

and you're right. red light on. i set ip again as you suggested, ping results were the same, and a visit to url did not produce anything. i think i may now have a brick. but i'd determine that in the morning, when I will reset it again and see if that changes anything. meanwhile, perhaps another idea passes us by....thanks a lot, you've been kind and helpful!