I want to send the payload which is 6 bytes of hex : "8000000004d2" using udp package provided by tcl. I am able to send it and on the receiver pc i am able to read the same data. But in the wireshark capture it shows 12 bytes of payload, because it sends this data in ascii format like "38 30 30 30 30 30 30 30 31 32 33 34". Can anybody please tell me is the data really getting transmitted as 12 bytes or only Wireshark is interpreting it false. If the data is getting transmitted as 12 bytes, can anybody help me out to send it only in 6 bytes using tcl udp package only. For reference i am giving the udp sender code
UDP sender code :
namespace eval soc {
variable s
}
set soc::s [udp_open]
udp_conf $soc::s $IP_ADDR_RX $UDP_PORT
fconfigure $soc::s -buffering none -translation binary
set data 1234
append hex [ format %04X [ expr $i | 0x8000 ] ]
append hex [ format %08X [ expr $data ] ]
puts -nonewline $soc::s $hex