Is file transfer possible?

Hey Guys,

We’ve been using the dash device for command messaging for a few months and it works great. But now the project needs to transfer sample files to a server, each about 2M in size.

Is this possible? I saw a reference to a sockets API on the site but the docs referenced do not have much info and no samples.


  • rock

What type of files are they? Can you encode them to a string and send them to our cloud? Then decode when you consume or store them in your cloud?

Hey Ben,

They are just binary samples from an ADC, sure they can be encoded.

I guess what I’m asking is how? I could not find any samples of sending something that large to the cloud. We’ve only been using SMS with the dash right out of the box.

  • rock

Hmm, I’m not sure I follow. If you are doing an analogRead( ) then the response is a string and you can just send that to our cloud through SerialCloud.println(analogRead(x));

Here is an example of our Hello World sketch which pushes data to our cloud without using SMS. Our docs kinda stink right now. We are close to releasing newly revamped documentation.

int numSends; // counter to count number of sends to Cloud

void setup() {
	// put your setup code here, to run once:
	SerialUSB.println("Hello Cloud example has started...");
	numSends = 0; // count number of sends

void loop() {
	// put your main code here, to run repeatedly:
	// every 60 seconds, send a message to the Cloud
	if((numSends < 6) && (millis() % 60000 == 0)) {
		SerialUSB.println("Sending a message to the Cloud...");
		SerialCloud.println("Hello, Cloud!"); // send to Cloud
		SerialUSB.println("Message sent!");
		numSends++; // increase the number-of-sends counter

Hey Ben,

Background: The dash device is attached to a remote SOC running Linux grabbing samples from and ADC. We need to send that data sample (about 2meg) to the cloud.

So I had a chat session with Ryan today and he cleared up something for us. We could not figure out how to send a large data file (byte stream) just by writing to the device b/c we thought it would only support SMS length. He tells me that it will work with the socket API. Great.

From your post I can now see that we must write our own sketch? That’s fine, we can do that. Is there a programmers guide for writing a custom sketch?

The example you posted looks writing a string but how does a sketch get the data from a host in a parameter?

I realize that these may very very basic questions but I cannot find any docs to tell us how to do this. Is your “Hello World” example using sockets API? Can I send binary data?

When are the new docs going to be published?

  • rock

Yes you will need to write your own code. Here are some resources that will help you:

As for you mentioning the Socket API, that is used for consuming data from our cloud storage. It has nothing to do with sending data from the Dash to the cloud. Again, sorry about our documentation being confusing… big improvements are almost here!

Hey Ben,

Thanks for the links. Unfortunately they don’t have any answers for us… Good to know on the socket API tho… I thought from the doc I read that I could program a sketch that would write to a socket to send to the cloud.

So, I will start to look at a custom sketch but…

  1. Where are the built-in class methods documented? SerialCloud.println, Dash.Begin, etc…

  2. If the dash is connected to a Linux SOC via USB when I write data to the device file (driver) then how do I capture that data inside the sketch? This is the big question. In default Serial mode I can just cat a string to the device and its sent to the cloud. If I write my own sketch how is that data written to the device presented to the Setup() function?


Yeah, our Dash class documentation is hidden inside these forums. Using the Dash class

Since you’re using embedded Linux I would recommend a Huawei E303 Cellular USB Modem over the Dash. Right now the Dash cannot accomplish what you want but the E303 can. Plus you could probably find some tutorials on the web.

You can purchase the E303 from our store Cellular Connectivity for the Internet of Things | Hologram