Chinaunix首页 | 论坛 | 博客
  • 博客访问: 891858
  • 博文数量: 132
  • 博客积分: 9976
  • 博客等级: 中将
  • 技术积分: 1781
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-30 20:40
文章分类

全部博文(132)

文章存档

2013年(1)

2011年(1)

2010年(15)

2009年(77)

2008年(36)

2007年(2)

我的朋友

分类: 系统运维

2008-11-20 13:06:14

kermit FAQ:

 

Kermit Authority Website:
 

 

======================================

======================================

1.12 How to use Kermit to upload or download files

This handout assumes that you are familiar with the communications package that you will be using on your PC. We recommend a program called Kermit. Kermit is in the Public Domain and can be freely distributed.

At Malaspina College, we STRONGLY suggest you use Kermit. Kermit was designed specifically to connect a PC up to a VAX mainframe. Other communications programs were designed for PC to PC use and most will have some sort of incompatibility with the VAX

After you have connected to the remote system (the Malaspina VAX), you must login to the system. When you have completed the login procedure, you must be sure to change to the directory in which you desire to send files to or receive files from; unless you are familiar with specifying the path names on the current system.

To send or receive files between the VAX and a PC, you have to have Kermit running on the PC AND on the VAX. To run the VAX Kermit, at the dollar sign:

$CKERMIT

and press return to run CKermit on the VAX.

C-KERMIT>

The above prompt is telling you that the VAX Kermit program is running.

Sending files to the VAX machine

To send (upload) a file from the machine you are using to the VAX machine.

IF you are sending an ASCII file, proceed. IF you are sending a binary file tell the VAX to expect a binary file:

C-KERMIT> SET FILE TYPE BINARY

1. Type receive to transfer the file to the current directory on the VAX computer; otherwise state the path to the directory you wish to put the file in.

C-KERMIT> RECEIVE

2. You must hold down the ALT key then press the x key.

3. Now you are back to the kermit running on the current machine. You must type send < filename> (where the name of the file you wish to send is substituted for the < filename> symbol if it is in the current directory. Otherwise the pathname must also accompany the filename.) then press enter.

MS-KERMIT> SEND FILENAME.EXT

4. When the transfer is complete press return.

5. Next type connect and press enter to transfer control to the VAX machine then press return.

MS-KERMIT> CONNECT

6. To continue transferring files repeat steps 1-5; otherwise do steps 7-10.

7. Type quit to exit CKermit on the VAX machine.

C-KERMIT> QUIT

8. Logoff the VAX machine.

$LO

9. Then use the ALT-x key sequence mentioned in step 1 to get back to the current machine.

10. Type quit to exit CKermit on your machine.

MS-KERMIT> QUIT

Receiving files from the VAX machine

To receive (download) a file to the machine you are using from the VAX machine.

1. You must type send < filename> (where the name of the file you wish to send is substituted for the < filename> symbol if it is in the current directory. Otherwise the pathname must also accompany the filename.) then press enter.

C-KERMIT> SEND FILENAME.EXT

2. You must hold down the ALT key then press the x key

3. Now type receive to transfer the file to the current directory on the VAX computer; otherwise state the path to the directory you wish to put the file in.

MS-KERMIT> RECEIVE or

MS-KERMIT> RECEIVE DR:\path

4. When the transfer is complete press return.

5. Type connect to return to the VAX machine then press return.

MS-KERMIT> CONNECT

6. To continue receiving files then repeat steps 1-5; otherwise do steps 7-10

7. Type quit to exit CKermit on the VAX machine.

C-KERMIT> QUIT

8. Logoff the VAX machine.

$LO

9. Then use the ALT-x key sequence mentioned in step 1 to get back to the current machine.

10. Type quit to exit Kermit on your machine.

MS-KERMIT> QUIT


======================================

using kermit API

Hi

I need to use kermit to send pager messages, from a C++ application, I
have read at various locations on the web that there is no library to do
this, but that I should use the kermit API.

My question is can anyone point me to a good resource that has
information on how to use the API and if possible more specifically how
to use it in relation to C or C++?

Thanks for any help anyone can offer.

Ben
Reply With Quote
  #  
Old 10-02-2007, 10:42 AM
Default Re: Using Kermit API

...not sure but ...try with gsmlib ...gsmlib-1.10-2.9.i386.rpm..or
something like that

Reply With Quote
  #  
Old 10-02-2007, 10:42 AM
Default Re: Using Kermit API

