13.04.2015 Views

Using Flwrap to Send Error Checked and Compressed Files

Using Flwrap to Send Error Checked and Compressed Files

Using Flwrap to Send Error Checked and Compressed Files

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Using</strong> <strong>Flwrap</strong> <strong>to</strong> <strong>Send</strong> <strong>Error</strong> <strong>Checked</strong> <strong>and</strong> <strong>Compressed</strong> <strong>Files</strong><br />

Credits<br />

The introduction is directly taken from the <strong>Flwrap</strong> Help at http://www.w1hkj.com/<strong>Flwrap</strong>/index.html.<br />

I’ve also drawn from materials produced by the Western PA NBEMS group.<br />

Introduction<br />

Let’s suppose you want <strong>to</strong> send a critical message that must be received exactly as it was sent, or<br />

maybe you want <strong>to</strong> send a data file where it's highly unlikely that even a trained opera<strong>to</strong>r could tell that<br />

there was an error in receiving the data. Or perhaps you need <strong>to</strong> broadcast a weather bulletin or<br />

situation report <strong>to</strong> multiple stations <strong>and</strong> allow each station <strong>to</strong> verify that the message was received<br />

exactly as it was sent.<br />

<strong>Flwrap</strong> is an application that is designed <strong>to</strong> take care of each of these situations. <strong>Flwrap</strong> allows you <strong>to</strong><br />

transmit a text message, image, or binary file <strong>to</strong> either single or multiple stations <strong>and</strong> allow each<br />

receiving station <strong>to</strong> verify that the transmission was received without error. In the discussion which<br />

follows the application name is <strong>Flwrap</strong>, the file encapsulation process is called wrapping <strong>and</strong> the<br />

encapsulated file is said <strong>to</strong> be wrapped.<br />

The <strong>Flwrap</strong> executable is a small desk<strong>to</strong>p application that encapsulates a text file, an image file, or a<br />

binary file within a set of identifier blocks. These blocks include a 16 bit checksum that is used <strong>to</strong> test<br />

the encapsulated file for integrity. <strong>Flwrap</strong> is designed <strong>to</strong> be used <strong>to</strong> best advantage with Fldigi but can<br />

be used with any digital modem program. Fldigi can recognize a wrapped transmission in the Rx data<br />

stream <strong>and</strong> au<strong>to</strong>matically save the file. Fldigi can process multiple wrapped files that are sent in rapid<br />

succession. Fldigi does this without opera<strong>to</strong>r intervention. The conversion of files <strong>to</strong> <strong>and</strong> from the<br />

wrapped format require an opera<strong>to</strong>r.<br />

A text file is encapsulated without changes <strong>to</strong> the text. Images <strong>and</strong> other binary files are first converted<br />

<strong>to</strong> a base-64 format. The converted file is then encapsulated. The header blocks identify the type of file<br />

<strong>and</strong> whether or not it has been converted <strong>to</strong> base-64. <strong>Files</strong> with any of the following extensions will be<br />

treated as binary data files <strong>and</strong> converted <strong>to</strong> the base-64 format e.g. jpg, jpeg, png, gif, bmp, ico, zip,<br />

gz, tgz, <strong>and</strong> bz2. Spreadsheets are best saved as comma delimited text files (CSV). Please see the last<br />

section of this document for further information on spreadsheets <strong>and</strong> images.<br />

The following sections describe how <strong>to</strong> install <strong>and</strong> use <strong>Flwrap</strong> with Fldigi. In some cases there are<br />

multiple ways of h<strong>and</strong>ling the wrapped files.


Installation <strong>and</strong> Set Up<br />

Installation of any of the Fldigi related files will create a shortcut icon on your desk<strong>to</strong>p. If you haven't<br />

already, consider creating a desk<strong>to</strong>p folder for all of the NBEMS applications. (Right click on the<br />

desk<strong>to</strong>p, select New - Folder <strong>and</strong> name the folder NBEMS or something similar.) Drag your previously<br />

installed Fldigi <strong>and</strong> Flarq shortcut icons in<strong>to</strong> this folder. You will also want <strong>to</strong> include a shortcut <strong>to</strong><br />

WordPad for the purpose of creating text files that can be wrapped.<br />

Install <strong>and</strong> Configure<br />

• Download <strong>and</strong> install <strong>Flwrap</strong> from http://www.w1hkj.com/download<br />

• Grab the desk<strong>to</strong>p icon <strong>and</strong> move it in<strong>to</strong> your NBEMS folder.<br />

• Create a shortcut for Wordpad <strong>and</strong> place this icon in your NBEMS folder.<br />

• Copy your <strong>Flwrap</strong> shortcut icon <strong>and</strong> paste it in<strong>to</strong> the following direc<strong>to</strong>ry:<br />

C:\documents <strong>and</strong> settings\\NBEMS.files\wrap\recv<br />

• In the Fldigi menu item Configure – Misc – Text Capture check the box “Enable detection <strong>and</strong><br />

extraction under “Au<strong>to</strong> Extract.”<br />

Your desk<strong>to</strong>p folder will look like the capture shown below. Note that most of the Fldigi applications<br />

