Title |
How to setup a modem under QNX2 |
Ref. No. |
QNX.000009331 |
Category(ies) |
Utilities, Installation, Configuration |
Issue |
We're attempting to install our modem under QNX2, but can't get it going. What should we do?
|
Solution |
If your modem is set for auto-answer and hooked into a serial port, then people calling in will get CARRIER but will have to hit <CTRL>-<Z> to get a login prompt. They'll also have to remember to hang up the modem when they exit. All this (not to mention many other fine features) can be done automatically by the QNX comm utility.
To call out, all you need to do is run Qtalk or Qterm. If this doesn't work, make sure that you've turned on the interrupt for any serial port other than $mdm and that the modem switches are in their default position.
We provide online documents on QUICS under /nfree/comms/modems that can help you set up an HST, Hayes, or Telebit modem. But if your modem isn't working, it's pretty hard to call in and get those down! x09An example of our sys.init.x file for a Hayes modem on $mdm would be:
slay comm u=8000 -v -q stty +FIX >$mdm stty esc=0 -iflow -oflow -igate baud=2400 >$mdm ontty $mdm comm m="Welcome" b=2400 +h l=/commlog
x09If you want to log incoming calls and error messages to a logfile, make sure that the directory /commlog exists. The modem initialization string (assumed by comm) is set up to use the default values, namely:
ATS0=0x09don't answer automatically E1x09command char echo enabled Q0x09result code sent 1x09English result codes 1x09extended status set &C1x09DCD indicates carrier detect &D3x09return to default status after loss of DTR
x09Remember to enclose your init string in quotes if you have any spaces. x09The reason the ATS0=0 is specified to the modem is that comm will detect an incoming call and then instruct the modem to answer. This will prevent the modem from answering the phone when comm isn't running or when the system is powered down. Problems occur when both comm and the modem are instructed to answer the phone. Usually, the modem will answer but comm will cause a hangup. If you look in your logfile, a hangup usually represents a conflict in who's going to answer the incoming call. Once comm answers the phone and has determined the baud rate, it will display the message specified by m= and will perform various checks depending on which command-line options were specified (see the comm utility documentation for options). x09We realize that comm is a program that many people would like to modify, so the source is available for download from QUICS and is also shipped with the Quantum C compiler. x09Some modems, such as those from Telebit and U.S. Robotics, require that the port be configured for hardware flow control. Thus, the stty option line in your sys.init.x file should contain:
stty +hflow +iflow +oflow +split >$mdm
x09Another problem can occur when trying to dial out from a place where you first have to get an outside line. In this case, you should put a few commas (,,,,) in your dialing directory for each call number after the number required for an outside line. This will institute a pause (one second for each comma), enabling you to pick up that outside line. When calling out using Qterm, make sure that you have your modem entered in the /qterm/modems file. An example entry would be:
x09tty3x092400x09Hayes
x09Problems often occur due to hardware conflicts or incompatibilities. If you suspect your serial ports, there's an excellent program on QUICS called watch which lets you monitor your serial ports as well as transmit and receive characters from them. It can be found under /nfree/quantum/watch.
x09Another area of concern is the UART. Apparently, the 8250 UART can cause system hangups on incoming calls. This problem has been cleared up by substituting the 16450 or 16550 UART. If interrupts are turned off, the clock stops, and the system won't allow a warm boot, then this may be the solution you're looking for.
|
|