Realtek BT 4.2 Adapter (0bda:b009)attaches, then disconnects - Ubuntu 20.04.6 LTS

Solved!

Actually, the original “problem” remains, but it now appears that it was a problem that I never needed to fix. There’s a lesson there…

Turns out, I don’t really care if bluetoothctl can use my dongle to connect to my remote gadget; I incorrectly believed that if bluetoothctl couldn’t connect to the gadget, then my custom python app couldn’t either. I was mistaken !

I just focused my web search prompt more accurately, and the second result returned was the one I was looking for. I entered “bluetoothctl connect to hc-06” - the HC-06 is the gadget’s interface. You can get them on Amazon for like 10 bucks - they’re very popular with the Pi / Arduino crowd. My gadget uses the Arduino Pro Micro for brains and the HC-06 for comms to my laptop.

The page I found does describe all the preliminary steps that bluetoothctl is actually used for: scan, identify, pair, and trust - and then you can close bluetoothctl.

The rest of the story is pretty simple. The link to the page is here - but for the the interested, the fix involves two commands - the first is “rfcomm” which is used to create a serial port and bind my remote gadget (NOT my dongle - the remote unit) to it. You heard that right. The second command is the “screen” command - but that’s just a tool that was recommended to verify connectivity…

The rfcomm command looks like this:

sudo rfcomm bind 0 00:11:22:33:44:55

(No, that 's not actually the gadget’s address…)
The rfcomm command creates a serial port called “/dev/rfcomm0”, and connects the port directly to MAC address of the remote gadget.

Then, you check the status of the new port with the old “file” command - since everything in Linux - including ports - are basically files:

:~$ file /dev/rfcomm0
/dev/rfcomm0: character special (216/0)

Believe it or not, that’s it.

You can then verify the connection using the “screen” command to connect to the port and thereby on to the remote device - which I assume is connected automatically as soon as some data hits the port somehow.

sudo screen /dev/rfcomm0 115200

What’s the old saying ? “Any technology not readily distinguishable from magic is not sufficiently evolved.” This is like magic I guess.

When the screen terminal first opened, I tried entering the single character ‘h’ - which my gadget is supposed to interpret as a command to display the “help” menu - but nothing showed in the screen - and so I hit the “enter” key anyway, and:

Commands:
az el -(0..360 0..90)
r -Reset
eNN.N -MagDecl
c -Calibrate
s -Save
a -Abort
d -Demo
b -Debug
m -Monitor
p -Pause

Voila! This is what I have been trying to accomplish all along.

Thanks for all the inputs and suggestions - I got here because of all of it!