I'm currently on the process of developing an OTA firmware update of a datalogger's esp32 board via a FTP and an EFS module. Since all of the dataloggers I'm working with are in an area where there's no wifi coverage and can't use traditional OTA.
The idea is to use the AT commands of the sim5320 of the datalogger to transfer the binary file via a FTP server using an EFS module and then transfering the file to my esp32. I'm using an EFS module because I tried transfering the file with filezila client and can't send files bigger than 500 bytes, which made the task not at all pragmatic since my file is around 300kb.
I found this AT command that does the task: "AT+CFTPGETFILE Get a file from FTP server to EFS" but I have little idea as to how to implement it.
Has anyone done this before or knows how to implement it?
Related
I have implemented a webdav directory in PHP using Sabre DAV, for my website (Application Server Webinterface).
For this Website I am writing now an TCP Socket using C#, which is running on another server (actualy it is in the same datacenter, but for theoretical sake, it is on the other hemisphere).
The Socket actualy is a service, which can start and stop applications (gameserver in this case). I also have implemented a FTP Service in this socket too (for data transfer).
My Goal:
I want to connect my Web Dav to the FTP-Server of my socket, which means File Listening, Download, Upload. The usecase should be, that a user only connect to a single service. Imagine, my socket is running on more then one server.
If i would implement this with my current know how, i would do it this way:
User Request Web Dav Directory
Server make a file listening of the FTP Server
The file listening is added dynamicly to the Web Dav Directory
Now the user open the directory, and want to download the file:
Web Dav Server request the file from the Ftp server
Web Dav Server provide the downloaded file
Web Dav Server delete the provided file
On the other direction, the WebDav Server will accept a file, and upload it then to the FTP Server.
If the servers are not in the same datacenter, this cost traffic. Anyway, i think it takes some time, if the data are binrary instead of textbased configs. Also, the client side progress bar will not notice, if the download to the webdav server / upload to the ftp server is processed (the user possible think nothing happens).
I hope i have successful communicated, where my problem is.
So how can I implement this, without delegate an upload/download from one server to another? Is this even possible?
Bonus: Would a solution like WebDav to Webdav or FTP to FTP provide a better way of implementing it?
Easy way to achieve this is to have a third party software like webdrive to map the ftp server contents to a drive letter. Then point the webdav server to this drive. Windows also provides option to map a webdav/ftp URL as a drive letter so that the application can access it as if its a local drive.
I Just Got A Free VPS From Upcloud.com
It has VNC Preinstalled, 2 GB Ram, 1 Core Cpu.
I Just Installed PHP and mySQL.
My Vps Ip
http://83.136.252.156/
How do I upload with ftp files to:
/var/www
?
Nooooo!
Don't use that protocol left over from the 70th! It is a nightmare for all firewall administrators.
Use the ssh server instead which you undoubtedly already used for other purposes:
the ssh server offers sub protocols, namely scp and sftp.
You can use sftp from the command line, many modern ftp clients also support this more advanced protocol too. And you don't have to install and configure an additional ftp server which can be painful. And you get strong encryption of your credentials as well.
There are many manuals out there in the internet.
Create yourself a key (much more safe and convenient than using passwords) and go!
upload your files through ftp client called 'Filezilla' or if you have upload facility through control panel itself then well upload from their itself. Create FTP from your control panel and Download filezilla and install it locally on your system and upload by connecting to your server using following details like Host, Username, Password and Port.
But i suggest not to go with free hosting services where they are used one and would have changes to spam access more. Anyhow if your looking for some best and cheap vps hosting services than will suggest for my datacenter provider, which is TRIJIT.
There are 2 machines on a network on which GUI is not installed to save the memory. Transfer a file from 1 such machine to another similar machine.
Possible methods I think could be
1. If we can the other computer on the network, we can put the items into a "shared" folder (or making an existing one "shared').
2. Using the ftp protocol on the command line and connecting to one of the machines acting as ftp server and downloading files from that using command 'get' to download the file
3. Create a TCP connection across the two machines. One machine which is having the file will read it and write it to the socket and another one will read it from the socket.
Could there be more solutions for this?
The usual solution is to use SCP to transfer files using a SSH connection.
I have a requirement where data on SQL server needs to be synced to WP7 devices through USB.
I initially thought of writing a WCF Lib., but it'll go online & sync even if device is connected to USB in local network (Where it's easy & cheaper to get data over local network rather than go to internet & get it).
I have coded isolated storage to save the data synced, but i need an efficient way of getting data from local network, while it's connected to local network.
My questions are:
Is there a way to request data from local network when connected to local network in WCF?
Does someone have a C# code i can use to write synchronization routines to usb over local network? (I would love to have the code, if anyone has this)
Is there a better way of achieving what I'm trying to do?
I'm hoping for some quick answers for this problem, any help is greatly appreciated.
Thanks.
My recommendation would be for your WCF API to have an DNS name pointing to an internal IP address, which is not available outside of the local network and in the routing it will get resolved through USB and another DNS name pointing to an external IP Address which is only available outside of the local network. Your application would try to connect using the local IP address first, which should go through the local network and if it fails it should retry the with external option.
You can use NetworkInterface.NetworkInterfaceType to detect a connection of type Ethernet.
Implementing a full sync protocol is complicated and not something I would recommend attempting unless you really have to.
If you do go down this route I'd recommend using item based message queues and then syncing the queues (and replaying as necessary) rather than trying to sync database tables. It'll depend on the requirements of your application and nature of the data though.
Further to both Murven and Matt's answers, I'd recommend looking into the Microsoft Sync Framework, which supports WP7 as a client, commonly uses WCF on the server, and has great support for a wide range of edge cases.
You can then, as per Matt's answer, watch for connectivity changes and, on USB connection, start a sync to a local IP.
When it comes to targeting mango, you can implement it as a ResourceIntensiveTask and it will run when USB is connected, even if the app isn't running.
I have webrick based HTTP server running on a windows machine and client on a Linux machine.
I would like to transfer ~2GB file from the my client program (which is not a browser) to the server program.
What all is available in Ruby for this??
Webrick is pure ruby and not great at streaming in large amounts of data like that.
What I use for this is nginx with the upload module. Nginx handles the upload to disk, then can issue a callback to something (say a rails app) with the original upload params and the path to the file that was just uploaded. Then you can rename/move it on disk, add its path to DB, etc.