Skip to content

Instantly share code, notes, and snippets.

@henriqueutsch
Last active August 29, 2015 14:19
Show Gist options
  • Save henriqueutsch/3f95db1a7e17f0d46325 to your computer and use it in GitHub Desktop.
Save henriqueutsch/3f95db1a7e17f0d46325 to your computer and use it in GitHub Desktop.
HMDX JAM + RASPBERRY PI BLUETOOTH
brew install pv
sudo su
diskutil unmountDisk /dev/disk2
dd bs=8 if=Documents/Raspberry/2015-02-16-raspbian-wheezy.img | pv -pptrbe -i 2 -s 3276800000 | dd of=/dev/disk2
sudo apt-get update
sudo apt-get install -y bluetooth bluez blueman xauth alsa-utils bluez-alsa bluez-utils bluez-tools mplayer
sudo apt-get install -y bluez pulseaudio-module-bluetooth python-gobject python-gobject-2
sudo nano /etc/bluetooth/audio.conf
Disable=Media
Enable=Source,Sink,Socket
SCORouting=PCM
AutoConnect=true
sudo nano /etc/pulse/daemon.conf
resample-method=trivial
sudo usermod -a -G lp pi
start-pulseaudio-x11
sudo bluez-simple-agent hci1 46:8F:E8:00:EE:3B
sudo bt-audio -c 46:8F:E8:00:EE:3B
bt-device --set 46:8F:E8:00:EE:3B Trusted 1
mplayer -ao alsa http://robtowns.com/music/blind_willie.mp3
Se não tocar
sudo modprobe snd_bcm2835
sudo modprobe -r snd_bcm2835
mplayer -ao alsa http://robtowns.com/music/blind_willie.mp3
COMANDOS AUXILIARES
bt-audio -r 46:8F:E8:00:EE:3B
bt-audio -c 46:8F:E8:00:EE:
bt-audio -d 46:8F:E8:00:EE:3B
bt-device -i 46:8F:E8:00:EE:3B
bt-device -c 46:8F:E8:00:EE:3B
bt-device --set 46:8F:E8:00:EE:3B Trusted 1
bluez-test-audio connect 46:8F:E8:00:EE:3B
bluez-test-device remove 46:8F:E8:00:EE:3B
sudo bluez-simple-agent hci1 46:8F:E8:00:EE:3B
hcitool scan
service bluetooth start
service bluetooth status
service bluetooth restart
Erro Flac
https://help.ubuntu.com/community/PlayMusicFromCommandLine
http://linux.die.net/man/7/soxformat
sudo apt-get install sox
sudo apt-get install libsox-fmt-all
http://raspberrypi.stackexchange.com/questions/4715/sox-alsa-sound-recording-issue
export AUDIODRIVER=alsa
export AUDIODEV=hw:1,0
http://stackoverflow.com/questions/28054731/capture-record-audio-input-in-raspberrypi
arecord -f cd -D plughw:1,0 -d 10 a.wav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment