scpl command

All those commands that we don't really use very often, but that we should ! Documented or not, they worth it !
Post Reply
User avatar
alex
Senior Member
Posts: 1498
Joined: 06 Jul 2004 07:27
Contact:

scpl command

Post by alex »

With "scpl" you can send a message "on behalf" of CPU to a coupler.Any message to any coupler can be sent, e.g. reset, download etc.
"scpl" takes its input from text file.Following script will create such file named "cmd" so you can see how it looks like.Later you can just run "scpl cmd".
This script displays text on chosen UA set.

Code: Select all

#this code is provided without any warranty
#and distributed for educational purposes only
#use at your own risk
#author has no responsibility for any damages it  will cause do to you system!
#this script designed for UA 4034/4035 sets with large display
#Actually will be no problem on 4023/4020 etc. but user will see just part of a string
DESTI=0
SRC_ID=0
TYPE_ID=161
DATA_SRC="23 00 39 00 00 66 105 71 32 66 114 111 116 104 101 114 32\
 105 115 32 119 97 116 99 104 11 00 39 01 20 105 110 103 32 121 111 117 33"
echo "input cr_nbr.: \c"
read CR_NBR
echo "input cpl_nbr.: \c"
read CPL_NBR
echo "input us_term.: \c"
read US_TERM
echo "input term_nbr.: \c"
read TERM_NBR
echo $DESTI > cmd
echo $SRC_ID >> cmd
echo $CR_NBR >> cmd
echo $CPL_NBR >> cmd
echo $US_TERM >> cmd
echo $TERM_NBR >> cmd
echo $TYPE_ID >> cmd
echo $DATA_SRC >> cmd
tool scpl cmd
Paste this script to any file under "mtch" When you "cat <file_name>" it should look exactly like on this screen with at least 1024x768 resolution!In case there are additional CR&LF added to it it can cause full reset of the whole UA board! This script should be executable.Under Linux run it like "./<file_name>".Exactly this script is checked under 5.0Ux and works fine on UA 4035/4034/4023.
For you programmers - create a shell script which allows to send any message to any user according to his set type -i.e. you input a text message and script will create DATA_SRC accordingly and share it here!

Have fun :D
vad
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 3856
Joined: 23 Sep 2004 06:47

Post by vad »

Hi Alex,
when I try, I see echo - input cr_number: \c
after input 0 (crystal number) system answer ': not a valid identifier
But when I make text file himself, scpl file.txt works perfectly.
User avatar
frank
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 3404
Joined: 06 Jul 2004 00:18
Location: New York
Contact:

Post by frank »

Hey Alex,

What do US_TERM and TERM_NBR stand for ?
I though one should be the terminal number on the coupler ?

Thank you !
Code Free Or Die
vad
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 3856
Joined: 23 Sep 2004 06:47

Post by vad »

US_TERM in usual case=0, TERM_NBR = equipment address.
Problem with script solved. In my case different lines was separated with "0D 0A", if we use only "0A" script works.
User avatar
alex
Senior Member
Posts: 1498
Joined: 06 Jul 2004 07:27
Contact:

Post by alex »

frank wrote:Hey Alex,

What do US_TERM and TERM_NBR stand for ?
I though one should be the terminal number on the coupler ?

Thank you !
Hi Frank
You do not know standard header structure?Well....Looks like you never used "mtracer" command. :D Similar header us used on many systems (first I saw it on Nokia DX200).
Here it goes (one more time mind all possible CR&LF inserted!)

Code: Select all

 reserved_1  - reserved
 reserved_2 - reserved
 lng[2] - complete message length including length
 desti -  software application which will handle the message
 src_id -  reserved
 cr_nbr -  crystal number 0=main crystal etc
 cpl_nbr -  coupler or board number (shelf slot position)
 us_term -  in case of terminal connected behind US board
 term_nbr -  terminal number or access number
  type -  message type 

Here goes an example - calling of UA set (only header shown)

Code: Select all

Dump: .00.00.40.00.00.0f.00.05.08.0b.a1
Post Reply

Return to “Usefull commands”