wrote:
> ..not sure but ...try with gsmlib ...gsmlib-1.10-2.9.i386.rpm..or
> something like that
>


I am afraid this won't work for me, the solution I use needs to be cross
platform. The main platforms I am running on are Solaris 8, 9, Linux,
OpenBSD, plus I need to message pagers, gsmlib only messages GSM enabled
cellphones, and only runs on 1 of my required platforms ( thanks for
the suggestion though, it is appreciated.

Ben
Reply With Quote
  #  
Old 10-02-2007, 10:42 AM
Default Re: Using Kermit API

in comp.protocols.kermit.misc i read:

>I need to use kermit to send pager messages, from a C++ application, I
>have read at various locations on the web that there is no library to
>do this, but that I should use the kermit API.


perhaps e-kermit -- see .

--
a signature
Reply With Quote
  #  
Old 10-02-2007, 10:42 AM
Default Re: Using Kermit API


Ben Maynard wrote:
> Hi
>
> I need to use kermit to send pager messages, from a C++ application,

I
> have read at various locations on the web that there is no library to

do
> this, but that I should use the kermit API.
>
> My question is can anyone point me to a good resource that has
> information on how to use the API and if possible more specifically

how
> to use it in relation to C or C++?


Another post in this thread has already suggested E-Kermit.

Another approach is to invoke C-Kermit from your application to execute
a script to send the page. See
for links to the C-Kermit
documentation and existing pager scripts.

--
Mark Sapiro msapiro at value net The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan


======================================

Using Kermit for Modem Communications to the Technion

from:

KERMIT

Technion - Taub Computer Centre
User Support Group

Using Kermit for Modem Communications to the Technion

Last updated: October 12, 1999

This file is available also at   http:/

Contents:













Kermit is a communication software package that supports terminal emulation and transfer of data on operating systems (MS-DOS, Unix). In particular, it can be used to work on a computer in the Technion network, through telephone lines, using a PC. It also supports character-set conversions (Cyrilic, Hebrew) and script editing. It is a public-domain software package written and supported by the University of Columbia, New York.

is available at   . It contains the latest Kermit versions and documentaion.

  1. A diskette accompanied by printed documentation can be obtained in the (Tel: (829)2181). Please, bring a new diskette.

  2. Kermit is also available at the Technion FTP server (ftp.technion.ac.il). Enter:

    ftp ftp.technion.ac.al

    As username, enter:

    ANONYMOUS

    and type your e-mail address as password, when prompted.

    Find the file KERMIT.ZIP in the directory:  pub/supported/pc/comm/kermit   and copy it to your local computer with the commands:

    bin
    get kermit.zip

    Unzip KERMIT.ZIP with any un-zip program.

  3. In case you do not have un-zip program, get the file   pkunzip.exe  in the directory pub/supported/pc

If you are installing MS-DOS Kermit for the first time:

  1. Place the Kermit diskette in drive A: (or B:).
  2. Create a KERMIT directory on your hard disk, e.g. MKDIR C:\KERMIT.
  3. COPY A:*.* C:\KERMIT
  4. CD C:\KERMIT
  5. PKUNZIP KERMIT.ZIP
  6. Edit the MSCUSTOM.INI file to suit your needs and preferences (see below).
  7. Edit your AUTOEXEC.BAT file to insert the Kermit directory in your PATH.
For instructions on how to install on MS-Windows see file READ.ME in C:\KERMIT directory.

To see the list of Kermit commands, when in the Kermit environment, enter: help
To see all the parameters of a command, enter: command_name ? .   For example, to see all the parameters of the SHOW command, enter: show ?
To see all the escape-level commands, during terminal emulation, enter:

CTRL/]/H    (hold the CTRL, ] and H keys at the same time)
or
ALT/H    (hold both the ALT and H keys).

There are many other Kermit features that may improve your communication:

  1. Print Unix files on a local printer, using the PCPRINT command
  2. Transfer Hebrew mail using Pine in a Unix host
  3. Use Kermit over LAN connection (TCP/IP, SLIP/PPP configuraions)

MSKERMIT.INI  and MSCUSTOM.INI  are the initializing files read by Kermit. It is recommended to make all the changes in file  MSCUSTOM.INI.

