Bluetooth and interference

I’ve never really understood the details of what makes bluetooth work or not work. References to the “stack” didn’t mean much to me. Only “stack” thing I can recall doing was with programming long ago where, if I recall correctly, you may store a value in a stack which would be pulled off for use later in the code. Don’t know if the BT stack is similar in concept.

Anyway, reading lots of comments from people who at least talk like they know more than me, I’ve decided there aren’t many people who really have a handle on this. And considering how many BT issues people have, that may include people making stuff that provides or uses it.

So, I thought I’d list some thing that I’ve never seen explained and see what answers I can get. This will have to do with BT interference.

Some key sources of interference:

Microwaves ovens, usb 3 including type A and type C connectors, cables connecting usb 3 devices. In the questions below, let’s assume none of these items are poor quality, but less than flawless.

Let’s just focus on keyboards for the moment, since this is a keyboard forum, and how interference becomes an issue.

First question: if there is a problem with interference, is it only affecting the computer the BT device is connected to or can if affect the keyboard itself?

IOW, would the keyboard be able to send everything properly regardless and it is interference with the computer which causes delays, disconnects, etc OR can the keyboard be affected so it doesn’t even send stuff on time or properly?

Second question: since usb 3 ports can cause interference, would a usb hub that is powered to an outlet, but not to a computer and no devices plugged into it still send out interference from its ports (like maybe if you have a hub used just to charge phone, tablet, watch)?

What if the hub is plugged into the computer but no other items connected to the hub - would the computer usb 3 port or the usb 3 ports on the hub or the cable connecting them still cause interference?

Third question: similar to above but suppose you have a hard drive connected (all with usb 3). Does interference potentially happen all the time, or only when data is transferred?

