#!/usr/bin/python from socket import * import string import time import struct; import random; myport = random.randint(1025,65535); port = 10000 host = "10.45.4.43" myaddr = ("10.45.1.229",myport); buf = 100000; TCPSock = socket(AF_INET,SOCK_STREAM); #TCPSock = socket(AF_INET,SOCK_DGRAM); TCPSock.bind(myaddr); TCPSock.connect((host,port)); f_mhz = 2400; f_hz = 0; gain = 2; window = 3; #0=rect, 1=hanning, 2=hamming, 3=blackman #samples = 0xffffffff; #8-15 fft:(returns 2^number[8-15]) raw:(returns number) samples = 2; #8-15 fft:(returns 2^number[8-15]) raw:(returns number) decim = 2; #0-8 #decim = decim+16; # +16 to use 16bit instead of 32 bit mode = 1; #0=IQ, 1=MAG, 2=MAGDB sets = 0xffffffff; #sets = 1; fft_data = struct.pack(" 1): sets = 3; raw_data_2 = struct.pack("