function [dataRecd] = Intercomm(dataSend)
COM = 'COM5';
pause on
%-------------------------------------------------------------------------

display('Welcome to UCLA AML Transmission Software');
display('Select configuration options:');
display('Default -OR- Custom');
configMethod = input('>>>','s');
if(strcmpi(configMethod, 'default'))
    %use defaults
    REMOTEIP = input('Please input IP address of remote station','s');
else
    %begin custom configuration
    display('Begin Configuration');
    display('Please input IP address of remote station:\r\n');
    REMOTEIP = input('>>>','s');
%     display(strcat('Serial COM Port Configuration. Default is ',COM));
%     COM = input('Wi232 Device: ','s');
    display(strcat('TCP/IP Port Information. Default is',...
                    int2str(PORT(1)),', ',int2str(PORT(2)),'.'));
    display('Note: port overuse is possible');
    PORT(1) = input('Local Port: ');
    PORT(2) = input('Remote Port: ');
end

try
% Setup tcpip object for internet data transfer.
tcpipClient = tcpip(REMOTEIP,'RemotePort',PORT(2),'LocalPort',PORT(1));
set(tcpipClient, 'Timeout', 99); %Allow long timeout for initial connection
display('Configuration complete. Ensure other party is online.');
display('Press ENTER to connect.');
pause();
try
fopen(tcpipClient);
catch err
    display(err);
end
set(tcpipClient, 'Timeout', 1); %Resume short timeout for normal running
%tStart = tic;
while(1) % loop (infinite, I'm sorry)
    if(tcpipClient.BytesAvailable ~= 0) %as soon as data is available
        dataRecd = fread(tcpipClient,64,'double'); % get data from buffer
        fwrite(tcpipClient,dataRecd,'double'); %write data back
        fwrite(wi232,dataRecd,'double');
    end
end

%tStart = tic;
% while(1) % loop (infinite, I'm sorry)
%     if(tcpipClient.BytesAvailable ~= 0) %as soon as data is available
%         fwrite(wi232,dataSend,'double');
%         fwrite(tcpipClient,dataSend,'double'); %write data back
%     end
% end

end

