User Tools

Site Tools


wifiaudio:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
wifiaudio:start [2015/12/23 14:00]
tschulz
wifiaudio:start [2016/01/04 10:26]
tschulz [Wifi Setup]
Line 2: Line 2:
  
 ===== How it Works ===== ===== How it Works =====
-  * Essentially we are using NETCAT to pipe audio from a mic input on one computer to the audio output of another computer. +  * Essentially we are using **NETCAT** to pipe audio from a mic input on one computer to the audio output of another computer. 
-  * It appears that ssh adds a lot of latency around 1-2 secs which is not acceptable more most instances+  * It appears that **ssh** adds a lot of latency around 1-2 secs which is not acceptable more most instances
   * Netcat on the receiver need to starts before the transmitter starts to send otherwise the transmitter script will exit with a connection refused. ​   * Netcat on the receiver need to starts before the transmitter starts to send otherwise the transmitter script will exit with a connection refused. ​
  
 ===== Requirements ===== ===== Requirements =====
-  * Alsa needs to be working on both computers and alsa-utils should be installed to save mixer settings +  ​* **Alsa** needs to be working on both computers and alsa-utils should be installed to save mixer settings 
-  * aplay/​arecord also need to be installed along with netcat. ​ In most distributions they are installed as base packages+  ​* **aplay/​arecord** also need to be installed along with **netcat**.  In most distributions they are installed as base packages
   * Obviously some sort of tcp/ip must be running to for the netcat communication to work.    * Obviously some sort of tcp/ip must be running to for the netcat communication to work. 
  
 +===== Wifi Setup =====
 +
 +<file bash /​etc/​network/​interfaces>​
 +...
 +auto wlan0
 +iface wlan0 inet dhcp
 +        wpa-ssid ssid
 +        wpa-psk ####
 +
 +...
 +</​file>​
 +
 +===== Audio setup =====
 +
 +  * By default the usb audio adapter is detected as card 1 not card 0(default). ​ I tried disable the bcm sound module but for some reason that disables the mixer of the usb audio adapter.
 +  * I was able to set the default card using asound.conf
 +
 +<file bash /​etc/​asound.conf>​
 +pcm.!default {
 +    type hw
 +    card 1
 +}
 +
 +ctl.!default {
 +    type hw
 +    card 1
 +}
 +</​file>​
  
 ====== Receiver ====== ====== Receiver ======
Line 17: Line 45:
  
 PORT="​8080"​ PORT="​8080"​
-RATE="5+RATE="2
-BUFFER="​50"+BUFFER="​10"
 FORMAT="​cd"​ FORMAT="​cd"​
  
Line 28: Line 56:
  
 ====== Transmitter ====== ====== Transmitter ======
 +  * **RECV_ADDR** will need to changed to something valid like a ip address or a hostname/​fqdn.
 <file bash wifi_audo_send.sh>​ <file bash wifi_audo_send.sh>​
 #!/bin/sh #!/bin/sh
  
 PORT="​8080"​ PORT="​8080"​
-RATE="5+RATE="2
-BUFFER="​50"+BUFFER="​10"
 FORMAT="​cd"​ FORMAT="​cd"​
  
Line 42: Line 70:
 arecord -B ${BUFFER} -r ${RATE} -f ${FORMAT} | netcat ${RECV_ADDR} ${RECV_PORT} arecord -B ${BUFFER} -r ${RATE} -f ${FORMAT} | netcat ${RECV_ADDR} ${RECV_PORT}
 </​file>​ </​file>​
 +
 +====== Price List ======
 +
 +[[https://​docs.google.com/​spreadsheets/​d/​1jROjZBKDP32I1MQKS9gV2c9oLo5q8K8QiZUgWr6fepo/​edit#​gid=333349986|Price List]]
 +
 +====== Parts List ======
 +  * Arm Computer
 +  * Wifi Adapter
 +  * Audio Adapter
 +  * Power Supply
 +  * Flash Card (Storage)
 +
 +====== Raspberry Pi Issues ======
 +  * I get this error whenever I try to change either the buffer size, buffer time, or interrupt period on both the R Pi 1 and R Pi 2<​file>​aplay:​ set_params:​1305:​ Can't use period equal to buffer size (256 == 256)</​file> ​
 +  * I picked up a C-Media CM108 Chipset usb audio adapter and it fixed the problem. ​ I able to adjust the sample and buffer size [[http://​www.amazon.com/​External-Adapter-Windows-Drivers-Needed/​dp/​B00V9E9YRG|Link]]
 +====== Other Notes ======
 +  * The "​Chip"​ microcomputer looks really promising it includes storage, wifi, and audio all on board and is selling for $9.  Their website says they will be shipping in June 2016 [[http://​getchip.com/​]]
wifiaudio/start.txt · Last modified: 2018/11/12 14:01 by tschulz