are in this folder. The exception is Flrig which should be added if you are planning <strong>to</strong> use that<br />

application for rig control. Be sure <strong>to</strong> include Flmsg.


Preparing a Wrapped File<br />

Create your text in WordPad. Save <strong>to</strong> your NBEMS folder as a text file (TXT). Saving it as another file<br />

type will add formatting which makes the file bigger than it needs <strong>to</strong> be. Were concerned with error free<br />

communications, not style.<br />

At this point I need <strong>to</strong> mention that wrap can also produce compressed files. Compression is very<br />

useful for larger files but it will actually make small text files bigger. Harry Bloomberg, W3YJ, has<br />

come up with 3 rules for compression:<br />

• Never compress any plain text file.<br />

• Never compress any file less than 2KB in size.<br />

• Spreadsheet files should be saved as comma delimited text (CSV format). Transmit a<br />

compressed CSV file only if compression reduces the file size by 50% or more.<br />

The easiest way <strong>to</strong> create an uncompressed file is <strong>to</strong> simply grab the file icon with your mouse cursor<br />

<strong>and</strong> drag it over the <strong>Flwrap</strong> shortcut icon. The wrapped file (WRAP file extension) will appear in your<br />

NBEMS desk<strong>to</strong>p folder.<br />

The other way <strong>to</strong> wrap a file is <strong>to</strong> open <strong>Flwrap</strong> by double clicking on the <strong>Flwrap</strong> shortcut icon. You will<br />

see the following window:<br />

To wrap without compression, drag your text file icon in<strong>to</strong> the area marked “Drop file here.” If the<br />

“Compress” but<strong>to</strong>n has not been clicked your file will be wrapped but not compressed. If the but<strong>to</strong>n is<br />

clicked first the file will be wrapped <strong>and</strong> compressed.<br />

As soon as you have dropped the text file in<strong>to</strong> the drop box, the new wrapped file will appear in the<br />

NBEMS desk<strong>to</strong>p folder.<br />

Please note that a wrapped file will always go <strong>to</strong> the folder where the unwrapped file came from. If you<br />

pull a file from, for example, My Documents, the wrapped file will be found in My Documents.


<strong>Send</strong>ing a Wrapped File<br />

When you are ready <strong>to</strong> transmit the file, simply drag the wrapped file from your NBEMS folder <strong>to</strong> the<br />

transmit window of Fldigi <strong>and</strong> click the TX but<strong>to</strong>n. If the file has been compressed or is not a text file<br />

you will see a string of “meaningless” characters appear in the Receive window as the file transfer<br />

progresses.<br />

Receiving a Wrapped File<br />

Open the folder C:\documents <strong>and</strong> settings\\NBEMS.files\wrap\recv<br />

This is the folder where received wrap files are au<strong>to</strong>matically placed (assuming you checked the box in<br />

the Capture Text dialog as mentioned in the set up instructions above).<br />

You can also get <strong>to</strong> this folder through the File menu; File – Folders – NBEMS files – WRAP – recv<br />

I like <strong>to</strong> arrange Fldigi <strong>and</strong> the folders on my desk<strong>to</strong>p as shown below. This puts everything in one<br />

view. Notice that I put a copy of the <strong>Flwrap</strong> shortcut icon in the recv folder.


The characters associated with the wrapped file are in the receive window of Fldigi. Notice the<br />

[WRAP:beg] <strong>and</strong> [WRAP:end] <strong>and</strong> the start <strong>and</strong> finish of the wrap transmission. These identify the file<br />

as a wrap file <strong>and</strong> instruct Fldigi <strong>to</strong> save the file in the recv folder.<br />

Looking at the recv folder, the wrap file appears with a file name beginning with “extract” followed by<br />

a date <strong>and</strong> time stamp. This lets you know exactly when the file was received.<br />

To unwrap the file, simply drag the wrap file with your mouse over the <strong>Flwrap</strong> icon <strong>and</strong> the original file<br />

will appear in the recv folder. If the file was transmitted without errors, the following will appear:<br />

You can now click on the file <strong>to</strong> open it.<br />

If the file didn't unwrap successfully you will get a failure notice <strong>and</strong> will have <strong>to</strong> ask the sender <strong>to</strong><br />

resend the file.<br />

A Note on Spreadsheets <strong>and</strong> Images<br />

If a spreadsheet is saved in its native file format (XLS, etc.) the file will have a significant overhead of<br />

formatting information. Spreadsheets should be saved as comma delimited CSV files. This format<br />

consists of simple text with commas indicating the columns <strong>and</strong> rows. When opened, the spreadsheet<br />

application will reformat the CSV text file as a spreadsheet. You will probably find that you have <strong>to</strong> do<br />

some column resizing as that information is not transmitted. An Excel file of about 15k will save in<br />

CSV format with a size of about 0.5k, a 30x reduction in size <strong>and</strong> transmission time.<br />

Images can be sent using wrap but the sizes for all but the smallest files will be large. It is best <strong>to</strong> use<br />

the image utility that is associated with MFSK-16. That will be covered in a different document.<br />

Steve Hansen, KB1TCE<br />

12 Sept. 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!