Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Fun with /dev/speaker

    Scheduled Pinned Locked Moved General pfSense Questions
    11 Posts 3 Posters 1.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      daplumber
      last edited by

      I've always appreciated pfSense's happy little melody announcing that it finally got to a login prompt or was shutting down.

      So I went looking for a few old tunes from the bad old BASIC days that might be pressed into service as notifications.

      This is my favourite so far:

      echo "E8 E8 F8 G8 G8 F8 E8 D8 C8 C8 E8 E8 E8 D12 D4 E8 E8 F8 C8 G8 F8 E8 D8 C8 C8 D8 E8 D8 C12 C4 D8 D8 E8 C8 D8 E12 F12 E8 C8 D8 E12 F12 E8 D8 C8 D8 P8 E8 E8 F8 G8 G8 F8 E8 D8 C8 C8 D8 E8 D8 C12 C4" >/dev/speaker

      Anyone else got any favorites? I'm thinking of the above if an IDS flags an attack or something.

      –--------
      This user has been carbon dated to the 8-bit era...

      provelsP 1 Reply Last reply Reply Quote 2
      • provelsP
        provels @daplumber
        last edited by provels

        @daplumber
        Haha, fun. I bookmarked your original post and finally tried it on my FreeBSD NAS (no speaker in the FW). Is the alpha the note and the numeric the duration?

        EDIT - https://forums.freebsd.org/threads/beep-on-sucessful-bootup.64145/

        Peder

        MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
        BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

        D 2 Replies Last reply Reply Quote 0
        • D
          daplumber @provels
          last edited by

          @provels my understanding is that speaker understands some form of Music Macro LanguageMML

          Yes, it’s note followed by duration as a fraction of a note.

          –--------
          This user has been carbon dated to the 8-bit era...

          1 Reply Last reply Reply Quote 0
          • D
            daplumber @provels
            last edited by

            @provels BTW a lot of boards don’t have piezo speakers on the board, but do have a pair of header pins and a piezo speaker runs a couple of bucks on Amazon etc.

            –--------
            This user has been carbon dated to the 8-bit era...

            provelsP 1 Reply Last reply Reply Quote 0
            • provelsP
              provels @daplumber
              last edited by

              @daplumber
              Reminds of my old days with DOS 3.1 on my IBM clone. Thanks for the wiki link. Now to compose the "Office" theme...

              Peder

              MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
              BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

              D 1 Reply Last reply Reply Quote 0
              • D
                daplumber @provels
                last edited by

                @provels ooh, cool. Maybe the theme from “The Equalizer” too? ;-)

                –--------
                This user has been carbon dated to the 8-bit era...

                provelsP 1 Reply Last reply Reply Quote 0
                • provelsP
                  provels @daplumber
                  last edited by provels

                  @daplumber
                  Trying to find an online convertor for MIDI to MML, but the output does not resemble your original post. 🤷 Obvs, too many < > < < ...

                  2b994234-327b-4122-a349-c92f5ce2e095-image.png

                  Peder

                  MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                  BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    daplumber @provels
                    last edited by

                    @provels Do see spkr (4) for the exact syntax supported.

                    –--------
                    This user has been carbon dated to the 8-bit era...

                    1 Reply Last reply Reply Quote 1
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      Yeah, you need quotes around it.
                      spkrtest(8) is also included for further fun. 😉

                      Steve

                      provelsP D 2 Replies Last reply Reply Quote 1
                      • provelsP
                        provels @stephenw10
                        last edited by

                        @stephenw10
                        Haha, stupid server tricks! Gotta love it.
                        c1d73508-51ff-4663-b1b2-8fb3ed55c6d4-image.png

                        Peder

                        MAIN - pfSense+ 24.11-RELEASE - Adlink MXE-5401, i7, 16 GB RAM, 64 GB SSD. 500 GB HDD for SyslogNG
                        BACKUP - pfSense+ 23.01-RELEASE - Hyper-V Virtual Machine, Gen 1, 2 v-CPUs, 3 GB RAM, 8GB VHDX (Dynamic)

                        1 Reply Last reply Reply Quote 1
                        • D
                          daplumber @stephenw10
                          last edited by

                          @stephenw10 said in Fun with /dev/speaker:

                          spkrtest(8)

                          I can't believe I missed this! Thanks!

                          –--------
                          This user has been carbon dated to the 8-bit era...

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.