From: dberge+hp48@geocities.com (Diego Berge)
Newsgroups: comp.sys.hp48
Subject: How to Use a Modem With the HP48
Date: 31 Jul 1998 02:16:18 GMT
Organization: Telefonica Transmision de Datos
Lines: 172
Message-ID: <6pr9di$rut$1@diana.bcn.ibernet.es>
NNTP-Posting-Host: ppp137.197.redestb.es
Mime-Version: 1.0
Content-Type: Text/Plain; charset=ISO-8859-1
X-Newsreader: WinVN 0.99.9 (Released Version) (16bit)
Xref: republic.btigate.com comp.sys.hp48:13984


   My purpose here is to explain in some detail the steps you need to follow 
to be able to transmit data via modem with the HP48.

   In order to successfully connect your HP48 calculator to a modem, the 
first thing you need is a 'Null Modem Cable'. A null modem cable is like a 
regular serial cable, except that two of its lines are crossed.

   You might wonder: So why is it different connecting to a PC than 
connecting to a modem? Well, data communication devices can be classified in 
two groups: Devices which GENERATE or RECEIVE information, and devices which 
merely TRANSMIT information. The former are called Data Terminal Equipment 
(DTE), PCs are an example of DTE; the later is called Data Communication 
Equipment (DCE), and are primarily modems.
   Now, when PCs were designed, it seems like they didn't think somebody 
would ever want to hook two DTEs directly, as a result, in a typical PC all 
we have (besides the parallel printer port) is an RS-232 port, which is 
intended for connecting a DCE. So when a machine wants to connect to a PC, 
its port must be that of a DCE, even if it otherwise acts as a DTE. Within 
that class of hybrids fall HP48s, Psions, some (or most?) serial printers, 
mice, and a long etcetera.
   Remember, the RS-232 communication scheme is:

 DTE <--- DCE === DCE ---> DTE

   If you want to  link two DTE together, you must 'simulate' a DCE; that's 
what a Null Modem Cable is for. It's called 'Null' because it (the modem) 
does not actually exist, and 'Modem' because it acts like if there was one.
   To build a Null Modem Cable for the 48, assuming that you already have a 
regular cable, you'll need two MALE RS-232C connectors, at least one of 
which must be a DB-9 (9-pin), and a short piece of mouse cable or similar 
(some 3 inches should do) (If you don't have a regular cable, I recommend 
that you get one). The wiring must be as shown here:


         CONNECTOR 'A'                             CONNECTOR 'B'
                                          pin#:      3   2   7     (DB-25)
pin#:      2   3   5                      pin#:      2   3   5     (DB-9)
name:     TX  RX  GND                     name:     TX  RX  GND
           |   |   |                                 |   |   |
           |   |   |                                 |   |   |
           |   |   +---------------------------------|---|---+
           |   |                                     |   |     ( <<< and
           |   +------------------>>>----------------+   |      >>> show
           |                                             |  direction of
           +----------------------<<<--------------------+          data )

   The pin number should be embossed near the pin itself in the connector.

   Once the physical part is done, which in most cases will be the most 
critical, you're ready to try out your brand-new, state-of-the-art, $2.25 
null modem cable. Plug it between your regular HP48 cable and your modem, 
turn the modem on (please don't forget this part :), and on the 48 type in:

[RightShift]+[""] [alfa] [alfa] AT [ENTER]
13 [LeftShift]+[CHARS] [CHR] [+]

   In stack level 1 you should have ( is a little black square):

1: "AT"

   Now type:

[LeftShift]+[I/O] [NXT] [SERIAL] [XMIT] [BUFLEN] [DROP] [SRECV]

   you should get:

2: "ATOK"
1: 1

   If this test goes wrong, try two or three more times. If it still fails, 
check your cable(s), check that the 48 can transmit and receive to/from the 
PC, do the same with your modem. And when everything else has failed anyway, 
connect your modem to the PC, crank up a terminal program (as 
Terminal/Hyperterminal, or Kermit's 'Connect' command), and type:

AT&D0 [ENTER]

   the modem should respond:

OK

   This tells the modem to ignore the DTR signal from the host, which the 48 
can't supply. Try again with the calculator, if it works, go back to the 
terminal and type:

AT&W0&Y0 [ENTER]

to save the current modem configuration as default. If it has not worked so 
far, I can't help you :/

   Assuming you've got it to work, now all you have to do is learn a few 
modem commands to dial and, possibily, hang up. In general, modem commands 
start with the two-character sequence 'AT' (no quotes) and end with a single 
<CR> character (dec 13), <LF> is optional.

   To dial a number use:

ATDT12345<CR>

where 12345 should be replaced by the actual number. For example:

[RightShift]+[""] [alfa] [alfa] ATDT0800890011 [ENTER]
13 [LeftShift]+[CHARS] [CHR] [+] [LeftShift]+[I/O] [NXT] [SERIAL] [XMIT]

dials the AT&T Direct access number for the UK.

   If your line is not connected to a digital switchboard, you may need to 
dial by pulses, then you should use instead:

ATDP12345<CR>

   Next thing you'll probably ask is: 'How do I know that I'm connected?'

   If the modem has successfully established a connection, it should respond 
in most cases with a message like:

CONNECT 9600/V34/LAPM/V42BIS/9600:TX/9600:RX

or simply "1" if its not in the default verbose mode. Also, if the modem has 
a 'CD' indicator, it'll usually light up. To find out via the calculator 
whether it's connected or a problem has ocurred, use the following 
keystrokes:

( [LeftShift]+[I/O] [NXT] [SERIAL] )
[BUFLEN] [DROP] [SRECV]

repeatedly until a non-empty string appears in level 2. Some common messages 
are:

verbose:         non-verbose:

CONNECT                    1
NO CARRIER                 3
ERROR                      4
NO DIALTONE                6
BUSY                       7
NO ANSWER                  8
DELAYED                   24

   Once you get the CONNECT message, you're ready to send any data you want 
to the remote host as you'd usually do. I personally use Kermit this way 
when I'm not in the office or at home.

   Finally, when you're done you'll want to hang up the line. The simplest 
way is turn the modem off, which I recommend. But if you want to instruct 
the modem to hang up, the process usually is:

(wait at least 1sec without sending any data)

[RightShift]+[""] [alfa] [alfa] +++ [ENTER]
[LeftShift]+[I/O] [NXT] [SERIAL] [XMIT]

(wait at least 1sec without sending any data)

[RightShift]+[""] [alfa] [alfa] ATH [ENTER]
13 [LeftShift]+[CHARS] [CHR] [+] [LeftShift]+[I/O] [NXT] [SERIAL] [XMIT]

   Note, however, that this, as most of what I have said here about modem 
commands, might vary depending on each modem's particular brand, model and 
configuration. You may need to read your modem's manual for more details.

   Disclaimer: As you'd expect, I take no responsibility for anything you 
may break, twist, cut, slice, burn, hurt, or otherwise damage while 
following these instructions.



Have fun,
Diego Berge. <dberge@mx2.redestb.es>
1998-07-31 01:59 UTC
