Hello.

I have been using Bela without big issues for a year. However, today Bela won't turn on, neither when plugged into the computer via USB nor when connected to a mobile USB power adapter. There is a constant blue light at the left of the USB port of the Bela, but there is not the blinking blue light that there should be at the right of the port. That one blinks just once but then it doesn't blink anymore and it does so only with the power adapter but not when connected to the computer.

There is not the red light of CPU overload neither.

Any ideas to solve the problem? I depend on my Bela for a gig this week and next week...

Thank you for your attention.
Julio

Try disconnecting everything from your Bela cape. if the problem persists, gently remove the Bela cape without bending pins and try again. Also try flashing an sd card with the bela image and boot pressing the S1 button. If you have a uart adapter you could try reading uart from the 5x1 connector on the beaglebone black and see if you get anything there.

To elaborate, it's one of the following possible cases:

  1. a dead Bela cape
  2. a dead BeagleBone Black
  3. botht are dead
  4. a corrupted SD card or eMMC (built-in storage of the BBB)

The only one you can recover from without a hardware replacement is case 4. The most likely are number 2 or 4. Number 1 is unlikely and number 3 should only happen if you plugged more than 3.6V into one of the P8 or P9 pins that is used by both the Bela cape and the BBB.

As starter, remove all cables and wires from the cape. Only connect the USB cable. If booting fails with or without the Bela cape, it's likely number 2, but it could be number 4. To test for number 4, get an SD card and flash this image on it. Then follow Option B here to boot it from the SD card. It this is successful, then it's simply your eMMC (or old SD card if you were using one) that's down. That can possibly be fixed/rescued by the way, but in the meantime the newly flashed SD card should get you going.

