2 Replies Latest reply on Oct 15, 2015 11:22 AM by New_and_Learning

    Playing audio file using edison and bluetooth speaker

    New_and_Learning

      Hello,

      It seems I am doing something wrong and would appreciate any help. Several months ago I was able to play a.wav file using mplayer and my Bluetooth speaker.

       

      Now No Luck.

       

      I can play my Samsung Galaxy audio through the speaker just fine.

       

      Now, mplayer is missing from the distribution (why?) I tried using aplay and paplay but got no output (sound).

      I cam across a post telling how to install mplayer. did that, the install did not complete - now mplayer resides in the install directory and I don't know how to move it - safely. Anyway, that's a side issue (I would like it fixed).

       

      How the heck do I get either aplay or paplsy to send the sound to my working Bluetooth speaker.

      My hair is already getting a little thin (and gray), can't afford too much more hair-pulling.

       

      Thanks,

       

      Ted

        • 1. Re: Playing audio file using edison and bluetooth speaker
          Intel_Peter

          Hello New_and_Learning,

           

          Since you have an issue with MPlayer, then I suggest you to reflash your board and install it again. You can follow these steps:

           

          1. wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz 
          2. tar xvf yasm-1.3.0.tar.gz
          3. cd yasm-1.3.0
          4. sed -i 's#) ytasm.*#)#' Makefile.in && 
          5. ./configure --prefix=/usr && 
          6. make # *make check to test results 
          7. make install # 
          *cd ../ to go back  to root directory 
          8. wget ftp://ftp.mplayerhq.hu/MPlayer/releases/MPlayer-1.1.1.tar.xz
          9. tar xvf MPlayer-1.1.1.tar.xz
          10. cd MPlayer-1.1.1
          11. ./configure
          12. make
          13. make install
          
          

           

          We were able to correctly install the package this way. However if you want to play audio through Bluetooth there is yet another way, in case you are interested. We have tested it and it worked correctly for us. Please check the guide in: IoT - Play audio from your Intel® Edison via Bluetooth* using Advanced Audio Distribution Profile (A2DP) | Intel® Develo…. The following are the steps we used to reproduce a WAV audio file:

           

          1. rfkill unblock bluetooth
          2. bluetoothctl
          3. agent DisplayYesNo
          4. default-agent
          5. scan on
          # [set my speaker to pair]
          # [I found my speaker's MAC: 00:11:67:CB:B7:1A] 6. scan off
          7. pair 00:11:67:CB:B7:1A
          8. connect 00:11:67:CB:B7:1A
          9. quit
          10. pactl list sinks
          11. pactl set-default-sink bluez_sink.00_11_67_CB_B7_1A
          12. gst-launch-1.0 filesrc location= /home/root/YOUR_DOT_WAV_FILE.wav ! wavparse ! pulsesink
          
          

           

          Peter.

          • 2. Re: Playing audio file using edison and bluetooth speaker
            New_and_Learning

            Peter,

             

            Thank you - hair is beginning to grow back - still gray!

             

            I took your advice and tried the gst-launch-1.0 approach. Worked on my first try! Perhaps it is because I'm so new, but I searched everywhere for an example on how to make gst work. examples, for me are much better than simply looking at the syntax.

             

            Thank you so much for coming to my aid. Quick and correct response.

             

            I'll deal with the mplayer issue later - don't really need it now that I am begging to understand using gst.

             

            Thanks again,

             

            Ted