Step 2 (On RPI): I’m running raspbian on my RPI and using an rpi camera module that you can get off amazon or adafruit. This uses nectat to pipe the data from port 5000 to mplayer. Totally crazy year for me last year.Then type the following: nc -l 5000 mplayer -fps 60 -cache 1024. You will need 4 female to male leads to connect GPIO 23,24,3v3 and GND to the breadboard.Generic OpenMAX IL encoder with support for Raspberry Pi IFF ANIM demuxer & decoder Direct Stream Transfer (DST) decoder loudnorm filter MTAF demuxer and.Been a while since my last post. Apt-get install mplayer Step 03 Set up your hardware We will be using GPIO 23 and 24 to provide connections for two push buttons. Apt-get install python-rpi.gpio Now install MPlayer, which is what will be playing our audio.The differences start on the software setup side. Let's start.My hardware setup is the same as shown in my previous post. This method will work on Raspbian Jessie lite version as well. I finally found a proper procedure to setup bluetooth device in Raspbian Jessie using solely command line only. Pulseaudio sudo apt-get install paprefs sudo apt-get install mplayer.Alright, for those who come from my previous post of bluetooth audio streaming using Raspberry Pi.
Install Mplayer Raspberry Pi Install Mplayer Step![]() 0 means the unique id of your audio source, alsa_output.platform-soc_audio.analog-stereo.monitor is the name of your audio source, module-alsa-card.c is the driver name, s16le 2ch 44100Hz is audio source's sample specification and SUSPENDED means the audio source state is currently suspended.Next, it is time for us to setup the bluetooth speaker. Here are some simple explanation on the output. 0 alsa_output.platform-soc_audio.analog-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz SUSPENDEDIf you see same output above in your Pi that means your PulseAudio is working properly. Below is the output example from my Raspberry Pi using command pactl list sources short. By now you should see only one audio source. Type in power on and press enter. You should see the next line in terminal start with # once you press enter. Type in bluetoothctl in terminal to enter bluetooth command line terminal. Type in default-agent and press enter. You should see output " Agent registered" from terminal. Type in agent on and press enter. Turn on your bluetooth speaker and set it to pairing mode. If you see message from terminal state " Controller XX:XX:XX:XX:XX:XX Discoverable: no", just repeat step 5 to make your device discoverable again. The string XX:XX:XX.XX is your bluetooth dongle's mac address. You should see output " Changing discoverable on succeeded Controller XX:XX:XX:XX:XX:XX Discoverable: yes" from terminal. You need to key in this command to make sure your bluetooth dongle is visible to your bluetooth speaker. Type in discoverable on and press enter. You will see a bunch of message and ends with message " Device YY:YY:YY:YY:YY:YY Paired: yes Pairing successful" if pairing successful. Type in pair YY:YY:YY:YY:YY:YY to pair with the bluetooth speaker. YY:YY:YY.YY is the bluetooth speaker mac address. For my case my bluetooth speaker name is Blue Sync OR3. You should see a similar message " Device YY:YY:YY:YY:YY:YY BLUE SYNC OR3". Type in scan on to start scanning for bluetooth devices. You should see output below: To verify this, type in pactl list sinks short to check how many audio sinks available in your Pi. Type in exit to exit from bluetooth command line terminal.Once you successfully establish connection to your bluetooth speaker, you should be able to see new bluetooth audio sink available in the Pi. You should see output " Attempting to connect to YY:YY:YY:YY:YY:YY Device YY:YY:YY:YY:YY:YY Connected: yes Connection successful" from terminal if connection is successful. Type in connect YY:YY:YY:YY:YY:YY to establish connection to bluetooth speaker. You should see a message " Device YY:YY:YY:YY:YY:YY Trusted: yes". Outlook for mac 2011 godaddy inbox sync issuesIf you see this in your Pi, that means PulseAudio is picking up your bluetooth speaker properly.Now that we have almost everything ready, the trick is to redirect whatever source that is playing in Raspberry Pi and send the audio signal to your bluetooth speaker. The name of the device usually similar to bluez_sink.YourDeviceMacAddress. 1 bluez_sink.YY_YY_YY_YY_YY_YY module-bluez5-device.c s16le 2ch 44100Hz SUSPENDEDThe second output show in terminal is my bluetooth speaker's audio sink. Let's key in command below to establish the link between the require source and sink. We also know that our audio sink name is bluez_sink.YY_YY_YY_YY_YY_YY and its unique id is 1. We've already identify the name of the source audio to be alsa_output.platform-soc_audio.analog-stereo.monitor and its unique id is 0. Now remember in earlier section where we use one command to verify PulseAudio after its installation? That is the method we identify the audio source. ![]() You can verify the current volume level by type in command pactl list sources, Look for details under "Source#0 -> Volume:".Once mplayer2 installation complete, simply upload one MP3 file to your Pi for testing. So if you want to set your own level of volume by percentage X, the formula is (X * 65536 / 100). If volume = 100% the value is 65536. 0 is the unique id of your source audio and 32768 represent 50% of volume. So go ahead type in pactl set-source-volume 0 32768 in your command line and press enter. ![]()
0 Comments
Leave a Reply. |
AuthorAngela ArchivesCategories |