Archive for August, 2011

How to send audio between two Linux computers using netcat

Apparently there is no dead simple way to send audio from one computer to another in a low(er) latency way.

Can’t beat this, works for any ALSA app that you can change the output for (or just change your default in .asoundrc).

On source computer:
modprobe snd-aloop
arecord -f cd -D hw:Loopback,1,0 | netcat dest 1234
mplayer -ao alsa:device=hw=Loopback.0.0 something.mp3

On destination computer:
netcat -k -l -p 1234 | aplay

Update: Oh, and apparently you can do this in Windows, too.

Linux layer 2 bridging can’t do Firewire

Well, it seems and the Linux kernel can’t bridge dissimilar network types, which means I can’t bridge Ethernet and Firewire (workaround until I replace my NIC in my desktop because it fried, having my laptop route for my desktop).

My laptop’s IP is
My desktop’s IP is
My router’s IP is

So, the work around seems to be this…

On the laptop, with eth0 already up:
ifconfig firewire0 up
route del -net netmask dev firewire0
route add -host dev firewire0
iptables -F
echo 1 > /proc/sys/net/ipv4/conf/all/forwarding

On the desktop:
ifconfig firewire0 up
route add default gw

To make this permanent, you would edit /etc/networking/interfaces like this…

On the laptop:
auto eth0
iface eth0 inet static
post-up ifconfig firewire0 down
post-up ifconfig firewire0 up
post-up route del -net netmask dev firewire0
post-up route add -host dev firewire0
post-up iptables -F
post-up iptables -P FORWARD ACCEPT
post-up echo 1 > /proc/sys/net/ipv4/conf/all/forwarding

On the desktop:
auto eth0
iface firewire0 inet static