In this step you make a connection between the test set and access terminal (AT). To do this you must first open a session from the AT. You may then open a connection from the test set or prompt the user to open a connection from the AT.
A session can only be established from the access terminal. The test set can not open a session.
An excerpt from the comprehensive example program is shown below:
1140 !************************************************************************** 1150 ! STEP 4: MAKE A CONNECTION (Open a session) 1160 !************************************************************************** 1190 ! Open a session with the AT and read AT parameters 2870 OUTPUT Testset;"CALL:DCONNECTED:TIMEOUT 30" 2880 ! Set connection change detector timeout 2890 OUTPUT Testset;"CALL:DCONNECTED:ARM" 2900 ! Arm the connection state change detector 2910 ! 2920 BEEP 2930 LINPUT "Connect AT and power on, press ENTER when session open",Keyboard$ 2940 DISP "Verifying session is open" 2950 ! 2960 OUTPUT Testset;"CALL:SOPEN?" 2970 ! Query the session open state 2980 ENTER Testset;Session_open 2990 IF Session_open=0 THEN 3000 ! If session did not open then end program 3010 BEEP 3020 Print_title("Access Terminal did not open session, check settings") 3030 Print_title("Terminating Testing") 3040 GOTO End_program 3050 END IF 3060 ! 3070 DISP "Session Open" 3080 ! 3090 !***Read ACCESS TERMINAL information*** 3100 ! 3110 OUTPUT Testset;"CALL:MS:REP:SSEED?" 3120 ENTER Testset;Sseed$ 3130 OUTPUT Testset;"CALL:MS:REP:HID:TYPE?" 3140 ENTER Testset;Hid_type$ 3150 OUTPUT Testset;"CALL:MS:REP:HID:HEX?" 3160 ENTER Testset;Hid_hex$ 3170 OUTPUT Testset;"CALL:MS:REP:HID:DEC?" 3180 ENTER Testset;Hid_dec$ 14550 Session_check: DEF FNSession_check ! Function to check session open state 14560 COM Testset,Result_file$ 14570 OUTPUT Testset;"CALL:SOPEN?" 14580 ! Query the session open state 14590 ENTER Testset;Session_check 14600 RETURN Session_check 14610 ! Function returns 1 for session open, 0 for idle or connected 14620 FNEND
In this step you first determine the status of the data connection. The data connection must be in the session open state before you can open a connection. If the data connection is in the session open state, then you:
An excerpt from the comprehensive example program is shown below:
1140 !************************************************************************** 1150 ! STEP 4: MAKE A CONNECTION (Open an RTAP connection) 1160 !************************************************************************** 3280 DISP "Opening (or Moving to) an RTAP Connection" 3290 ! 3300 IF NOT FNConnected THEN 3310 DISP "Connection is not currently open" 3320 ! If the state is NOT connected, then see if it is session open 3330 ! 3340 IF NOT FNSession_check THEN 3350 ! If the state is NOT session open, then end program 3360 Print_title("Session is not currently open") 3370 Print_title("Ending Testing") 3380 GOTO End_program 3390 END IF 3400 ! If the state is session open, then change to RTAP and 3410 ! open a connection 3420 DISP "Session is open, opening an RTAP connection now" 3430 ! 3440 OUTPUT Testset;"CALL:APPLICATION RTAP" 3450 ! Set application type to RTAP (for TX testing) 3460 OUTPUT Testset;"CALL:APPLICATION:RTAP:DRATE BPS9600" 3470 ! Set RTAP data rate to 9600 kbps 3480 GOSUB Start_data 3490 ! 3500 ELSE 3510 DISP "Connection is currently open, changing to RTAP" 3520 ! If state is connected, then change to RTAP 3530 OUTPUT Testset;"CALL:APPLICATION RTAP" 3540 ! Set application type to RTAP (for TX testing) 3550 OUTPUT Testset;"CALL:APPLICATION:RTAP:DRATE BPS9600" 3560 ! Set RTAP data rate to 9600 kbps 3570 ! 3580 IF NOT FNConnected THEN 3590 ! This additional loop is only necessary if Limited TAP is On 3600 DISP "Connection was closed when Application changed" 3610 ! If the state is NOT connected, then see if session open 3620 IF NOT FNSession_check THEN 3630 ! If the state is NOT session open, then end program 3640 Print_title("Session is not currently open") 3650 Print_title("Ending Testing") 3660 GOTO End_program 3670 END IF 3680 ! If the state is session open, then re-open a connection 3690 DISP "Session is open, re-opening an RTAP connection now" 3700 GOSUB Start_data 3710 END IF 3720 ! 3730 DISP "RTAP Connection Open" 3740 ! 3750 END IF 4340 Start_data:! 4350 !******************************************************************* 4360 ! Subroutine: Start data connection and verify it has connected 4370 !******************************************************************* 4380 ! 4390 OUTPUT Testset;"CALL:DCONNECTED:TIMEOUT 10" 4400 ! Set connection change detector timeout 4410 OUTPUT Testset;"CALL:DCONNECTED:ARM" 4420 ! Arm the connection state change detector 4430 OUTPUT Testset;"CALL:FUNCTION:DATA:START" 4440 ! Page the access terminal 4450 OUTPUT Testset;"CALL:DCONNECTED?" 4460 ! Query the connection status 4470 ENTER Testset;Data_started 4480 ! 4490 IF Data_started=0 THEN 4500 Print_title("Data connection could not be opened") 4510 Print_title("Ending Testing") 4520 GOTO End_program 4530 END IF 4540 ! 4550 DISP "Data Connection Open" 4560 ! 4570 RETURN 14460 Connected: DEF FNConnected ! Function to check connected state 14470 COM Testset,Result_file$ 14480 OUTPUT Testset;"CALL:DCONNECTED?" 14490 ! Query the connected status 14500 ENTER Testset;Connected 14510 RETURN Connected 14520 ! Function returns 1 for connected, 0 for idle or session open 14530 FNEND 14540 ! 14550 Session_check: DEF FNSession_check ! Function to check session open state 14560 COM Testset,Result_file$ 14570 OUTPUT Testset;"CALL:SOPEN?" 14580 ! Query the session open state 14590 ENTER Testset;Session_check 14600 RETURN Session_check 14610 ! Function returns 1 for session open, 0 for idle or connected 14620 FNEND