Dear community, I'm going crazy to convert TCP response to HEX using perl. I have a simple connection request where I send data, something like:
Then I send SMPP data:
This works perfect, server receive the SMPP string and reply with data. At this point I intercept the response:
The problem there is that I receive ascii data like:
What I need is convert what I receive from server (bytes??) in hex:
How can I do that?
Thank you
Lucas
---------- Post updated at 01:43 PM ---------- Previous update was at 11:58 AM ----------
Hi All,
I want to convert below Hex value to Dec value in each column .How to do it ? This data is in a 1 file.
4e20 0475
2710 010f
7530 69a2
7530 7e2f
4e20 02dd
7530 6299
4e20 0c0a
7530 69a2
4e20 0a0b
2710 0048
7530 7955
4e20 0d23
7530 622d
7530 9121
2710 001f
7530 7d3f (6 Replies)
i want to convert Hex value To EBCDIC value.
i tried to convert hex to ascii and then to ebcdic but it doesn't give desired results .
it doesn't give corresponding ebcdic value instead it gives some junk values.
e.g;
Hex EBCDIC
-----------------
81 a
82 b
83 c
84 d
85 e
86 f
87... (6 Replies)
Hi,
please tell me how to convert hex number to decimal
000000E7
000000000002640D
0000000000025B16
and seconds to minutes, hours, days, months, years
bytes to kbytes, mbytes , gbytes
read the following examples
while read a b
do
printf "%5d %5d\n" "0x$a" "0x$b"
done < "$FILE"... (15 Replies)
Please Help Me! about the problem down under.
I have 2 files with nearly the same characteristics, I have to convert one to the other format or the other format to one's format. I want to write it with awk.
The first file contain lines like this:
300000001#A#Y#Y#Y#Y
The other file contain... (4 Replies)
Hello,
I woild like to convert hex on KSH not BASH:
I tried to use:
tmp=31
printf "\x"${tmp}""
it works on bash - Output is '1' but not on ksh.
please advice on the right syntax.
Thanks. (4 Replies)
Hi,
i want to convert number 5860533159 to hexadecimal. i need to use perl.
i used
$foo = 5860533159;
$hexval3 = sprintf("%#x", $foo);
i am getting value as 0xffffffff.
i need to get value as 0x15D50A3A7. when i converted using google calculator, i got the correct value, expected... (9 Replies)
can someone help me in converting hex streams to decimal values using perl script
Hex value:
$my_hex_stream="0c07ac14001676";
Every hex value in the above stream should be converted in to decimal and separated by comma.
The output should be: 12,07,172,20,00,22,118 (2 Replies)
When I try to convert big numbers I get extra numbers at the end that doesn't move plus an L character too. How to remove the 4 extra characters at the end 000L?
8b8dbbc584d9c000L
8b8dc4ddd34c6000L
8b8dcdf621bf0000L
8b8dd70e7031a000L
8b8de026bea44000L
#!/usr/bin/python
... (9 Replies)
Discussion started by: bigvito19
9 Replies
LEARN ABOUT DEBIAN
tcpcli
TCPCLI(1) BP executables TCPCLI(1)NAME
tcpcli - DTN TCPCL-compliant convergence layer input task
SYNOPSIS
tcpcli local_hostname[:local_port_nbr]
DESCRIPTION
tcpcli is a background "daemon" task comprising 1 + N threads: one that handles TCP connections from remote tcpclo tasks, spawning sockets
for data reception from those tasks, plus one input thread for each spawned socket to handle data reception over that socket.
The connection thread simply accepts connections on a TCP socket bound to local_hostname and local_port_nbr and spawns reception threads.
The default value for local_port_nbr, if omitted, is 4556.
Each time a connection is established, the end-points will first exchange contact headers, because connection parameters need to be
negotiated. tcpcli records the acknowledgement flags, reactive fragmentation flag and negative acknowledgements flag in the contact header
it receives from its peer tcpclo task.
Each reception thread receives bundles over the associated connected socket. Each bundle received on the connection is preceded by message
type, fragmentation flags, and size represented as an SDNV. The received bundles are passed to the bundle protocol agent on the local ION
node.
tcpcli is spawned automatically by bpadmin in response to the 's' (START) command that starts operation of the Bundle Protocol; the text of
the command that is used to spawn the task must be provided at the time the "tcp" convergence layer protocol is added to the BP database.
The convergence layer input task is terminated by bpadmin in response to an 'x' (STOP) command. tcpcli can also be spawned and terminated
in response to START and STOP commands that pertain specifically to the TCP convergence layer protocol.
EXIT STATUS
0 tcpcli terminated normally, for reasons noted in the ion.log file. If this termination was not commanded, investigate and solve the
problem identified in the log file and use bpadmin to restart tcpcli.
1 tcpcli terminated abnormally, for reasons noted in the ion.log file. Investigate and solve the problem identified in the log file,
then use bpadmin to restart tcpcli.
FILES
No configuration files are needed.
ENVIRONMENT
No environment variables apply.
DIAGNOSTICS
The following diagnostics may be issued to the ion.log log file:
tcpcli can't attach to BP.
bpadmin has not yet initialized Bundle Protocol operations.
No such tcp duct.
No TCP induct matching local_hostname and local_port_nbr has been added to the BP database. Use bpadmin to stop the TCP convergence-
layer protocol, add the induct, and then restart the TCP protocol.
CLI task is already started for this duct.
Redundant initiation of tcpcli.
Can't get IP address for host
Operating system error. Check errtext, correct problem, and restart TCP.
Can't open TCP socket
Operating system error. Check errtext, correct problem, and restart TCP.
Can't initialize socket
Operating system error. Check errtext, correct problem, and restart TCP.
tcpcli can't create access thread
Operating system error. Check errtext, correct problem, and restart TCP.
BUGS
Report bugs to <ion-bugs@korgano.eecs.ohiou.edu>
SEE ALSO bpadmin(1), bprc(5), tcpclo(1)perl v5.14.2 2012-05-25 TCPCLI(1)