Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Lookout and Dial-Up Modem Settings

18 ratings | 3.39 out of 5
Print
This document discusses the considerations involved when setting up a dial-up connection between Lookout and a remote device. This document does not list instructions for setting up a modem communication that works in all configurations, for the following reasons:
          • Although all modems generally follow the Hayes Command Set, there are commands that are modem specific. For example &Kn is a modem-dependent command. While US Robotics uses it to set data compression, other modems use it for DTE/DCE flow control settings. Also, the number of supported commands can vary.
          • Modems come with pre-configured factory default settings that are modem specific.
          • Because modems are mostly used for Internet dial-up connections, they are optimized for this purpose. Data compression, buffering, quality checking, error checking, and so on, are set to maximize Internet connection performance, but can be harmful for PC-to-device configurations.
          • Settings are device dependent. For example, hardware handshaking requires different settings than no handshaking. Some devices require odd or even parity, while most modems do not support any parity at all.

If you need help setting up your modem to connect Lookout to a remote device, try the following:

1) Always check the recommended modem initialization strings with the device vendor. All major hardware vendors have tested their devices with the most common modems available on the market. There is usually a list of recommended modems along with their init strings available on the vendor's Web Site.

2) If your hardware vendor does not have a list of recommended modems, or if the list does not include your device, search the Internet. Use a search engine or newsgroup. Search for the modem name, device name, and "initialization string". Alter the search if you cannot find the answer (use "init string" for example). Remember that modems are often optimized for Internet use. You always have to consider the purpose of the connection. You probably need different settings for your device than for your Internet connection.

3) If none of the above helps, consider the following hints:

Check Configuration Elements
Modem configuration relies on two elements: AT commands and S-registers. Your modem documentation should list all supported AT commands and S-registers. S-resisters are storage for modem parameters. Not every modem has all registers. You can check the current value of a register using ATSn? where n is the register number. You can change a register value by executing ATSn=value(for example ATS37=0 sets the modem-to-modem communication speed to 9600).

Check Profiles
A modem configuration can be stored in a 'profile'. Modems usually support two profiles referred to as Profile 0 and Profile 1. Profile 0 gets loaded to 'Active Profile' when you turn it on. You can display all profile settings using AT&V. Here is an example of what you get after executing this command (only the Active Profile and Profile 0 are displayed in this example):

ACTIVE PROFILE:
B0 E0 L2 M0 N0 Q0 T V0 W0 X4 Y0 &C0 &D2 &G0 &J0 &K0 &Q0 &R1 &S0 &T4 &X0
S00:000 S01:000 S02:043 S03:013 S04:010 S05:008 S06:002 S07:050 S08:002
S09:006 S10:014 S11:095 S12:050 S18:000 S25:005 S26:001 S36:007 S37:009
S38:020 S44:020 S46:138 S48:007 S95:001

STORED PROFILE 0:
B0 E0 L2 M1 N0 Q0 T V1 W0 X4 Y0 &C0 &D2 &G0 &J0 &K0 &Q0 &R1 &S0 &T4 &X0
S00:000 S02:043 S06:002 S07:050 S08:002 S09:006 S10:014 S11:095 S12:050
S18:000 S36:007 S37:009 S40:105 S41:135 S46:138 S95:001

Here are a few useful commands for profile manipulation:
AT&V - display the profiles
ATZ0 - copy the Profile 0 to Active Profile (executed automatically on power-up)
ATZ1 - copy the Profile 1 to Active Profile
AT&F - load the factory defaults to Active Profile
AT&W0 - write the Active Profile to the Profile 0
AT&W1 - write the Active Profile to the Profile 1

Refer to your modem documentation for more details.

Alter Active Profile
After you power up your modem the Profile 0 is copied to the Active Profile. The profile is then manipulated by executing modem initialization string from Lookout Options >> Serial Ports.... The initialization string can be actually set as a part of the profile. For example if your init string includes &D0 command (DTR override), you can rather make it part of the profile, instead of explicitly executing it from Lookout. Be aware that the Active Profile is also altered by modem DIP switches in case your modem has them. Refer to the modem documentation for more details on DIP switches.

Use Auto-Answer Mode
Your remote modem has to be set for auto-answer mode. Make sure Profile 0 stores value 1 for register S0. You can execute the following command sequence to alter the value:
ATZ0 - load Profile 0 to Active Profile
ATS0=1 - set Auto-answer ON
AT&W0 - write the altered Active Profile to Profile 0

Disable Data Compression
Make sure both modems have disabled data compression. Check your modem documentation for %C0 and &K0. %C0 disables MNP5 data compression. &K0 is modem specific, but for some modems disables V.42 data compression. Alter Profile 0 with the following commands, if applicable to your modem:
ATZ0 - load Profile 0 to active profile
AT%C0 - disable MNP5 data compression
AT&K0 - disable V.42 data compression
AT&W0 - write the altered active profile to Profile 0

Use MNP Direct Mode
Make sure both modems are set to use MNP Direct Mode. Check the modem documentation for \N1 command.

Configure DTR (Data Terminal Ready)
Your remote modem is likely to have DTR set to Override (still ON). This means that the modem will always consider the device 'ready'. Your local modem is likely to have DTR set to Normal Mode. By default, Lookout uses DTR. It asserts the line before it transmits and unasserts it after it's done to hang up the modem. Refer to the .ini settings in Lookout for more information about how to set the hang-up mode for Lookout.

Verify the Communication in Hyperterminal
Connect your local modem to COM1 and the remote modem to COM2. Start two Hyperterminal sessions (Start>>Accessories). Make sure you configure the sessions for COM1 and COM2. Don't connect to the modems through their drivers. The drivers are executing an initialization string to reconfigure your modem. Execute ATDTnumber on the local modem. After the communication is established, you should see what you type in the other terminal window and vice versa. If the communication is garbled, make sure you are using the same port settings, including the baud rate.
If your communication works in Hyperterminal, but does not work with Lookout after following the steps in this document, contact National Instruments.


18 ratings | 3.39 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).