User:Tingo/Tips: Difference between revisions

From NDWiki
Jump to navigation Jump to search
(created "Tips" subpage)
 
(added "transferring files" section, and description of using kermit)
Line 7: Line 7:
The file PREP.SYMB is read, and the acsii file is written as prep.symb.txt.
The file PREP.SYMB is read, and the acsii file is written as prep.symb.txt.
'''Note''': it is also possible to instruct transfer programs like 'kermit' to translate the file when it is transferred.
'''Note''': it is also possible to instruct transfer programs like 'kermit' to translate the file when it is transferred.
==Transferring files==
Transferring files from a ND machine running [[SINTRAN III]] to a unix-like machine (FreeBSD in my case). The machines are connected via a serial connection; a serial port is connected via an appropriate cable to a terminal port (serial) on the ND machine. You must be able to login to the ND machine from the unix-like machine.
===Kermit===
====from ND to unix====
Before starting, you should know the name of the serial port you are usingon the unix-like machine. Start Kermit and set the following parameters
set modem type none
set line /dev/ttyU0
set speed 9600
set parity even
set flow xon/xoff
set carrier-watch off
set prefixing all
replace /dev/ttyU0 with the name of the serial port you are using. Connect to the ND machine by using
connect
Press Escape to get the ENTER prompt, then login to the ND machine. Start Kermit on the ND machine
@KERMIT
set parity and other needed parameters, Transfer files with the 'send' command. After starting a transfer, go back to the unix-like machine by pressing CTRL-\ followed by 'C' and you are back in kermit on the unix-like machine, issue the
connect
command again. Kermit on the unix-like machine will automatically detect the file transfer, and start receiving the file.
====from unix to ND====
The procedure is the same as described above, but you need to swap send and receive commands. Also, Kermit on the ND side doesn't automatically receive files, so you need to issue a 'rec' (receive) command yourself.

Revision as of 17:53, 20 May 2012

Various tips that I have found useful.

Text files

Removing parity bit from text files

If you have transferred text / ascii files from a machine running SINTRAN III to some other machine, you might find that the files reads garbled. The reason for that is that SINTRAN III requires files to be in ascii 7-bit format, with even parity. Thus, the highest (most significant) bit might be set on many characters to achieve even parity. If you want to read those files as text files, you can convert them. It is easy, simply strip the most significant bit on all characters. Note: this will render the file unusable for SINTRAN III. Always keep a copy of the original file if you need to use it under SINTRAN III again. For any unix-like system, you can use the 'tr' command, like this:

tr "[\201-\377]" "[\1-\177]" < PREP.SYMB > prep.symb.txt

The file PREP.SYMB is read, and the acsii file is written as prep.symb.txt. Note: it is also possible to instruct transfer programs like 'kermit' to translate the file when it is transferred.

Transferring files

Transferring files from a ND machine running SINTRAN III to a unix-like machine (FreeBSD in my case). The machines are connected via a serial connection; a serial port is connected via an appropriate cable to a terminal port (serial) on the ND machine. You must be able to login to the ND machine from the unix-like machine.

Kermit

from ND to unix

Before starting, you should know the name of the serial port you are usingon the unix-like machine. Start Kermit and set the following parameters

set modem type none
set line /dev/ttyU0
set speed 9600
set parity even
set flow xon/xoff
set carrier-watch off
set prefixing all

replace /dev/ttyU0 with the name of the serial port you are using. Connect to the ND machine by using

connect

Press Escape to get the ENTER prompt, then login to the ND machine. Start Kermit on the ND machine

@KERMIT

set parity and other needed parameters, Transfer files with the 'send' command. After starting a transfer, go back to the unix-like machine by pressing CTRL-\ followed by 'C' and you are back in kermit on the unix-like machine, issue the

connect

command again. Kermit on the unix-like machine will automatically detect the file transfer, and start receiving the file.

from unix to ND

The procedure is the same as described above, but you need to swap send and receive commands. Also, Kermit on the ND side doesn't automatically receive files, so you need to issue a 'rec' (receive) command yourself.