I had switched off the Pi after my previous comment. Now, I switched it on again to follow the steps on the
askubuntu, and just for fun, decided to switch my bluetooth mouse to Pi -- and it worked! Douglas6, I swear that I had done sudo reboot wherever you asked me to -- I swear I followed the instructions correctly. I had done sudo reboot countless other times. The only difference now was that I did sudo halt, and the Pi was disconnected from the power bank that I use to power it.
I want to mention something for the benefit of others. I had installed blueman in my desperate attempts to get the bluetooth working, so I suspected that caused it to work. To check, I uninstalled blueman first, shut down the Pi, disconnected it from power bank, switched on, and my bluetooth mouse worked still. Then I removed the dependencies of blueman -- suspecting may be one of the dependencies was important in some way -- shut down the Pi, disconnected it, switched on, and the bluetooth mouse still works. Therefore, either shutting down the Pi completely instead of rebooting it was the key, or something that Douglas6 suggested along the way worked.
Thanks to all who tried to help. And Douglas6, from reading other posts about bluetooth on Pi, I know that you generally go an extra mile to solve problems -- thanks a lot!
