Loading ...
Sorry, an error occurred while loading the content.

Speaking IP Address At Boot

Expand Messages
  • Aaron Melton
    I m just throwing this out there because I haven t seen (could have missed it) a working solution to the problem. I don t personally find any value in having
    Message 1 of 2 , Jun 30, 2013
    • 0 Attachment
      I'm just throwing this out there because I haven't seen (could have
      missed it) a working solution to the problem. I don't personally find
      any value in having the Raspberry Pi "speak" it's IP Address at boot, so
      I'm not going to flesh this out completely.

      I don't know what sort of packages you may (or not) have installed, so
      this will be my attempt at a one size fits all quick and dirty solution.
      I'm assuming you're running Raspbian or some other version of Debian on
      your RPi.

      # You will need to download these packages
      sudo apt-get install -y alsa-utils espeak

      # You will need to load up the sound module
      sudo modprobe snd_bcm2835

      # You will need to set the audio mixer to analog-out, assuming you
      # plan on using the analog audio output and not HDMI
      sudo amixer cset numid=3

      # Get JUST the IP Address and pipe it into espeak
      ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print
      $1}' | espeak

      That's it. Well, it worked on my Raspberry Pi. Your mileage may vary.
      This is not persistent and you'll have to run the modprobe and amixer
      commands after each reboot. It also doesn't magically speak it during
      boot. You'll have to learn some Linux to figure that out. :)

      Also -- sometimes you can save yourself a lot of trouble if you're just
      willing to Google around. You might just find that someone has "been
      there done that."

      A Google search for "linux speak ip address at boot" gave me this link
      first:
      https://gist.github.com/andysc/5605183

      So there you go, someone has already solved this 'problem'. :) I
      haven't investigated it, but it's clearly a more elegant example than
      what I threw together in 15min...

      Aaron
      de KK4LOV
    • Aaron Melton
      CORRECTION: Probably need a sudo on that last statement. Your regular user permissions may not have access to ifconfig without it. sudo ifconfig eth0 | grep
      Message 2 of 2 , Jul 1, 2013
      • 0 Attachment
        CORRECTION:
        Probably need a sudo on that last statement. Your regular user permissions may not have access to ifconfig without it.

        sudo ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print
        $1}' | espeak

        Aaron
        de KK4LOV

        On Jun 30, 2013, at 10:38 PM, Aaron Melton <aaron@...> wrote:

        > ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print
        > $1}' | espeak
      Your message has been successfully submitted and would be delivered to recipients shortly.