Using Flwrap to Send Error Checked and Compressed Files Credits The introduction is directly taken from the Flwrap Help at http://www.w1hkj.com/flwrap/index.html. I ve also drawn from materials produced by the Western PA NBEMS group. Introduction Let s suppose you want to send a critical message that must be received exactly as it was sent, or maybe you want to send a data file where it's highly unlikely that even a trained operator could tell that there was an error in receiving the data. Or perhaps you need to broadcast a weather bulletin or situation report to multiple stations and allow each station to verify that the message was received exactly as it was sent. Flwrap is an application that is designed to take care of each of these situations. Flwrap allows you to transmit a text message, image, or binary file to either single or multiple stations and allow each receiving station to verify that the transmission was received without error. In the discussion which follows the application name is Flwrap, the file encapsulation process is called wrapping and the encapsulated file is said to be wrapped. The Flwrap executable is a small desktop application that encapsulates a text file, an image file, or a binary file within a set of identifier blocks. These blocks include a 16 bit checksum that is used to test the encapsulated file for integrity. Flwrap is designed to be used to best advantage with Fldigi but can be used with any digital modem program. Fldigi can recognize a wrapped transmission in the Rx data stream and automatically save the file. Fldigi can process multiple wrapped files that are sent in rapid succession. Fldigi does this without operator intervention. The conversion of files to and from the wrapped format require an operator. A text file is encapsulated without changes to the text. Images and other binary files are first converted to a base-64 format. The converted file is then encapsulated. The header blocks identify the type of file and whether or not it has been converted to base-64. Files with any of the following extensions will be treated as binary data files and converted to the base-64 format e.g. jpg, jpeg, png, gif, bmp, ico, zip, gz, tgz, and bz2. Spreadsheets are best saved as comma delimited text files (CSV). Please see the last section of this document for further information on spreadsheets and images. The following sections describe how to install and use Flwrap with Fldigi. In some cases there are multiple ways of handling the wrapped files.
Installation and Set Up Installation of any of the Fldigi related files will create a shortcut icon on your desktop. If you haven't already, consider creating a desktop folder for all of the NBEMS applications. (Right click on the desktop, select New - Folder and name the folder NBEMS or something similar.) Drag your previously installed Fldigi and Flarq shortcut icons into this folder. You will also want to include a shortcut to WordPad for the purpose of creating text files that can be wrapped. Install and Configure Download and install Flwrap from http://www.w1hkj.com/download Grab the desktop icon and move it into your NBEMS folder. Create a shortcut for Wordpad and place this icon in your NBEMS folder. Copy your Flwrap shortcut icon and paste it into the following directory: C:\documents and settings\<user>\nbems.files\wrap\recv In the Fldigi menu item Configure Misc Text Capture check the box Enable detection and extraction under Auto Extract. Your desktop folder will look like the capture shown below. Note that most of the Fldigi applications are in this folder. The exception is Flrig which should be added if you are planning to use that application for rig control. Be sure to include Flmsg.
Preparing a Wrapped File Create your text in WordPad. Save to your NBEMS folder as a text file (TXT). Saving it as another file type will add formatting which makes the file bigger than it needs to be. Were concerned with error free communications, not style. At this point I need to mention that wrap can also produce compressed files. Compression is very useful for larger files but it will actually make small text files bigger. Harry Bloomberg, W3YJ, has come up with 3 rules for compression: Never compress any plain text file. Never compress any file less than 2KB in size. Spreadsheet files should be saved as comma delimited text (CSV format). Transmit a compressed CSV file only if compression reduces the file size by 50% or more. The easiest way to create an uncompressed file is to simply grab the file icon with your mouse cursor and drag it over the Flwrap shortcut icon. The wrapped file (WRAP file extension) will appear in your NBEMS desktop folder. The other way to wrap a file is to open Flwrap by double clicking on the Flwrap shortcut icon. You will see the following window: To wrap without compression, drag your text file icon into the area marked Drop file here. If the Compress button has not been clicked your file will be wrapped but not compressed. If the button is clicked first the file will be wrapped and compressed. As soon as you have dropped the text file into the drop box, the new wrapped file will appear in the NBEMS desktop folder. Please note that a wrapped file will always go to the folder where the unwrapped file came from. If you pull a file from, for example, My Documents, the wrapped file will be found in My Documents.
Sending a Wrapped File When you are ready to transmit the file, simply drag the wrapped file from your NBEMS folder to the transmit window of Fldigi and click the TX button. If the file has been compressed or is not a text file you will see a string of meaningless characters appear in the Receive window as the file transfer progresses. Receiving a Wrapped File Open the folder C:\documents and settings\<user>\nbems.files\wrap\recv This is the folder where received wrap files are automatically placed (assuming you checked the box in the Capture Text dialog as mentioned in the set up instructions above). You can also get to this folder through the File menu; File Folders NBEMS files WRAP recv I like to arrange Fldigi and the folders on my desktop as shown below. This puts everything in one view. Notice that I put a copy of the Flwrap shortcut icon in the recv folder.
The characters associated with the wrapped file are in the receive window of Fldigi. Notice the [WRAP:beg] and [WRAP:end] and the start and finish of the wrap transmission. These identify the file as a wrap file and instruct Fldigi to save the file in the recv folder. Looking at the recv folder, the wrap file appears with a file name beginning with extract followed by a date and time stamp. This lets you know exactly when the file was received. To unwrap the file, simply drag the wrap file with your mouse over the Flwrap icon and the original file will appear in the recv folder. If the file was transmitted without errors, the following will appear: You can now click on the file to open it. If the file didn't unwrap successfully you will get a failure notice and will have to ask the sender to resend the file. A Note on Spreadsheets and Images If a spreadsheet is saved in its native file format (XLS, etc.) the file will have a significant overhead of formatting information. Spreadsheets should be saved as comma delimited CSV files. This format consists of simple text with commas indicating the columns and rows. When opened, the spreadsheet application will reformat the CSV text file as a spreadsheet. You will probably find that you have to do some column resizing as that information is not transmitted. An Excel file of about 15k will save in CSV format with a size of about 0.5k, a 30x reduction in size and transmission time. Images can be sent using wrap but the sizes for all but the smallest files will be large. It is best to use the image utility that is associated with MFSK-16. That will be covered in a different document. Steve Hansen, KB1TCE 12 Sept. 2010