Some common changes:

  1. Changing the port (In case the modem is installed on another port than COM1).

    Kermit controlls the serial port for high-speed interrupt communication. So it needs to know its address and Interrupt Request line (IRQ).
    If the modem is connected to COM1 or COM2 the address and IRQ are the standard ones and do not need to be specified.
    In case of COM3 or COM4 the address (in hexadecimal) and IRQ are specified with the command: SET COM n address IRQ. This command should be given before the  SET PORT command.

    To find the port address and IRQ see the modem documentation or invoke the C:\DOS\MSD.EXE program and choose the COM PORTS and IRQ menu options.
    Examples:

      Port: Enter commands:
      COM2 set port 2
      COM3 (address IRQ)
      set com 3 \x03e8 4
      set port 3
      COM4 set com4 \x02e8 3
      set port 4

  2. Changing the default speed for a 14,400 BPS (Bits Per Second) modem

    Enter:

      set speed 57600    or:    set baud 57600

    You can enter 4 times the modem speed taking into account the compression ability of the modem. This can be done only if the UART is 16550.

    Note: UART is the standard serial port hardware for PCs and PS/2s.   It is a PC chip that converts parallel data into serial data at the serial port. It also converts serial data into parallel data.   To enable working with a high speed modem it is important that the UART is 16550.
    Run the DOS program: C:\DOS\MSD.EXE and choose the option COM PORTS. If the UART of the modem COM port is 8250, use as modem speed twice the actual one.

  3. Choosing the modem script file

    Kermit provides a number of script files that initialize the different sorts of modems. The script files are in the directory C:\KERMIT\MODEMS. More information on the various modems is in the file: C:\KERMIT\MODEMS\READ.ME. If, for example, you own the US Robotics Sportster 14400 modem, enter:

    set modem sport

  1. From the DOS prompt, enter:

    KERMIT

    You enter the Kermit-PC environment and get the MS-Kermit> prompt.

  2. Enter the terminal emulation by typing: C (connect)

  3. Use the modem commands to dial:

    atz
    atdt 8230261

    Wait for the 'CONNECT' message, then hit

    (Enter key) TWICE !!

    @Userid:

    Enter your t2 userid. For example: s1234567

    Password?

    Enter your t2 password. For example: MeZePo12

    Get the modems server prompt:

    Shiva LanRover/E PLUS, BASELEVEL 4.0.2d 96 96/09/05
    ccdis#>

  4. When the contact is established you can choose a computer at the terminal server menu or enter:

    telnet computer_name

Kermit is a program that runs simultaneously in two different environments, the Kermit-PC environment and the terminal emulation environment. You can switch to either environment any time.

In the Kermit-PC environment you can check/change many communication parameters (set speed 14400, set terminal color 0 34 47, show modem, show comm, etc).

  • From the terminal emulation environment, enter:  ALT/X  to get the Kermit-PC environment  (MS-Kermit> prompt).

  • From the Kermit-PC environment, enter:  C  (connect) to access the terminal emulation mode.

1. Enter:
2. Enter:
3. Enter:
ALT/X 
HANGUP 
EXIT 
- to get to the KERMIT-PC environment (MS-KERMIT> prompt)
- to close the phone call
- to leave Kermit

The transfer of files from PC to Host (and vice versa) is done between both Kermit programs, MS-Kermit on the PC and C-Kermit on the host.

Assuming we are logged on a Unix host, through a modem, and we would like to transfer files from the PC:

  1. Invoke the host's Kermit, enter: kermit
    The prompt you get is:   C-kermit>

  2. Then enter the Kermit command:  RECEIVE file_name

  3. The kermit program will tell us to return to the PC Kermit.
    Enter:   Alt/X

  4. Enter the MS-Kermit command:   SEND

  5. When the transfer is finished you can return to the host Kermit. Enter:   CONNECT

  6. Exit from the host Kermit, enter:   EXIT
To transfer files from the host to your PC follow the steps above interchanging the commands SEND/RECEIVE

When transferring files you can always use wildcards ('*') to transfer a group of files.

Before transfering binary files (*.ZIP, *.EXE, etc), enter the Kermit command
SET FILE TYPE BINARY in both Kermit programs.

The Technion Library and the other University libraries can be reached from home. After establishing the contact with LAN, log into:
As username give: ALEPH (there is no need for password)
To be able to see the Hebrew letters, enter the Kermit command: HEBREW when in the MS-Kermit> prompt.
To switch to a search in Hebrew, enter: ? and then HEB.
To switch to a search in English, enter: ? and then ENG
To end the work on ALEPH, enter: stop

