CommunicationImplementing an offline email system using OgCommThis document is split into three parts: hardware, software, and configuration. The hardware and software parts are pretty straightforward. The configuration part is the real trick, and requires comfort using UNIX. The goal is to enable the OmniGo 100/120 to be used as an email reading/writing system. And to do so offline, since the very nature of the OmniGo is to be mobile, and you can't be mobile when you're tied down to a phone line. My methodology relies a little on non-standard ways of doing things, i.e., it's a bit of a hack. But it does work. I used it reliably on my honeymoon. I have proposed improvements, and if anyone would like to help me implement them, I'd be grateful.HARDWARE - OmniGo 100/120 ((I've only used the 100, but I assume it will work just as well on the 120).
- OmniGo PC serial cable.
- Null modem (Radio Shack part# 26-264).
- External modem (I use a Supra fax/modem v.32bis 14.4k).
- Pin adapter if necessary (my Supra is a 25-pin, if your modem is a 9-pin, you should be okay; I make no promises for other modems. Radio Shack part# 26-1388).
Hook the OmniGo to the modem using the cable and pin adapter (if necessary); supply your own power and phone lines. Everything from here on down also applies to those using PCMCIA modems, except that the PCMCIA slot uses COM 4.SOFTWARE - OgComm.
- Text Editor.
- UNIX shell account for email.
CONFIGURATIONOgComm Settings COM Port 1 Baud Rate 19200 Parity Bits NONE Data Bits 8 Stop Bits NONE Data Mode RAW At this point you should test your modem. Hook everything up and run OgComm and select COM 1.Type AT <ENTER> If you get "OK" then try dialing. Type ATDT nnnnnnn <ENTER>, where nnnnnnn is the dial-up number.You should be able to dial up and log in. If you get to a UNIX prompt, you're ready. It will be hard to resist the temptation to play around in UNIX right now, but don't expect to do too much. The best part is yet to come. Log off. Here's the fun part . . . UNIX Configuration The OmniGo screen is small. We all know this. Also, OgComm doesn't support VT100 emulation. If you played around at all when you logged in, you found that you can't do much. If you try running Pine or Lynx, you get a bunch of garbage. So our goal is to just grab all our email, and then later send up our new email. Our modem connection is just a pipe. We're not going to try and run any software that needs a regular (80 x 25) VT100 screen; we're just going to pull down all our mail through the pipe. To do this, we'll use the simplest of all UNIX mail programs: Mail. Mail is all you need. Mail doesn't require VT100. It works line by line. I suggest you log into your account using a full-size shell on a PC and play around with Mail there to get accustomed to it. You should copy this entire message into Notepad or something and open your shell.At the prompt, type mail <ENTER> What happens next and how the program works depends on your configuration. You should get a special Mail prompt (mine is the "&" character). You can enter commands here. I leave it to you to learn all the in's and out's; I'll just tell you the ones you need to know for now. Mail commands: mail creates a new message; must be followed by an address t prints mail messages one page at a time p prints mail messages without pausing at each page d deletes messages x quits Mail and returns you to the UNIX prompt ? prints a list of available Mail commands When you're entering a new message, you may be prompted for a subject, after which you type the message. You type it line by line. You can't 'up arrow' to make corrections. You just keep typing. When you're done, enter "." on its own line and hit return and your message will be sent. You're then returned to the "&" prompt.Command examples: mail halleen@mcs.com begins a new message to me p 1-2 prints messages 1 and 2 p * prints all messages d 1-5 deletes messages 1-5 d * deletes all message To configure Mail to work best (we're still working on the PC now), create a file in your root directory called ".mailrc"; use PICO or your favorite text editor. In that file put the following:unset crt set noheader set searchheaders set escape=_ set quiet set ask retain from subject set indentprefix > This will take care of everything. If you want to know what these things do, use the online help in Mail to figure it out. (This is my config file; all these lines may not be strictly necessary, but it will work this way.)Now we'll run through the operations you'll need to perform on the OmniGo. Do this on the PC first just to see what will happen. First, we'll send ourselves some mail. At the UNIX prompt type: mail your@address.com <ENTER> You'll be prompted for a subject; enter one and press return. Now you're into the message body. Type a short message, and when you're done go to a new line and type: Try it again, but this time from the "&" prompt; it works the same. Then type x and hit return to quit.Now to read your mail. From the UNIX prompt type mail and hit return. Then type p * <ENTER> All your mail will scroll by. Now type x to return to UNIX. Now, for some fun. Rewrite the following text with your address in it: mail your@address.com test1 This is the first test . mail your@address.com test2 This is the second test It has two lines . x Mark and copy the text to the clipboard. Go back to the UNIX shell and paste the text. Watch what happens. (Ctrl-V probably won't work; you'll have to go through the menu. If your terminal program has a "send text" option, you could put the above text into a text file and send it.)Now check your mail to confirm it was sent okay. Yes? Now you're ready to do it on the OmniGo. Log in again to your shell account using the OmniGo. When you get to the prompt, repeat the exercises above in the little OmniGo window and see how it works the same. Working Offline After you're logged in using OgComm, get back into Mail. At the "&" prompt, type p * but DON'T HIT RETURN yet. Grab your stylus and select File/Open DWNLD.TXT, then hit return. After the mail has scrolled by, select File/Close DWNLD.TXT. Then exit Mail by entering x. Now run Text Editor and open DWNLD.TXT (it should be in the DOCUMENTS directory). Voila! There's your mail. While still in Text Editor, open a blank file. Type the same text that you copy/pasted earlier and save it as UPLOAD.TXT. This is how you will compose any new mail on the OmniGo. IMPORTANT: if UPLOAD.TXT is still open in Text Editor, OgComm may not be able to read it. Fn-F3 didn't seem to work either. I go to File/Switch Document and load any other document before exiting Text Editor. Go back to OgComm. Be sure you're at the UNIX prompt and select File/Send UPLOAD.TXT. Away it goes! You've just read and written your first email offline. Hints: - In OgComm, select Term/No Screen Update while uploading or downloading files—they will go much faster. OgComm is very slow at redrawing the screen. While downloading with screen update off, you see a series of "#" characters to let you know the download is in process. When the file's done, the characters stop drawing. While uploading, a single "#" will inform you the upload is done. Term/Screen Update will restore screen redraw.
- I keep a copy of all important email addresses handy on the OmniGo so I don't have to remember them all.
- There is an "escape" function in Mail that lets you, among other things, add a signature file by using the code "_r .sig" where '.sig' is the name of your signature file and '_' is the escape character specified in the .mailrc file. (The default is something else, I forget, but it was not available on the OmniGo keyboard.) Both the .mailrc and the .sig files exist on the UNIX account, not on the OmniGo.
Message ManagementIt's up to you how you want to handle mail on your server. You may want to delete all the messages after you've downloaded them ("d *"), but keep in mind that if anything were to go wrong with the OmniGo file system, you could lose all those messages. I've never had a problem, but just keep it in mind. After using "p *" all those messages should be marked as read. There may be an alternative command that only lists unread messages, so you can leave them on the server without downloading them again and again. Also, your sent mail is not being stored anywhere. It's up to you to deal with old UPLOAD.TXT files. You'll be overwriting that file the next time you want to send mail, so you may want to archive them. Also, if you're on any mailing lists (like the OG list for example), you may have too much mail to download, especially if your OmniGo is low on storage space (another benefit of an external modem, use those RAM cards). You may want to look into Procmail to filter your mail. It's beyond the scope of this document, but I used Procmail to send all OG list mail to a separate file, so it wasn't downloaded by this method. (I basically just blew it off until I got home from the honeymoon.) Type "man procmail" at the UNIX prompt to learn more, or search for it on the net, that's how I learned it. CONCLUSION This is definitely a hack. I tried to write a program in QBasic that would let you use the WyndMail email software to read and write offline. The code almost worked, but there was some glitch in the way QBasic writes to text files. I've since removed the DOS mode (thanks to a PCMCIA modem-induced crash that required a "hold down the C" total reboot), but may put it back in and try again to write the code in C.For a hack, it works really well. It's been completely reliable for me. You just have to be sure to format your UPLOAD.TXT file correctly. Remember: mail name@address.com Type the subject on this line. Start the body here.You can include blank lines. Whatever. When you're done, just use the period on it's own line. You can even include a signature. _r .sig . mail name@address.com second message Ogers, You can do multiple messages in a single file. . x Using this method, I've been able to get in and out being logged on for only a couple minutes at a time (important when calling back to my ISP long-distance).I'd love to hear if other folks have success with this, or if they have any improvements. Programmers, please look at my notes about this system. All we need is a program to do some text translation and we could use the free WyndMail software to read and write instead of Text Editor. Good luck! Article by Mike Halleen
|