Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems in LD 2 - STAD script

Status
Not open for further replies.

drange

Technical User
Dec 29, 2005
30
NO
I have a computer running Debian connected to the Nortel Meridian Opt 81. At 0430 a.m., a script is running to syncronize the system clock with our NTP server.

So the script goes as following:

ntpdate ntp.serverfarm
echo "logi username" > /dev/ttyS1
sleep 1
echo "********" > /dev/ttyS1
sleep 1
echo "ld 2" > /dev/ttyS1
sleep 1
echo stad $(date [a_long_string])
sleep 1
echo "****" > /dev/ttyS1
sleep 1
echo "logo" > /dev/ttyS1


The problem is where I set the date (the stad line). When it has sent the whole line but the seconds, a strange character appears insted of i.e. 42.
Then I get the TRC0200 (Syntax error) and nothing happens.

So I guess the Opt 81 is incapable of receiving text that fast, but I don't know how to fix this problem...

So, any ideas?
 
here is the one i use, this one logs me on and sets the time, and date.. the txpace line slows the script down to switch speed..
Code:
proc main
   
   ;loop:

   set txpace 50	
   transmit "****^M"
   waitfor ">"
   transmit "john^M"
   
   transmit "****^M"
   waitfor ">"
   transmit "log iXXXX^M"
   pause 1 
   transmit "XXXXX^M"
  
   call myproc 
   
   
   ;goto loop
endproc
proc myproc   
integer iDay, iMonth, iYear, iMin, iHour, iSec
string sSend
  
   ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
   
   strfmt sSend "STAD %02d %02d %d %02d %02d %02d" iDay iMonth iYear iHour iMin iSec
   set txpace 30
   transmit "****^M"
   waitfor ">"
   
  ; pause 6
   
   transmit "ld 2^M"
   waitfor "."
   
   transmit "TTAD^M"
   waitfor "."
   transmit sSend
   transmit "^M"
   waitfor "."
   
   pause 2
   transmit "TTAD^M"
  
   pause 2
   transmit "****^M"
 
  endproc

john poole
bellsouth business
columbia,sc
 
thanks, coming from you, i'm going to frame it

john poole
bellsouth business
columbia,sc
 
You aren't actually helping. I'm not using procomm. What I wrote is a bash script. And the problem is that echo sends character faster than LD 2 can receive. So what I really needs, is to find out how to halt echo in the middle of a line for half a second. I guess this is the wrong place to ask...
 
They are helping you to realize it might not be the right forum. They might have even made all that stuff up, but I can confirm they were being honest. You've got to give credit for that.

It looks like you need to ask in comp.dcom.halt-echo-in-half-second. I know the moderator, tell him you speke to Noman.

TEKIMG.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top