Many PCs at the Technion are connected directly to the LAN with a communication card. Each PC has a unique IP number (132.68.X.Y). This makes a TCP/IP conncection possible. Usually we use the the NCSA communication software (telnet, ftp, etc). However, since the Kermit software makes possible the usage of Hebrew characters we might prefer to use it.

To form a TCP/IP contact, you need to fill in the right values of the preceeding lines in the MSCUSTOM.INI file:

SET TCP/IP
SET TCP/IP
SET TCP/IP
SET TCP/IP
SET TCP/IP
SET TCP/IP
SET TCP/IP
ADDRESS 132.68.X.Y
/IP SUBNETMASK 255.255.255.0
/IP DOMAIN technion.ac.il
/IP GATEWAY 132.68.X.254
/IP PRIMARY-NAMESERVER 132.68.1.9
/IP SECONDARY-NAMESERVER 132.68.7.6
/IP BROADCAST 132.68.X.255
My PC's numeric IP address
My physical network's subnet mask
My PC's fully qualified domain name
My network gateway's IP address
Primary nameserver's address
fallback nameserver address
My network's broadcast address

To make a TCP/IP connection in Kermit, enter at the MS-Kermit> prompt:

    telnet host_name
When finished, logout of the host and exit from Kermit see chapter You can be logged into several telnet sessions simultateusly. To 'navigate' between the sessions use the keys ALT/N.

