Disable start-up beep



  • Is there a way to disable the start-up beep within the firmware?



  • Indeed, I'm interested in that too. I find that short sound glitch quite annoying.



  • @m5er said in Disable start-up beep:

    Indeed, I'm interested in that too. I find that short sound glitch quite annoying.

    And me makes three.


  • M5Stack

    Means disable start-up beep within the uiflow firmware?



  • @watson said in Disable start-up beep:

    Means disable start-up beep within the uiflow firmware?

    Yes. I found where the second beep is defined when you press buttons A, B, or C after the first beep. But I would like to disable the first beep as well.



  • @world101, I just tested that commenting out Speaker.begin(); in M5Stack.cpp seems to get rid of the short glitch at startup. That did the trick for me, let me know if that works for you too.

    Of course that applies only to projects that don't need the speaker at all. :)



  • @m5er
    Yeah, I know about that for the Arduino IDE, but I was looking for a solution for uiFlow firmware.



  • @world101 Hi,if you can flash firmware, i can provide a version without beep :)



  • @heybin said in Disable start-up beep:

    @world101 Hi,if you can flash firmware, i can provide a version without beep :)

    I assume the first beep is compiled into the firmware bin file and not a configuration setting in one of the python files. Anyway, yes I can flash firmware, so please send it to me.



  • Can you send your email to me by chats



  • @heybin

    I got it flashed and it's working good. No startup beep :-)

    For anyone else interested in v1.2.0 without the startup beeps...
    https://www.dropbox.com/s/093qcc7e51ywl4m/nobeep.zip?dl=0

    Pre-requisite: you must have esptool.py installed on your Mac and the m5stack is connected to a USB port.

    unzip nobeep.zip 
    cd nobeep
    esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 921600 erase_flash
    esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 921600 write_flash -z 0x1000 ./bootloader.bin 0xf000 ./phy_init_data.bin 0x10000 ./MicroPython.bin 0x8000 ./partitions_mpy.bin
    esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 921600 --before default_reset --after no_reset write_flash -z --flash_freq 40m 0x170000 ./spiffs_image_0x170000.img
    

    Reboot the m5stack.

    To silence the second beep (when choosing Upload, App.List, or Setup) do this:
    Pre-requisite: you must have ampy installed on your Mac

    ampy get /flash/boot.py
    

    Copy the entire output and create a new file called boot.py. Make the change below to set volume=0 in these three locations of the while loop.

    # wait 1000 for user choose
    cnt_down = time.ticks_ms() + 1000
    while time.ticks_ms() < cnt_down:
        if buttonA.isPressed():   # M5Cloud upload     
            speaker.tone(2000, 50, volume=0, timer=False) # Beep
            core_start('flow')
            break
    
        elif buttonB.isPressed(): # APP list
            speaker.tone(2000, 50, volume=0, timer=False) # Beep
            from app_manage import file_choose
            file_choose()
            core_start('app')
            break
    
        elif buttonC.isPressed(): # WiFi setting
            speaker.tone(2000, 50, volume=0, timer=False) # Beep
            import wifichoose
            wifichoose.start()
            break
    

    Upload the new file to the m5stack:

    ampy put boot.py /flash/boot.py
    

    Reboot the m5stack.



  • This is great!!! exactly what I was looking for.
    Would it be possible to have all new firmwares for both core/stick with and without beeps?!? It is quite annoying especially when prototyping with other people around, too many unnecessary resets and beeps

    Is there a way to put forward a formal request for no-beeps or options in main menu?



  • the ampy get /flash/boot.py command doesn't seem to work on my mac.

    I've tried adding the uart address and bauds but no luck.....

    any caveat?!



  • @ipodlux There seams to be a few issues with mac at the moment, the crews are working on trying to solve them.



  • @ipodlux said in Disable start-up beep:

    the ampy get /flash/boot.py command doesn't seem to work on my mac.

    I've tried adding the uart address and bauds but no luck.....

    any caveat?!

    Did you install ampy on your Mac? If not, it won’t work. You can find install instructions here: https://learn.adafruit.com/micropython-basics-load-files-and-run-code/install-ampy

    Also, I need to double check tomorrow, but starting with uiFlow firmware v1.2.3, I think the M5Stack team already disabled the first startup beep in the firmware.



  • @world101
    Hi I certainly did it, ampy is installed and functional but doesn’t seem to connect to the device.
    Thanks for looking into this. Removing all unnecessary beeps from the standard firmware would be great. No-one would buy a car honking at every steering or dashboard switch activation!



  • @ipodlux

    If it's not connecting to the device, what errors do you see? Paste your command line output here and maybe I can help further.

    One other custom I did for ampy... I created the file ~/.ampy with these contents:

    # Example .ampy file
    # Please fill in your own port, baud rate, and delay
    AMPY_PORT=/dev/tty.SLAB_USBtoUART
    AMPY_BAUD=115200
    # Fix for macOS users' "Could not enter raw repl"; try 2.0 and lower from there:
    #AMPY_DELAY=0.5
    

    If you create that file, you will not have to pass the port and baud rate options when running the ampy command. This is the standard way to run ampy when you don't have the .ampy file created.

    world101$ ampy -p /dev/tty.SLAB_USBtoUART -b 115200 ls
    /flash
    

    Also, I was mistaken on the the v1.2.3 firmware with the beeps disabled by default. I just flashed one of my cores with the M5Burner and the beeps are there. I must have been running a custom firmware before.