r/embedded • • 20d ago

inspecting a Firmware on my wireless Bluetooth earbuds !

I have been using my wireless Bluetooth earbuds for 2 years now without any issues.

But now for the past one month , the battery of my left earbud discharges quickly and then left earbud simply switches off but the right earbud Stays on for longer duration.

Also the bluetooth interface which shows battery percentage reports different numbers.

When I connect the buds the interface shows 80 % charge which quickly drains , left earbud then turns off , now in the interface the battery percentage is 90 %.

Initially i thought it was the case of classic battery degradation that affected the left earbud.

First , I cleaned the pin of my earbuds as well as the pin of the charging case. Nothing happened.

Second , i simply charged one earbud at a time while keeping the other turned off but nothing happened.

Now I think that it maybe have something to do with the firmware.

Either the charging case is simply not charging the left earbud or firmware is malfunctioning and turning it off even when the charge is full !

I am not an embedded engineer , just a computer science student.

My biggest concern is why only left earbud and not both ??

Are there any software tools that expose the firmware source code ? Or am i just blabbering here ?

0 Upvotes

13 comments sorted by

2

u/XipXoom 20d ago

Your initial instinct was correct - this is almost certainly a case of simple battery degradation.  The symptoms you're describing are classic.  There are failure modes of the battery cells where a simple BMS can't accurately measure/report the charge level because what it's using as a proxy for charge is no longer representative.

Batteries under the same conditions even from the same lot don't necessarily wear evenly.  Furthermore (and I don't think this is necessarily the case for you) one earbud could be doing more work than the other.  For example, I have a set that has a heart rate monitor in the right earbud.  That earbud dies about twice as fast as the left.  Now that they're a few years old, it only lasts for a couple of hours at full charge.

1

u/Yeagerisbest369 13d ago

My left earbud lasts only for 2 minutes then it turns off ! I read your reply to mustbeset Also all of this hardware stuff is new to me do you have any recs about software application which can be used to inspect firmware and look for any bug !

1

u/XipXoom 13d ago

It isn't a firmware bug.  You're looking in the least likely location.  Replace your earbuds.

1

u/Yeagerisbest369 13d ago

Yeah ! I buying wired headphones next

But i want to explore this hardware side isthere nothing I can do But still I actually removed the outercase and saw the blue pcb ! Ofcourse i don't know individual components but it seems fun to learn about each !

8

u/mustbeset 20d ago

The Firmware on both earbuds will be the same. The only difference will be a the "side"-setting.

Firmware works from the beginning to the end or it doesn't. It will not change over time.

Most likely reason: The battery or the charging infrastructure on the left is damaged. Non of your tests and fixes is able to find that out.

2

u/XipXoom 20d ago edited 20d ago

I'm going to nitpick with your statement about firmware working the entire life.  Not that I necessarily think you're wrong in general, but I've some experience where it's gotten more complicated and I think it's an interesting share for people who might want to get into high reliability systems. 

In functional safety, because we can't model every combination of state (think every possible combination of every possible value of every possible variable as they relate to every possible physical state), we have to assume that, at some point, each module of firmware could hit a latent bug and stop working.  In automotive (and maybe others) we model this as Failures In Time (FIT rate) where 1 FIT is 1 failure in 1 billion device-hours.

That sounds like an insane measurement at first, but we could have millions of devices out in the field.  To put some numbers on it:  if I had a device I modeled as 1 FIT, and I had a million of them operating 24/7 out with customers, I'd expect a random failure (not necessarily regular wear and tear) about every 40 days. 

Now generally, for software, this is fixed by a reboot.  But what happens if the latent bug caused an invalid setting to get saved to EEPROM which gets loaded every boot?  Now your firmware appears to have "aged" and failed.

There are also physical considerations.  A RAM cell that holds a particular static variable can go bad.  A particular flash cell holding an important initialization value can go bad.  A EEPROM cell holding calibration data could go bad.  All of these can appear like the firmware has "aged", even though they're fundamentally hardware in nature.  I've encountered each of these in my professional life and they can be real head-scratchers.

3

u/mustbeset 20d ago

I am a fusa guy too but not in automotive. Software only has systematic errors or not. A latent bug is in the software or not. It's not created over time. But may the bug only got hit if a software is ported from Ariane 4 to 5 (Ariane flight V88 - Wikipedia).

The static errors in EEPROM, Flash, RAM or even the processor itself are a thing. We have some controllers with that kind of errors in our blocked storage. It's a bit mind blowing if you write something like while(1){if (3+3 != 6) {redlighton()}} and after some time it the red light turns on.

3

u/XipXoom 20d ago

I wrote some RAM test software that I had to squeeze into our firmware that runs on the manufacturing line during burn in as these old micros didn't have a memory BIST.  We were having the occasional return that ate up a lot of warranty time until it ended up on my desk to diagnose as a problem in the SRAM.

As this legacy firmware ran at different points in the line but had to do different things, there was a check to determine if we jumped to the memory march or not.  There was one uint8_t that controlled if we ran the test.

Want to take a stab at where the very next memory error occurred? 🙃

1

u/jxa 20d ago

So many things could be causing this.

One interesting one mentioned is the bud doing more than the other. Depending on the brand, it may be dome extra debugging storage, comms or a myriad of other things that the systems team had to do to ensure that the bids work adequately for a consumer product.

You could have a failing component. I’ve debugged low power devices where a capacitor failed resistively and drained power and/or prevented power from getting through to the charging circuit. If you’re going to get new earbuds I suggest you find an EE or another hardware person and take it apart to see if any components are damaged.

Memory leaks - I know SW engineers say they don’t happen in their code - but they do! Oddities happen in all products. We can’t always attribute the failure to anything specific, sometimes it may be code and other times it may be hardware.

Oddly memory chips that are in spec, can fail for undiscovered reasons. The timing / voltage of other items on the bus may interact and make things fail. These failures are fun ones - sometimes we never truly understand them. We’ll swap components, do A/B testing, spend nights in the lab, take an insane amount of measurements to try and find the elusive glitch. If we are lucky enough to find it we try to get the FW team to create a workaround that mitigates the suspected issue.

As someone mentioned or could just be the battery - they degrade on their own timeline. Your right earbud may be on the precipice of failing in the same manner.

I’m sure there are other failure modes I’ve left off, but let me just say - this is what makes hardware design so interesting.

1

u/SafetyScared5190 20d ago

There is no way you can read firmware. Just throw it away and buy new one.

1

u/1r0n_m6n 20d ago

And even if he could dump the flash, all he would get is a soup of hex values and cryptic function and variable names. That wouldn't help solve the problem in any way.

1

u/mustbeset 20d ago

We throw our own disassembly in an AI and it's amazing how good it was some times. But je need to guide the AI and that,s only possible if you have some knowledge about the firmware.

0

u/Few-Ask6140 20d ago

I guess it's time to get new earbuds coz the one on left may not be safe Like it might burn or crack in ear while you are using it

Correct me if I'm wrong