For help contact advisor   (E-mail: rachelle@tx;  Phone: (829)4995)

  • Introduction

    This document explains how to use the kermit program to connect through your serial cable with an .

    And alternative setup (with no particular advantages nor disadvantages) is using .

    Install ckermit

    In Debian, you use the package ckermit:

    apt-get install kermit

    Configure ckermit

    Put this in ~/.kermrc:

    set line /dev/ttyS0
    set speed 115200
    set carrier-watch off
    set handshake none
    set flow-control none
    robust
    set file type bin
    set file name lit
    set rec pack 1000
    set send pack 1000
    set window 5
    set protocol xmodem

    Running ckermit

    Run:

    $ kermit

    You'll get the following information:

    C-Kermit 8.0.211, 10 Apr 2004, for Linux
    Copyright (C) 1985, 2004,
    Trustees of Columbia University in the City of New York.
    Type ? or HELP for help.
    (/home/n/) C-Kermit>

    Enter connect at the prompt, which should bring the following:

    Connecting to /dev/ttyS0, speed 115200
    Escape character: Ctrl-\ (ASCII 28, FS): enabled
    Type the escape character followed by C to get back,
    or followed by ? to see other options.
    ----------------------------------------------------

    After that you'll see the welcome message:

    ... todo: include here the actual welcome message

    That's all.

    You can disconnect from kermit by pressing Ctrl + AltGr + \ and then c.

    With exit you can exit the program.

    Last update: 2007-02-27 (Rev 115)



    ======================================


    [][]   [][]   [] [] []

    Re: how to use kermit


    • From: "Hanigan Family"
    • To:
    • Subject: Re: how to use kermit
    • Date: Sat, 25 Sep 1999 11:08:25 -0500

    Hi,
    I am using it to talk to an obsolete platform which only
    has a modem, uucp, cu and kermit as a way to
    talk to the world. Actually the new beta version is
    really quite nice, but I have never used seyon so I
    can't comment
    Linda
    -----Original Message-----
    From: bob jones
    To: redhat-list redhat com
    Date: Friday, September 24, 1999 10:54 AM
    Subject: Re: how to use kermit


    >Years ago I used kermit, and it was not convenient to transfer files
    >that
    >way, but it worked. Then I changed to "seyon", and that was better, much
    >better. And finally I changed to SLIP and eventually PPP, which are
    >much, much better.
    >
    >I'm writing this to try to get smarter: why is kermit being used still,
    >and is seyon a better alternative?
    >
    >bob jones (bobj eskimo com)
    >




    [][]   [][]   [] [] []

    ======================================

    from: ~wellings/tipspit/kermit.html

    Using Kermit to Transfer Files


    To transfer files between a DOS-based PC and AIX system using Kermit communication software, follow this procedure:

    1. invoke Kermit on your PC

    2. set the correct file transfer mode for PC Kermit (if needed)

    3. connect to AIX through Develnet

    4. login

    5. invoke Kermit on AIX

    6. set the file transfer mode on AIX (if needed)

    7. put AIX Kermit in server mode

    8. return to the PC session

    9. transfer the file using "get" or "send"

    10. end AIX server mode

    11. logout from AIX and return to the PC session

    12. Connecting to AIX through Develnet using scripts


    1) invoke Kermit on your PC

    From the PC command line prompt invoke the Kermit program:

    C:> kermit

    You will see the MS-Kermit prompt:

    MS-Kermit>


    2) set the correct file transfer mode for PC Kermit (if needed)

    If you intend to transfer binary files, issue the command:

    MS-Kermit> set file type binary

    For text files this is not necessary.

    Set the baud rate to match the baud rate of your modem. The baud rate is set to 1200 by default. For example, to set the baud rate to 2400:

    MS-Kermit> set baud 2400

    The communication port is set to COM 2 by default. If your modem is connected to a different port , for example COM 1, type:

    MS-Kermit> set port COM1


    3) connecting to AIX through Develnet

    (To use the UCS supplied login scripts, see section 12 entitled: Connecting to AIX through Develnet using scripts.)

    To begin, issue the Kermit connect command:

    MS-Kermit> c

    If your computer is directly connected to a Develnet line on campus, simply hit the key marked Enter or Return and the Develnet banner will appear.

    If you are accessing Develnet from off campus, use ATDT (touch tone) or ATDP (pulse dialling) to dial the modem number corresponding to the speed of your modem.

    • ATDT 2205160 (for 1200 baud)
    • ATDT 2207376 (for 2400 baud)
    • ATDT 2208709 (for 9600 baud)
    • ATDT 2208799 (for 14400 baud)

    4) login

    Once the Develnet banner appears, enter the name of the AIX machine you wish to use, for example acs1. Enter your username and password when prompted.

    U of C Develnet
    Request: acs1
    login: username
    Password: aix password


    5) invoke Kermit on AIX

    When logged into AIX, type:

    kermit

    A banner similar to the following will appear.

    C-Kermit 5A(189), 30 June 93, IBM RS/6000 AIX 3.2

    Type ? or HELP for help

    C-Kermit>


    6) set the file transfer mode for AIX (if needed)

    If you want to transfer binary files, inform AIX Kermit with:

    C-Kermit> set file type binary


    7) put AIX Kermit in server mode

    C-Kermit> server


    8) return to the PC session

    To return to your PC, type:

    C-Kermit> ]c

    Hold down the key marked Ctrl and type ] then let go and type the letter, c

    You will see the PC MS-Kermit prompt again.


    9) transfer the file using get or send

    To upload a file to AIX use the send command:

    MS-Kermit> send filename

    To download a file from AIX use the get command:

    MS-Kermit> get filename


    10) end AIX server mode

    When the transfer is finished you need to terminate the AIX server mode with the finish command at the MS-Kermit prompt:

    MS-Kermit> finish


    11) logout from AIX and return to the PC session

    Return to AIX:

    MS-Kermit> c

    Exit the AIX Kermit session and logout.

    C-Kermit> quit

    logout

    At the Develnet prompt, return again to your PC using: ]c

    U of C Develnet
    Request: ]c

    Quit MS-Kermit with:

    MS-Kermit> quit

    C:>


    12) Connecting to AIX through Develnet using scripts

    If you are using Kermit v 3.13 obtained from the UCS Microstore you can connect to AIX using the acslogin script supplied on the distribution media.

    MS-Kermit> acslogin HostId ModemType DialPrefix
    Where:

    • HostId is the name of the ACS host (acs1, acs2, . . . acs7, library)
    • ModemType is the modem speed (1200, 2400, 9600, 14400, dnet9600)
    • DialPrefix is one of:

      • T (tone dial)
      • P (pulse dial)
      • T9 (touch dial on campus)

    Examples:

    To connect to the AIX server acs3 from off-campus using 2400 bps (bits per second) modem and a tone-dialling phone line, type:

    MS-Kermit> acslogin acs3 2400 T

    To connect to the AIX server acs1 with an on-campus direct connection to Develnet, type:

    MS-Kermit> acslogin acs1 dnet9600

    To connect to the library catalogues from off-campus using a 2400 bps modem and pulse dialling phone line, type:

    MS-Kermit> acslogin library 2400 P

    Author: Alena Jirasek



    ======================================

    阅读(1727) | 评论(0) | 转发(0) |
    0

    上一篇:linux usb 转 串口

    下一篇:debug linux kernel

    给主人留下些什么吧!~~