Simulink TCP communication - how can I get two Simulink models to talk over the network?

2 views (last 30 days)
Here's the situation:
I have two Ettus Research B210 USRPs connected to two separate workstations, one running Windows and one running Linux. Both have MATLAB R2015a with Simulink and the Instrument Control toolbox connected.
I want to be able to have Computer #1 generate a random bitstream and send it over the network to Computer #2. Computer #2 then uses this bitstream to create a bandpass modulated digital signal and then transmits it over-the-air using its USRP. Computer #1 receives this signal on its USRP, and demodulates the data to recover the original bitstream. This bitstream is then time delayed to match the original bitstream using the "Align Signals" block and then the bit error rate is computed. This way I can test different modulation schemes and forward error correction over-the-air.
The trouble is "TCP/IP Send" and "TCP/IP Receive" blocks don't play well together as they both act as clients (ie: they error out if I try to launch them as they both try to connect to the other machine). Is there a way to have the "TCP/IP Receive" block as a listening server or vice-versa?
I tried UDP instead and it's far too unreliable on my network. As a workaround I could connect the machines with a null modem cable and do the communication over RS-232 but I'd like a solution that's more this century.

Answers (0)

Categories

Find more on Communications Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!