AnneRanch
Posts: 91
Joined: Fri Oct 19, 2018 1:48 pm

Using "bluetooth" command -how does "terminal" becomes bluetooth device ?

Fri May 24, 2019 4:13 pm

I am trying to identify bluetooth devices using "bluetooth" command.
I am connected to RPi 3B via my PC terminal - ssh [email protected]

I can identify the "pi" controller as such , no problem.
When I do "devices" I get three.
One of them should be the built-in adapter.
(Right ? I need controller and an adapter ?)
I have verified that by using other command as using UART which is OK.


I like to find out how is the "jim_desktop" listed as bluetooth device.

Since I am using PC as ssh terminal I just cannot disconnect it to find out it will no longer be listed as "bluetooth device".

I have no clue what is the third device I am picking up, but that is not important at this point.
I am sure there are other commands I can use to further identify the devices (info ) , by just using their known address.
No problem there.


[bluetooth]# list
Controller B8:27:EB:11:3F:82 pi [default]
[bluetooth]# devices
Device 00:50:B6:80:4D:5D jim-desktop bluetooth device (?)= "points to " terminal application running on my PC ?
Device 68:64:4B:16:CD:9E 68-64-4B-16-CD-9E
Device 65:78:C6:60:64:33 65-78-C6-60-64-33
[bluetooth]#

User avatar
Douglas6
Posts: 4677
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Using "bluetooth" command -how does "terminal" becomes bluetooth device ?

Fri May 24, 2019 5:51 pm

I feel like I have answered these questions before, but I'll try again. There is no 'bluetooth' command, I'll assume you are using bluetoothctl.

There is only one adapter. Sometimes it is called a controller. Same thing.

The 'devices' command only shows remote devices that are paired or advertising. You have three, one of which is called 'jim-desktop'. I suspect that is a desktop computer, possibly the one you are using to SSH into the Pi. Possibly not. It has a Bluetooth device, either internally, or as a USB dongle. That is not related to your using the computer for SSH. In other words 'terminal' does not become (a) Bluetooth device. All we know at this point is that there is a Bluetooth device (named jim-desktop) either in range or formerly in range of your Pi.

AnneRanch
Posts: 91
Joined: Fri Oct 19, 2018 1:48 pm

Re: Using "bluetooth" command -how does "terminal" becomes bluetooth device ?

Fri May 24, 2019 6:32 pm

[email protected]:~$ bluetooth
bluetooth = on
[email protected]:~$
[email protected]:~ $ bluetoothctl
Agent registered
[bluetooth]#

OK, I made a mistake.


I have no bluetooth adapters / devices / controllers on my PC .
When I scan of / scan on it shows current devices ,

[email protected]:~ $ bluetoothctl
Agent registered
[bluetooth]# help
Menu main:
Available commands:
-------------------
advertise Advertise Options Submenu
scan Scan Options Submenu
gatt Generic Attribute Submenu
list List available controllers
show [ctrl] Controller information
select <ctrl> Select default controller
devices List available devices
paired-devices List paired devices

system-alias <name> Set controller alias
reset-alias Reset controller alias
power <on/off> Set controller power
pairable <on/off> Set controller pairable mode
discoverable <on/off> Set controller discoverable mode
agent <on/off/capability> Enable/disable agent with given capability
default-agent Set agent as the default one
advertise <on/off/type> Enable/disable advertising with given type
set-alias <alias> Set device alias
scan <on/off> Scan for devices
info [dev] Device information
pair [dev] Pair with device
trust [dev] Trust device
untrust [dev] Untrust device
block [dev] Block device
unblock [dev] Unblock device
remove <dev> Remove device
connect <dev> Connect device
disconnect [dev] Disconnect device
menu <name> Select submenu
version Display version
quit Quit program
exit Quit program
help Display help about this program
export Print evironment variables
[bluetooth]#
PLEASE do not reply if it bothers you.
There is no need for unsolicited / unnecessary remarks.

My objective is to get help, and I do appreciate that.

Cheers

AnneRanch
Posts: 91
Joined: Fri Oct 19, 2018 1:48 pm

Re: Using "bluetooth" command -how does "terminal" becomes bluetooth device ?

Sat May 25, 2019 12:03 am

Update

My objective is to have bluetooth link between RPi 3b and my PC.
Since my PC has no bluetooth devices I am using USB dongle marked V2.0 EDR .
That dongle shows up on lsusb


[email protected]:~$ lsusb
Bus 002 Device 003: ID 0bc2:2322 Seagate RSS LLC
Bus 002 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0a48:3239 I/O Interconnect Multimedia Card Reader
Bus 001 Device 012: ID 0a5c:2121 Broadcom Corp. BCM2210 Bluetooth
Bus 001 Device 007: ID 046d:c016 Logitech, Inc. Optical Wheel Mouse
Bus 001 Device 005: ID 2001:f103 D-Link Corp. DUB-H7 7-port USB 2.0 hub
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 002: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
However, it does shows as "controller" and NOT as a device using bluetoothctl
[email protected]:~$ bluetoothctl
Agent registered

[bluetooth]# scan on
Discovery started
[CHG] Controller 00:50:B6:80:4D:5D Discovering: yes
[CHG] Controller 00:50:B6:80:4D:5D Class: 0x00000000
[CHG] Controller 00:50:B6:80:4D:5D Powered: no
[CHG] Controller 00:50:B6:80:4D:5D Discovering: no
[DEL] Controller 00:50:B6:80:4D:5D jim-desktop [default]
[NEW] Controller 00:50:B6:80:4D:5D jim-desktop [default]
[DEL] Controller 00:50:B6:80:4D:5D jim-desktop [default]
[bluetooth]# scan off
No default controller available - USB dongle removed
(How is controller identified AFTER the scan is turned off?)

[bluetooth]# scan on
No default controller available USB dongle still removed

USB dongle inserted

[NEW] Controller 00:50:B6:80:4D:5D jim-desktop [default]
[DEL] Controller 00:50:B6:80:4D:5D jim-desktop [default]
[NEW] Controller 00:50:B6:80:4D:5D jim-desktop [default]
[bluetooth]# devices
NO DEVICES DETECTED

scan still active

[DEL] Controller 00:50:B6:80:4D:5D jim-desktop [default]
[NEW] Controller 00:50:B6:80:4D:5D jim-desktop [default]
[DEL] Controller 00:50:B6:80:4D:5D jim-desktop [default]
[bluetooth]#


Basically controller and device is SAME as already pointed out.

Which may not make a difference in hardware description , but is misleading in software.

What got me going in circles was the "default name " and the fact that after connection
is established I get "terminal not ready " string of messages.

I have changed the class of service on RPi to "computer, ..." and still getting error messages from "terminal not ready ".
So the original "audio class of service " did not affect the connection.


Thanks for forum help, hopefully next problem will be this easy to resolve.

Return to “Interfacing (DSI, CSI, I2C, etc.)”