Fourth question: since cables can produce interference, which is better - to use short cables to connect an external drive to the computer (thus the drive’s ports are close to the computer OR use longer (2-3 feet?) to get the drives further away?

Fifth question: would there be any meaningful advantage to having the computer on top of a wood table and the drives beneath it (could be reversed with a mini) or does interference pass through such things too easily (or bounce around so much that it won’t matter?

Hey. I can chime in on the ‘stack’ thing for you just quick. In essence, it’s the modularization of a code base and not what you referred to in your programming experience of the past.
Bluetooth is incredibly vast; with support for so many device types and profiles.
Stack in this case just refers to all of these code components that must work together to form Bluetooth support. Bluetooth consists of MANY moving parts and all must work in equilibrium which makes it incredibly difficult to contribute too as often each component has a different software lead.
I hope this helps, look up protocol stack for further reading as it’s similar.

1 Like

I haven’t watched this video but I assume that it can give a brief overview of the concept using a specific example. https://m.youtube.com/watch?v=R30zDT7KVM8

Not sure I follow that - does it mean that different codes (for various devices that may be paired) are “stacked up”? If so, then when I read about someone changing the stack, that may just mean the order of things loaded in are changed? That could certainly be important. Such as with the TB, if I want to do a special boot command, such as to change the boot drive, go to safe mode, etc, that is a problem with the TB because apparently the code to recognize BT-LE isn’t loaded soon enough, but I can sometimes get it to work if connected to the dongle instead.

I watched it. Was all hieroglyphics to me!

Okay, a couple other questions on BT and interference.

Some people talk about plugging in a usb 3 device in a port furthest from the BT antenna. That’s cool - except I have no idea where the heck the antenna is on a 2018 Mac Mini! And related to that, I guess it could matter which part of the Mini is closest to the keyboard so that would be good to know too. Right now I have the front of the mini closest (where the little LED power light is).

Next, what about the signal strength? If I open the BT menu item at the top of the screen while holding down ALT/option, I can see an RSSI number. At the moment, for the TB, it is -57 db.

Sounds good, I guess, but what does it mean in the real world. Even if it is considered a good number, does that automatically mean interference isn’t an issue? Or can you have a good number and interference can still cause issues? IOW, if interference is an issue, does that cause the RSSI number to get worse so you can tell better, via adding one device at a time, which one may be a problem?

One other thing. I had taken my Mini to the Apple store for an issue with overheating. I also told them that my iMac seemed to have less trouble with BT connections and asked if they could check that out as well. After two days of them stress testing, they didn’t find an overheating problem (I guess I just had a runaway process that went away on a reboot), but they said they fixed the BT issue. Didn’t give much in the way of details. The written report just says “Software repair” and an “Item Number” of S1493LL/A

No idea what that is. It could be awhile before I can really do much testing to see if it is different in dependability.

dbk - Apple likely updated the firmware in your Bluetooth modem.

That suggests you were experiencing a bug in the earlier version, which they have since fixed.

Hopefully that makes all your Bluetooth links more robust in your home going forward.

More testing and while I do seem to get more distance than before (not too many tests yet though), I did find that as soon as I reconnected my two external Seagate drives (daisy chained), it was pretty bad at even 5 feet away. Tried one disk connected at a time with the same result. Disconnected both and still had issues, which could be a residual problem once it got messed up. I let it go for awhile and when tested again, even though it was not nearly as good as before I ever connected them, it was definitely better.

I’ll test again after a bit to see if it gets back to where it was. If not, I’ll reboot and check again.

But if this is all about those external drives, I need to figure out what to do. I have a number of chokes on the cable to the first one, though I found I did not have any on the short cable to the second. I do that soon. I also need to turn off the TB for a little bit in case it got messed up from that process.

Anyway, if the interference is from the BT connector on the Mini (I use a usb-c to usb-A adaptor), I’m not sure what I can do. If it is from the drive end, I can see about adding more distance.

I need to look at the cables I have. I may have a usb-c to the micro-usb on the other end that goes into the drives. But, if so, they may be very short. Well, I guess I better start searching through all my cables now.

Don’t add distance. Stick them in a metal box and shield them from everything else.

M

I thought about doing something like that - assuming the interference wasn’t from the Mini’s port itself. But what about heat dissapation? I’d guess you certainly wouldn’t cover the top, but even if only the bottom and sides were covered, you are restricting air circulation.

For a definition which may be more helpful you might want to look at:

http://en.wikipedia.org/wiki/Bluetooth_stack

The simple way to think about it is a “stack” of software starting at the low level of a device driver up to a higher level API which other programs can interface with — and each level in that stack depends upon the the previous one. This is the implementation upon which you can build device support and defines the “protocol implementation”. So the Textblade is presented to the operating system as a keyboard from the Bluetooth Stack implemented in the OS. There is also a USB stack from which keyboards can be presented. In fact, often the Bluetooth hardware is connected internally to a USB bus so the USB stack is handling output from the Bluetooth stack. This is a generic concept and can be ported. For example, IIRC the Windows NT network stack was built largely on code ported from FreeBSD (my own personal favorite OS).

As for interference, generally that is the result of uncontrolled electromagnetic waves (like radio waves). This is typically solved with proper shielding. The most basic type of that is some sort of conductive material grounded — like the interwoven wires along the outside of a co-ax cable. The idea is that electromagnetic waves “yank” electrons in their path and thereby induce currents (movement of electrons) in conductive materials. If you have unwanted radiation of such waves you can surround them with a conductive material and provide a pathway to ground so that they are effectively stopped at that interface. This is the principal behind a Faraday Cage. It wouldn’t be necessary to completely enclose your drives — it might be sufficient to erect a sheet of metal between them and the Mac Mini which is grounded and large enough to block direct line of sight to the computer and devices.

Hopefully some of that is useful to you…

2 Likes

Right now I’m having a problem that makes no sense at all to me. Prior to taking the Mini into the shop, if I tried to type 5 feet away, it would always have delays right away. When I came back from the shop, I could type 12 feet away - however, that was before I connected by two external drives. When I connected those, it immediately screwed up again.

So, I disconnected them but it still wouldn’t work at 5 feet. Figuring something screwed up the system the first time and left it in a bad state, I tried shutting down and rebooting (TB too) after waiting a couple hours. Still didn’t work. Just this morning, after everything being off for 13 hours, it still doesn’t handle distance well at all.

That just doesn’t seem to make sense. If it messed up with the drives connected but then worked when disconnected, that would be logical. But not this!

Fortunately, I have been able to type fine from my normal position so far.

Oh, the RSSI numbers for the TB when up close was -51 db. When I moved it 5 feet away, it was -81 db. Both those numbers seem like they should be fine, but I don’t know. My only experience with db numbers on devices is on iphones which you could put in field test mode in the past and see the actual numbers rather than bars. With phones, you could be worse than -120 db and it would still work. This could be a different issue though.

Dbk - your radio signal level is fine, so it’s the hash from noise sources that’s likely interfering on the mini.

Bluetooth to iPhone or iPad works fine, so it points to the stuff plugged into or near mini.

Unplugging the drives and rebooting should have cleared it, but there may be another layer here.

If your mini Bluetooth firmware stack got corrupted, you might need to do a full power down for a couple minutes.

Try this - unplug all drives, shut down mini. Separate blades. Then unplug mini from ac wall for 10 min.

Without external drives, replug mini to power, and boot.

Once mini is up, boot TextBlade and check connection.

Let’s start from that baseline to sort out interference.

The only thing you listed that I haven’t already tried is to unplug the mini. I only shut it down. I’ll add that when I get home. But the other stuff I not only did, but did for hours rather than minutes without success.

Note: while the iPad and iPhone have never had a problem, remember that the are always really close to the TB. Like just inches normally.

Did you remove power from the external drives when they were disconnected from your Mini? If the interference was from the drives themselves keeping them powered on could do it. If that is removed as a possibility I tend to agree that the firmware in your Bluetooth hardware could benefit from a completely clean boot (ie, no power for long enough that the capacitor in the power circuitry has time to drain).

Yes, power was removed and also usb connection to mini was unplugged.

As an aside, the (mostly Chinese) inexpensive switching power supply implementations tend to throw off huge amounts of noise.

See: https://en.wikipedia.org/wiki/Switched-mode_power_supply

And for example:
https://www.ato.com/how-to-reduce-switching-power-supply-noise


https://www.digikey.com/en/articles/techzone/2016/may/minimizing-noise-generated-by-switched-mode-power-supplies
https://www.researchgate.net/post/How_to_reduce_SMPS_noise

1 Like

I scanned the links - most way over my head but, unless I missed something by scanning, a lot of it seems to have to do with how to build stuff with minimal interference rather than how to deal with products you have that may be creating interference. But I did find one comment interesting:

Make sure that you get chokes with sufficiently high impendance in the Multi-MHz range where your ripple is occurring!

I have ferrite chokes of various sizes, but I have no idea about their impedance or MHz ranges!

Well, I’m going to shut down and unplug in a moment and see what happens this time.

Dbk - lay out drive and its cable on a table and post pic.

That way we can see what chokes you have and where.

I’ll get to that. Right now just waiting with everything shut off and unplugged before I test again

Okay, here is some more info. Restarting everything and still had lags (but no external drives yet).

Then I decided to try the dongle from 5 feet away. It had trouble too!

Looked at my connections and for that dongle, I had a usb 2.x cable plugged into the Mini 3.x port. The end of that is plugged into a usb-2.x hub. The idea was to avoid usb 3 as much as possible and get the dongle (also my logitech mouse dongle), further away from the Mini 3.x port rather than plug it directly in like long ago I had it - and had problems.

Obviously, that was very disappointing, but maybe it provides a hint about what is going on. Anyway, then made a small change to that. Instead of plugging the usb-2.x cable into the usb-3.x hub on the mini, I used one of by usb-c to usb-3 adapters in between. This was an addition - the cable and hub are still there.

Well, then from 5 feet away, it still worked. Also from 10-12 feet. Of course, with all the weirdness I’ve experience, I’ll want to repeat this test a lot more times, especially since each test is pretty short (usually it will lag immediately and I don’t need a long test).

However, his change has no effect on the regular BT connection from 5 feet. It still lags.

So I figure, until I can get this working, a picture of my drives and their connections don’t matter since they aren’t connected in any way at this time, thus can’t be the cause of the problem. At least not at the moment.