I am using GNU Radio to send out UDP packets to port 12345 using the Socket PDU block with UDP Server.
I know it is possible to listen to a port using NetCat provided it is a incoming transmission but since this is coming from my own computer, how do i listen to the port 12345? I tried to use nc -u -l -p 12345
but it says port is in use as expected.
I am currently running Ubuntu 18.04.1 LTS
Start the GNU Radio flow graph first and then try
nc -u 127.0.0.1 52001
Every line you type will be sent as one UDP packet to the flow graph. The socket PDU block will output it as a PDU. And everything that is sent to the Socket PDU block in GNU Radio will show up in your terminal.
The problem with your command is the -l
switch. It tries to bind to the port that is already in use, i.e., open another server. You want to connect with netcat as a client. (Also -p
sets the port as the source port for my netcat version. You want 52001
to be the destination port.)
Note, since the flow graph is the server, you first have to connect by sending something to it. You can just press enter to send an empty UDP frame when netcat is started or type whatever.