Raspberry Pi with Multiple Dongles

It is very easy to run multiple instances of the rtl-tcp application on a Pi and so have several dongles being served through a single Raspberry Pi. To do this, we simply have to add some extra lines to the /etc/rc.local file to run multiple instances at boot. For details of how to set-up the Raspberry Pi as a dongle server see my post HERE.

Script Changes

To run additional rtl_tcp instances we just have to call them from the rc.local file as before but this time we need to be more specific and define the device number using -d and the access port using -p. Here’s a revised rc.local script to support up to four dongles:

sleep 10
_IP=$(hostname -I) || true
if [“$_IP”]; then
printf”My IP address is %s\n” “$_IP”
/usr/local/bin/rtl_tcp -a $_IP  -d0 -p1234 &

/usr/local/bin/rtl_tcp -a $_IP  -d1 -p1235 &

/usr/local/bin/rtl_tcp -a $_IP  -d2 -p1236 &

/usr/local/bin/rtl_tcp -a $_IP  -d3 -p1237 &
fi
exit 0

You will note that for each call to rtl_tcp, the device number and port number increment. You can use this code even if you’re only running one dongle as it will just throw a ‘failed to open error’ and move on. When running multiple instances of your SDR software on the PC you enter the same IP address but increment to port number, starting at 1234 then 1235, etc.

Network Considerations

The number of dongles you can successfully run will depend on two things, the Pi model you are using, i.e. a Pi-3 can handle more than a Zero. Also critical is the network connection. Ethernet is generally the best, whilst Wi-Fi success will depend very much on your router, Wi-Fi adapter and the signal strength. A modern fast Wi-Fi router combined with the Pi-3 should be good for a sample rate of 1024MSPS but an older router or weak Wi-Fi can easily limit you to 0.25MSPS or not work at all.

If you decide to use Ethernet it’s very easy to provide power over the Ethernet (PoE) cable so you only need one cable.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s