In case you find it's number 2, the fastest way to get a replacement is to order a BeagleBone Black replacement from Mouser (if you are in the US) or Farnell or RS if you are in Europe.

    giuliomoro
    Thank you for your response, Giulio.

    I tried disconnecting all the cables from my Bela Mini and connecting it only via USB, but the same issue occurred. So, as you mentioned, it must be either case 2 or 4. Fortunately (and wisely), I bought another Bela Mini a few months ago in case something like this ever happened. Since I'm in a rush, I'll use the spare Bela Mini for now.

    However, I really want to understand what went wrong so I can prevent it from happening again with the new one. On Monday afternoon, I used my Bela normally—just as an instrument—without connecting to the IDE or doing anything unusual. Then, yesterday afternoon, I took it to another location, and when I plugged it in, it didn’t turn on anymore.

    I don’t think the issue was caused by transportation, as I handled it with care and have moved it many times before for gigs and rehearsals without any problems. However, the building I brought it to yesterday is quite old and may have an unstable electrical system. Could this have been the cause? Or could it be related to the Pure Data patches I was using?

    It imagine it may be a bit absurd trying to diagnose the issue from photos, but I’ll share some pictures of my Bela setup just in case to an expert eye they provide any clues about what might have caused the problem.

    Thank you for your help!

    giuliomoro

    Update: I tried the obvious thing having another Bela mini—I took the SD card from the dead Bela Mini and inserted it into the new Bela Mini. However, it also failed to turn on in exactly the same way. This suggests that the SD card is corrupted, right? How could that have happened? Could it be because I always unplug the power to turn it off instead of shutting it down properly?

    giuliomoro

    I am a bit concerned that if the not-working Bela (the cape or the BBB) is damaged, it could also damage the known-good SD card of my new BelaMini. So I prefer to not risk it these days in which i am gonna need the new BelaMini. (Perhaps that fear is too paranoid?)

    I am gonna buy a new SD card, flash it with the Bela software and put it inside the supposed bad BelaMini and see if it works. Perhaps it is not necessary to flash the software and just by using the empty new SD card I could see an informative difference on the lights' behavior of the BelaMini?

      JulioGurb I am a bit concerned that if the not-working Bela (the cape or the BBB) is damaged, it could also damage the known-good SD card of my new BelaMini.

      Makes sense.

      In the meantime, you could use the procedure mentioned above on the bad SD card and send that image over to me for further analysis.

      JulioGurb . Perhaps it is not necessary to flash the software

      you do need software on it or it won't behave any different than now.

        is this file somehow compressed? It's too small to be the full image, so if it's uncompressed it may be incomplete.

          giuliomoro
          No, I did not compress it. It's around one GB. How big should it be more or less?

          I think probably the problem was that the process I was doing with the terminal to make the image (step 4 of the "Backing up your SD card") was not complete. As nothing shows the progress or if it is complete. Do you know how I could know when it is finished?

          I have the same problem when flashing the image into the new SC card.

          The SD card should be about 4GB. Did you resize the filesystem on the SD card at some point? If not, and you were still using only the first 4 GB, you could append count=4096 to dd so it only copies the first 4 GB:

          sudo dd if=/dev/mydisk of=mybackup.img bs=1024k count=4096

          If your version of dd supports it, you can also add status=progress to get some progress printed. If you are on Mac, you can also (or alternatively) use ctrl-T while it's running to get it to print progress information.

          In any case, just let it run to completion, never press ctrl-C or close the terminal window while it's running.

            giuliomoro
            Update:
            I was too impatient. I did it again waiting for long time and got a 31 GB file which I think it should be the good one. Here it is:

            https://we.tl/t-TaqFxlrp3L

            Sorry for the inconvenience.

            giuliomoro

            Oh sorry I did not see this last message. Ok, i will do it again with that count thing so i don't send you a 31 GB file.

            Update:

            I flashed the bela software into a new SD card I bought. I put it into the previously-thought-broken bela and it worked!

            Therefore to summarize what we know:

            • I put the old SD card into the new bela and it did not worked.

            • I put a new SD card into the old bela and i worked well.

            Therefore it all seems to point that it is the old SD card which is broken/corrupted. Here it is the 4GB image of that old SD card so you can conduct a forensic analysis: https://we.tl/t-6G00VQF9xV

            (My strongest hypothesis for now is that it has to do with turning it off not gently by disconnecting the power adapter instead of using a proper button for that)

            OK, the issue was indeed a corrupted fileystem. The boot log gave:

            [    2.233367] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
            [    2.240887] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
            [    2.292741] JBD2: Invalid checksum recovering block 0 in log
            [    4.408938] JBD2: recovery failed
            [    4.412393] EXT4-fs (mmcblk0p2): error loading journal
            [    4.419493] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -5

            When inserting the SD card in another machine and using fsck.ext4, it gets fixed quickly:

            root@revc:~# fsck.ext4 /dev/mmcblk0p2
            e2fsck 1.43.4 (31-Jan-2017)
            BELAROOTFS: recovering journal
            JBD2: Invalid checksum recovering block 0 in log
            Journal checksum error found in BELAROOTFS
            BELAROOTFS contains a file system with errors, check forced.
            Pass 1: Checking inodes, blocks, and sizes
            Pass 2: Checking directory structure
            Pass 3: Checking directory connectivity
            Pass 4: Checking reference counts
            Pass 5: Checking group summary information
            Free blocks count wrong (284001, counted=283995).
            Fix<y>? yes
            
            BELAROOTFS: ***** FILE SYSTEM WAS MODIFIED *****
            BELAROOTFS: 89772/224896 files (0.1% non-contiguous), 614565/898560 blocks

            I can now boot from it.

            I am surprised that the check that is run during boot fails to fix the damaged journal, while running fsck explicitly manages to fix it.

            The future

            To avoid this sort of - rare - inconvenieces, one could set the filesystem to read-only by editing /etc/fstab, appending ro to the options for /dev/mmclk0p2, e.g.:

            /dev/mmcblk0p2 / ext4 defaults,noatime,ro 0 1

            also add this line there

            tmpfs   /var/lib/dhcp   tmpfs   nosuid,nodev   0   0

            After rebooting, all writes to disk will fail and the filesystem will be much less likely to become corrupted. If you want to make the filesystem read-write again (e.g.: to update your patch), you will need to first manually remount it as rw:

            mount /dev/mmcblk0p2 -o remount,rw /

            and then edit /etc/fstab again and remove ,ro so that the line looks like this again:

            /dev/mmcblk0p2 / ext4 defaults,noatime 0 1

              giuliomoro

              Thank you very much for your explanation and advices.

              So why do you think it happened? Did it happen because of turning it off by unplugging the power (and being very unlucky)? Maybe it could have been because the SD card got hit or something? Or it didn’t have nothing to do with that and it happened just random.

                JulioGurb So why do you think it happened? Did it happen because of turning it off by unplugging the power (and being very unlucky)?

                Most likely this. As mentioned, this is a very rare occurrence. The procedure above ensures you can keep doing that guiltless in the future.

                  giuliomoro
                  Since I frequently change patches inside Bela, that might not be the best option for me.

                  I can try to shut it down properly using a button between P2.34 and ground. However, since the connection needs to last at least 2 seconds to turn off instead of just switching projects—and my button is a bit unreliable and often fails to maintain the connection for that long—I’m considering using a switch instead.

                  However, if I use a switch and it remains connected between P2.34 and ground when I plug Bela in, could that be dangerous?

                  thanks!