Home       Excerpts-ScopeDrive List    mirror        mirror cell-movable mirror       OTA      dimensions and specifications        mount     focuserend                                                                          

 

MAKING  A  DIRECT  SERIAL  CONNECTION  THROUGH  MODEMS

MOTOR CONTROL COMPUTER    <=>   PLANETARIUM COMPUTER

>>>>>>>>>>>>>>>>>>>>

From:  Chuck Shaw

To: ScopeDrive@yahoogroups,com 10/23/01   One of the benefits of scope.exe is that it can run a mount from a very modest computer, like old 486 laptops. The problem with that however, is they usually only have one serial port, so hooking up that laptop to a 2nd one running a planetarium program cannot be done. However, I wonder if anyone has tried to use a modem to do that? My  creaky old Compaq LTE Lite (25mhz 486) that I use to run scope.exe has both a serial port, and a trackball, and an internal modem. Now I think I can assign the DB9 serial port to Comm1, and use Comm2 for the modem.  

Has anyone done that??? I wonder if I would be able to use the modem while scope.exe is running? I suspect not, since scope.exe does not like to live in a windows environment, and in a DOS6.22 environment (which is what I have on the machine) its only one program at a time (I have to go back and forth between scope.exe and  Guide, and that requires stopping tracking and turning off power to the motors when I go over to Guide from scope.exe). How involved would it be to add a terminal type capability to scope.exe to be able to communicate via Comm1 to encoders, and also exchange LX200 data with another PC via a modem on comm2???

>>>>>>>>>>>>>>>>>>>>>>>>>>

                          

                             

WARNING!!   POLARITY MATTERS! THE CAPACITORS CAN EXPLODE IF CONNECTED BACKWARDS.

"On an Aluminum Electrolytic capacitor with radial leads the long leg lead is always the positive or anode lead on the capacitor. The capacitor should also have the polarity marked on the capacitor. This is usually an arrow with a negative sign in it. The should be pointing to the short or cathode lead of the capacitor. The exception to this is a nonpolar Aluminum Electrolytic capacitor which will have no polarity marking on it since the capacitor is nonpolar. Nonpolar electrolytics may still have two different lead wire lengths but this does not imply any polarity preference. If you have any questions please call us at 1-847-675-1760 for assistance."   Illinois Capacitor.

 

The above circuit  is wired into the back of a RJ-11 standard 2 jack wall outlet.  The red and green are crossed over to change the phone cable into a null cable.  The resistor is matched to the battery voltage to deliver ~20ma.  e.g. for a 12 volt battery use a 600 ohm resistor.  The .47 uf bypass capacitor blocks dc and passes voice frequencies.

This little RC circuit delivers a bias current to the modems that mimics the 20-24ma current provided by the phone company.  The current fools the modems into acting as if they were on phone lines and allows the 2 computers to communicate with each other as they would over a standard serial port.  In my case, Scope.exe is on one computer operating in DOS, and Guide8.exe on the other operating under Windows 98.

My computers:

1.   IBM Thinkpad 755cse      486 100mhz Mwave (virtual) modem                    Software:  DOS6.22     Scope.exe

2.  IBM Thinkpad  760xl        pentium  166mhz   Qualcomm v.34/33.6 pcmcia    Software  Win 98       Guide8.exe

                  I do not recommend these IBM's for the DOS side of this sort of work.  The virtual modem is a pain.  

Setting up the Scope.exe (dos) computer:

First open config.dat and set the lx200 com port to the modem's location.  Then at the dos prompt:

In my case I must add a serial port at com2 and configure it to run at 9600 baud, so: 

c:\>addport com2 2f8                                Addport.zip

c:\>slikmode /b9600 /c2 /d8 /pn /s1          Slikmode.zip          If connection made is below 9600, try 19200.

(Begin here if you can configure the com port in the bios.)

c:\>echo atx1&k0>com2                            or which number is the com port of the modem

c:\>echo at+ms=10,0,9600,9600>com2

c:\>echo atdt1234>com2                         the t in dt just tells the modem to generate a dialing tone so you know what is going on.

c:\>scope.exe

Then turn on ls200 serial port monitor so you know what is coming into Scope.

                                     ------------------------------------------

     * all this can be automated with a batch file named something like:  "a.bat"       (then you will have single keystrokes to run things.)

           call addport com2 2f8                                                      

           call slikmode /b9600 /c2 /d8 /pn /s1 

           echo atx1&k0+ms=10,1,9600,9600>com2

 

and:     d.bat  ----  echo atdt1234>com2                

 

Then:

c:\>a <enter>         If you are experimenting with settings, it can be helpful to make several files a.bat, b.bat, c.bat each with a portion of the instructions.

c\>d <enter>

c>>s <enter>         Make a batch file s.bat to run c:\scope\scope.exe

                                          ----------------------------------------------

What the modem commands mean:

{atx1}     tells the modem that there will be no dial tone

{&k0}     tells the modem to use no flow control.    

{at+ms=10,0,9600,9600} sets the upper and lower limits the modem can connect at.  10 is the modulation mode, 0 means to refuse the connection if it cannot be made at 9600 baud.  (1 would mean connect at any other speed if 9600 cannot be made.)  9600,9600 gives the lower and upper limits the modem is allowed to connect.  Scope and Guide require a 9600 baud connection.  No other speed will work.

{atdt1234} tells the modem to dial and generate a tone for each number  the number doesn't matter and you can skip it by using 'ATD'  This will time out in about a minute if no connection is made.

If you have trouble connecting at 9600, go to the Windows (Guide8) computer's serial port setting and slow down the transmit and receive buffers.  

Control Panel -> Modem-> Properties -> Connection -> Port Settings.  This is one of those situations in life where you may have to go slower in order to go faster.  Enable FIFO inventory control.

Troubleshooting the DOS connection

Setting up the Planetarium (Windows) computer:

The problem we run into is connecting the planetarium program to the modem.  It has no issues with seeing the modem as a serial port, it just needs to find it open when looking for the serial port. Hyperterminal won't do this because the Windows resource manager won't let two programs access the 

modem at the same time. And when Hyperterminal closed down, it closes down the modem connection.  so

At Chuck Shaw's request Dave Lane at Earth Centered Universe was good enough to write and make available a little program, modem.exe, that opens the modem connection and then closes itself down while leaving the connection open for the planetarium program.  It reads the modem init strings from a text file, modem.txt, of fixed 4 lines length.  The first is the com port number.  The next 3 lines are modem strings. 

1

atx1&k0

at+ms=10,1,9600,9600

atdt1234

Close down modem.exe

Open the planetarium program and do the same things you would do if the modem were a serial port.

Chuck Shaw serves up modem.exe from his website and there you can find much the same information that is presented here, but for a different 

set of computers.

Note -  some modems which support leased lines will respond "OK" to the command "&L1".

 

Alternate circuit with voltage regulator allowing input voltages between 7 and 25 volts.

WARNING!!   POLARITY MATTERS. THE CAPACITORS CAN EXPLODE IF CONNECTED BACKWARDS.

Note: The specified parts are just the ones I used and are not the only ones that will work.

© 2002 Ben Davies