USRP B210 failed to send packets - usrp

I am trying to let USRP B210 communicate with USRP N210. I use the reference code in <>/gnuradio/gr-digital/examples/narrowband,benchmark_tx and benchmark_rx, to implement the communication. When USRP N210 works as a transmitter and B210 works as a receiver, everything is good. However, if I use B210 as the transmitter, I couldn't get anything at the N210 (receiver) side. And there is no obivous change if uhd_fft is used to detect the signal. I try the other B210 board and same situation happens. The followings are the commenda I used to run the python file:
python benchmark_rx.py -f 2.1G -r 200000 -m gmsk --args="addr=192.168.10.20"
python benchmark_tx.py -f 2.1G -r 200000 -m gmsk --args="type=b200"

Related

GSPD information stream timing out after 30 seconds

I am using a GPSD to feed GPS information to a virtual serial port. I'm generating the virtual serial port with socat, and I am listening to the virtual port using: sudo cat /dev/pts/2, where /dev/pts/2 is the drive created by socat. The GPS signal is being obtained in a C++ script . The C++ script is giving me the expected output every 1 second, but the information stream simply stops after 30 seconds.
What options can I consider in either the socat arguments or the GPSDO arguments in my C++ script, to lengthen the time past 30 seconds?
Socat in default setup has no timeout as long as both connections stay open. Apply options -d -d -d -d -lu to Socat to see in its output what happens!

How to start SIP Client Twinkle as service?

my apologies upfront for anything that i miss, it is my first question.
I was trying to setup my raspberry as sip client.
This sipclient would trigger a bash script to trigger the gpios.
finally this would be the interface for a door latch opener.
setting up the sip client works just fine.
triggering works also fine (after figuring out that every script has to have #!/bin/bash as header!)
going through a whitelist... everything perfect.
execpt:
i was not able to manage to start twinkle as "service" on start up.
start-stop-daemon --start --quiet --user pi --pidfile /var/run/twinkle.pid --make-pidfile --background --exec /usr/bin/twinkle -- -c
did not do the job.
export DISPLAY=:1
twinkle -c
works only interactively.
with xvfb installed.
/usr/bin/Xvfb :1 -screen 0 640x480x24 -ac +extension GLX +render -noreset
but twinkle seems to stop immediately when parent process is destroyed.
i also tried linphone... but could not figure out how to trigger my script :-(
another tool i tried was asterisk, but would not install on my raspberry.
after a long install process it just stopped. thats why i set it asside. i dont have the results anymore. sorry for that.
any help is appreciated.
i went a different route:
doorpi is the tool that gave me all the possibilities that i needed.
doorpi is running in background (as service)
doorpi is able to start a sip client and with that receive calls
doorpi can use the gpios

Process UDP packets and forward them at the same time

I have a question that is very similar to this question, but the solution provided is not working for me. And actually I want to do something a little different, so maybe there's a better way.
My hope is to send UDP unicast packets (a video stream) to a server. The server will forward these packets to another computer. Optionally, someone logged into the server will be able to watch the video stream using something like mplayer. I'm pretty sure I could stream the video both to the server and to the final destination from the video source, but I really want the server to be in control of that.
First Attempt:
Downloaded nmap to get the ncat tool. Thought I could use that to download and pipe bytes to mplayer and forward with another ncat process. I can pipe to mplayer and it works great, I just can't forward at the same time. If I was using Linux, apparently I could use tee and process substitution, but I'm looking for a Windows solution.
Second Attempt
I found a solution that kind of implied piping to multiple programs would be possible in PowerShell. But what I found is that binary piping wasn't going to work.
Third Attempt
I attempted to program a tee-like executable that would tee to two programs. This was about as close as I got, but the video streams seemed to get a bit corrupted. I think it was more of a performance issue than anything.
Fourth Attempt
Now I'm at the point where I've discovered socat which led me to the question I linked to. It seems odd, but I thought a solution would be for my server to forward packets to the destination AND forward packets to a different port on the server which would be used with netcat or socat to pipe into mplayer. I'd rather not use up another port on the server, but if that's what I have to do, then ok. But like I said, the solution from the other question didn't seem to work. Mplayer started to buffer, then stopped very shortly.
Ran each of these in a separate cmd window in this order. Notice I wasn't trying to forward to the destination computer yet, just trying to get mplayer to work on the server.
socat UDP4-LISTEN:5000 UDP-DATAGRAM:224.10.10.10:5001
socat UDP4-RECVFROM:5001,ip-add-membership=224.10.10.10:0.0.0.0,reuseaddr,fork UDP-DATAGRAM:192.168.16.33:5002
ncat -l -u -p 5002 | mplayer -vo direct3d -cache 1024 -
I seem to get about 924 bytes received according to MPlayer output.
I'm fresh out of ideas, though I will continue learning about socat. I assume I am not running socat correctly, but I'm not really sure where the issue is. If anyone can point out my mistake or offer an alternative solution I'd really appreciate it. Thanks.
Edit:
I did some more testing and if I change the second socat to do this:
socat UDP4-RECVFROM:5001,ip-add-membership=224.10.10.10:0.0.0.0,reuseaddr,fork - | mplayer -vo direct3d -cache 1024 -
I find that it will play the stream from the multicast address. But apparently forwarding to the unicast address on port 5002 is what's not working.
Ok, I'm not really sure why this is, but the netcat process that worked fine to receive the UDP packets from the sender and pipe to MPlayer does not work here. I'm not sure what the problem is.
So instead of:
ncat -l -u -p 5002 | mplayer -vo direct3d -cache 1024 -
I had to use:
socat UDP4-RECVFROM:5002,fork - | mplayer -vo direct3d -cache 1024 -
Though I do still have one small problem. If I close MPlayer, I get a ton of messages like:
2015/02/24 11:14:04 socat[5888] E write(1, 0x800432e8, 986): Broken
pipe
Also if I hit Ctrl-C from the command line it takes a few tries and then when MPlayer stops, my keyboard no longer works and I have to start a new cmd window.

How can I tell what host a packet comes from using netcat?

I'm trying to write a server using netcat and bash. to recieve asynchronous packets, i'm using the command
netcat -lu 6791
How can I tell what host a packet came from? Is there a better tool i should be using then netcat (socat maybe?)
wireshark (GUI tool), tshark (text-based version of wireshark), and/or tcpdump (very similar to tshark, at least until you start messing with filtering out specific packets or searching for certain patterns or anything more complex) come immediately to mind...
#twalberg's suggestion,
netcat -vv -lu -p 6791 worked.

How can I send a string to serial /dev/tty.* port, delay a second, disconnect from the port and continue my bash script in OSX?

This is in relation to resetting an Arduino, and then start pushing data to it from my usb xbee.
I've tried using screen, with no luck.
screen -S Xbee -d -m /dev/tty.usbserial-A900fra9 115200 *reset
I don't know how to close this session, not sure whether the args are correct, either.
to send anything to devices on /dev, you can use the > >> 2> 2>&1, etc.
Try this example from tty1 (ctrl+alt+F1):
echo "my string" > /dev/tty2
now go to tty2 (alt+F2) and you gonna see your string. It should work with any device.
and to sleep, use:
sleep 1
your problem could be also with permissions. Try it with root! ;)

Resources