|
找来找去,在网上找到老外的文章,原来USB声卡、音乐服务器、蓝牙是这么折腾上去的
过会回去试试。
现在附上原文链接
http://sokrates.mimuw.edu.pl/~sebek/openwrt/
My OpenWRT applications
Warning - this is an early beta version
Hardware
ASUS WL-500G Deluxe (200mips, 4MB flash, 32MB RAM, 2 external USB ports, etc, etc.). For more info see http://wiki.openwrt.org/TableOfHardware. Cost: about 100USD.
Software
OpenWRT WhiteRussian RC4. You can read more about OpenWRT here. And Here is my OpenWRT package repository. Sources are available.
Application: sound server (polypaudio)
Additional hardware:
USB audio card. I'm using one that I've assembled myself, using PCM2702 chip (thanks to Texas Instruments for providing a free sample) and this design. I've tested USB VoIP headset too, and it worked as well.
Additional software
Kernel audio modules build for 2.4.30 kernel (OpenWRT WhiteRussian RC4), and following packages: libusb, alsa-utils, libltdl, polypaudio.
HowTo
Just load kernel modules from /etc/modules.d/72-snd-usb-audio, in following order:
soundcore
snd-page-alloc
snd
snd-rawmidi
snd-hwdep
snd-timer
snd-pcm
snd-mixer-oss
snd-pcm-oss
snd-usb-lib
snd-usb-audio
and then run polypaudio server in daemon mode, listening on tcp socket using native as well as esound protocol.
This way I can play MP3s and watch movies on my notebook PC, using my old aplituner and 4 speakers instead of notebook's built-in speaker, with no cables lying around (notebook is using wifi connection).
Photos
Amplituner Asus WL500g USB audio card
Application: sound server (EsounD)
EsounD server uses about 2/3 less of system resources than polypaudio. It isn't as flexible or powerful, but works fine for me. It worked without OSS emulation (polypaudio didn't).
Additional hardware
as in previus sound server application
Additional software
Kernel audio modules build for 2.4.30 kernel (OpenWRT WhiteRussian RC4), and following packages: audiofile, esound-alsa
HowTo
Load kernel modules from /etc/modules.d/72-snd-usb-audio, in following order:
soundcore
snd-page-alloc
snd
snd-rawmidi
snd-hwdep
snd-timer
snd-pcm
snd-usb-lib
snd-usb-audio
Edit esd options in /etc/esd.conf:
auto_spawn=0
default_options=-nobeeps -as 2 -public -tcp
You may also add "-promiscuous -bind <your-LAN-ip>" to options. Then run esd in background (esd &).
Application: console server
Additional hardware:
Up to 8 PL2303-based USB<->RS232 cables, one or two USB 4-port bus-powered hubs, RS232 external modem.
Additional software:
Kernel usb-serial and usb-pl2303 modules (you can get them from this repository: http://users.bigpond.net.au/flett/ipkg), mgetty, conserver, tinylogin.
HowTo
Plug in all USB cables and reboot. Now connect modem to one of them, and find out which one is it ;) /proc/tty/driver/usb-serial may be helpful. Then edit /etc/inittab and enter:
::respawn:/usr/sbin/mgetty usb/tts/<deviceon>
Then edit /etc/conserver.cf and configure all your serial ports, using following template:
default * {
logfile /var/log/console-&;
logfilemax 512k;
timestamp 1hab;
master localhost;
rw *;
}
console 0 { type device; device /dev/usb/tts/0; parity none; baud 9600; }
console 1 { type device; device /dev/usb/tts/1; parity none; baud 9600; }
console 2 { type device; device /dev/usb/tts/2; parity none; baud 9600; }
access * {
trusted 127.0.0.1;
}
config * {
daemonmode yes;
}
Run conserver, and you're all set. Use "console <device_no>" to connect to a serial port.
Application: scanner server (SANE)
Additional hardware
SANE-compatible USB scanner
Additional software
sane-backends, libusb, libgcc, libpthreads, xinetd
HowTo
Install sane-backends. Attach your scanner and check if SANE can find it:
scanimage -L
You should get something like this:
root@OpenWrt:~# scanimage -L
device `hp:libusb:001:004' is a Hewlett-Packard ScanJet 63x0C flatbed scanner
root@OpenWrt:~#
Edit /etc/sane.d/<your_backend>.conf if neccessary. Edit /etc/sane.d/saned.conf and add "+" to allow all IP addresses to use scanner. Add line:
sane-port 6566/tcp
to /etc/services. Create /etc/xinetd.d/sane:
service sane-port
{
socket_type = stream
server = /usr/sbin/saned
protocol = tcp
user = root
group = root
wait = no
disable = no
}
Start xinetd: /etc/init.d/xinetd start. You can now connect to saned using XSane or any other SANE frontend. |
|