Table of Contents

  1. Installation
  2. Usage
  3. Details

Back to WiFiStation Documentation

WiFiStation: sendload

sendload is a command-line program for using WiFiStation's AT$UPLOAD command over a serial connection.

To upload a program over the WiFiStation's HTTP interface, use a utility like curl that supports HTTP 307 redirections:

$ curl -L -F file=@msterm.bin


Fetch the Git tree, then compile and install:

$ git clone
$ cd WiFiStation/host
$ make
$ sudo make install

On BSD systems you'll need to use gmake.


$ sendload
usage: sendload [-d] [-s serial speed] <serial device> <file>

To upload a file msterm.bin to the MailStation over the WiFiStation's USB serial device /dev/cuaU0 at its default speed of 9600:

$ sendload /dev/cuaU0 msterm.bin


WSLoader needs to know the size of the program it's receiving, to know when to stop expecting more input and execute it.

WiFiStation's AT$UPLOAD command requires this size as an argument to the AT$UPLOAD command, which it sends to WSLoader.

OK send your 12345 bytes

sendload is passed the name of a file so it can check the size of the file and send it with the AT$UPLOAD command.

Every byte received by AT$UPLOAD is XORed into a running checksum. Every 32 bytes, it prints this checksum to the serial connection, which sendload reads and compares to its own running checksum. This is done partially to ensure no bytes are lost along the serial connection but also to act as a rate limiting measure to avoid overflowing the WiFiStation's serial input buffer.