Download of files using WGet


I have a datalogger that creates a number of files which need to be downloaded for analysis.

Has anyone used WGet for this Purpose? Aim is to download all the files on the sd card with a minimum of user interaction.


Let me ping someone that might be able to help, @ParticleD, or @mstanley are you able to assist?


Hey Kyle,

Thanks for reaching out. I know that filesystem storage and SD cards aren’t always straightforward in our ecosystem. This may be something that @rickkas7 can provide additional insight on.

Presumably, if WGet can perform RESTful calls, it should be able to interact with the device directly. Over cellular, HTTP requests are going to be fairly expensive datawise, so I would think this is something you would want to limit to wi-fi only.


It really depends:

  • I presume this is for a Particle device, Photon, Electron, Argon, Boron, Xenon, correct. Which one?
  • Do you really need pull? That is to say the server pulls the files from the device instead of the device pushing the files to the server. The push method is more common and easier to implement.

The most common method is that the device pushes its data files stored on a local SD card to a server using something like HTTP POST or FTP over Wi-Fi or cellular.


Is there a recommended library out there for downloading files to a SD card on a Photon or Electron? I know one would be very useful for a lot of people.


My immediate need is to transfer a batch of files from the SD card on a Photon to a PC although I am exploring to move to use of a Boron n lieu of the Photon.

The recorder generates a 1 Mbyte file during each session (1-2 sessions per day). Patients on a clinical trial take the device home for a period ranging from a week to a month. When it is returned to the hospital we currently open the device, remove the SD card and download the data.

I am looking to batch transfer all the files from the SD card to a PC via WiFi rather than have to open up the box. I do not care whether we trigger the download from the device (it has a 4DSystems display with menus, graphics etc) or the data is pulled from the PC (hence the question re WGET).

I have looked at several threads re FTP transfers but am looking for advice re the simplest method to transfer a substantial number of files in one session.

In the slightly longer term I am looking at transmission of the files at the end of each recording session.

I explored using WiFi to transfer the file following each session but this raises issues with entry of the patients’ modem credentials. Hence the interest in moving to a Boron as a standalone solution. I am initially testing with 3G but as soon as possible plan to move to LTE since decommissioning of the Australian 3G network is to commence in 2020.

There are several options in the Boron case. Although the device samples the sensor at 1-400 Hz the data is only displayed to patients at a 5 Hz rate. For real time tele-medicine operation it should be possible to buffer the 5 Hz data and transmit it using Publish/Subscribe at a 1 Hz rate. That leaves the need to either transfer the full file after each session or recover all the files when the device is returned to the hospital (as for the current Photon version).

Near real time transfer is not practical given Particle charging rates but may be feasible if using a 3rd party SIM (data only plans are typically $10 for 1 GB per month compared to Particle’s A$5 for 3 Mbytes per month). This is for 3G - I have yet to explore the implications of LTE-M1.

If we dump the data once it gets back I either have to do it over the air as above or possibly transfer it via mesh to a Zenon fitted with an SD card (the reverse of Particle’s normal mesh function) or an Argon acting as a gateway.

A third option which is not possible until full BLE functionality is available in the firmware is to pass the data back through BLE to a mobile phone.

Any advice and pointers you can give me would be sincerely appreciated.