You are not logged in.
Pages: 1
i found example device scan code at https://people.csail.mit.edu/albert/blu … /c404.html it works in raspberry pi zero w but i failed to make it work in my arch system.
function hci_get_route fails with No such device
i got bluetooth dongle it does't give much information about itself but here is picture of it
https://i.imgur.com/9FdhgYS.jpg
https://i.imgur.com/gFfNCha.jpg
$ sudo dmesg | grep -i blue
[ 8.276327] Bluetooth: Core ver 2.22
[ 8.276344] Bluetooth: HCI device and connection manager initialized
[ 8.276347] Bluetooth: HCI socket layer initialized
[ 8.276350] Bluetooth: L2CAP socket layer initialized
[ 8.276353] Bluetooth: SCO socket layer initialized
[ 8.569189] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 8.569191] Bluetooth: BNEP filters: protocol multicast
[ 8.569195] Bluetooth: BNEP socket layer initialized$ lsmod | grep -i blue
bluetooth 720896 14 btrtl,btintel,btbcm,bnep,btusb
ecdh_generic 16384 1 bluetooth
rfkill 28672 5 asus_wmi,bluetooth,cfg80211
crc16 16384 2 bluetooth,ext4$ rfkill
ID TYPE DEVICE SOFT HARD
0 bluetooth hci0 unblocked unblocked$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2021-01-09 19:52:26 +03; 21min ago
Docs: man:bluetoothd(8)
Main PID: 340 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 7024)
Memory: 2.1M
CGroup: /system.slice/bluetooth.service
└─340 /usr/lib/bluetooth/bluetoothd
Jan 09 19:52:26 archlinux systemd[1]: Starting Bluetooth service...
Jan 09 19:52:26 archlinux bluetoothd[340]: Bluetooth daemon 5.54
Jan 09 19:52:26 archlinux systemd[1]: Started Bluetooth service.
Jan 09 19:52:26 archlinux bluetoothd[340]: Starting SDP server
Jan 09 19:52:26 archlinux bluetoothd[340]: Bluetooth management interface 1.17 initializedLast edited by mofibaw316 (2021-01-11 20:00:25)
Offline
i noticed sudo btmon command gives bluetooth address of hci0
i googled that address and found other people had same address with same device id
my bluetooth address
00:1A:7D:DA:71:10$ lsusb | grep -i blue
Bus 005 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)Offline
i updated all packages to newest (including kernel)
i get slightly different command outputs
$ sudo dmesg | grep -i blue
[ 5.060447] Bluetooth: Core ver 2.22
[ 5.060469] Bluetooth: HCI device and connection manager initialized
[ 5.060473] Bluetooth: HCI socket layer initialized
[ 5.060475] Bluetooth: L2CAP socket layer initialized
[ 5.060478] Bluetooth: SCO socket layer initialized
[ 5.091074] Bluetooth: hci0: CSR: Unbranded CSR clone detected; adding workarounds...
[ 5.242297] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 5.242299] Bluetooth: BNEP filters: protocol multicast
[ 5.242303] Bluetooth: BNEP socket layer initialized$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2021-01-10 14:48:07 +03; 13min ago
Docs: man:bluetoothd(8)
Main PID: 317 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 7019)
Memory: 3.1M
CGroup: /system.slice/bluetooth.service
└─317 /usr/lib/bluetooth/bluetoothd
Jan 10 14:48:07 archlinux bluetoothd[317]: src/main.c:parse_controller_config() Key file does not have key “LEScanIntervalConnect” in group “Controller”
Jan 10 14:48:07 archlinux bluetoothd[317]: src/main.c:parse_controller_config() Key file does not have key “LEScanWindowConnect” in group “Controller”
Jan 10 14:48:07 archlinux bluetoothd[317]: src/main.c:parse_controller_config() Key file does not have key “LEMinConnectionInterval” in group “Controller”
Jan 10 14:48:07 archlinux bluetoothd[317]: src/main.c:parse_controller_config() Key file does not have key “LEMaxConnectionInterval” in group “Controller”
Jan 10 14:48:07 archlinux bluetoothd[317]: src/main.c:parse_controller_config() Key file does not have key “LEConnectionLatency” in group “Controller”
Jan 10 14:48:07 archlinux bluetoothd[317]: src/main.c:parse_controller_config() Key file does not have key “LEConnectionSupervisionTimeout” in group “Controller”
Jan 10 14:48:07 archlinux bluetoothd[317]: src/main.c:parse_controller_config() Key file does not have key “LEAutoconnecttimeout” in group “Controller”
Jan 10 14:48:07 archlinux systemd[1]: Started Bluetooth service.
Jan 10 14:48:07 archlinux bluetoothd[317]: Starting SDP server
Jan 10 14:48:07 archlinux bluetoothd[317]: Bluetooth management interface 1.18 initializedi just realized im able to power it from bluetoothctl now example search code started to give error at somewhere else.
function hci_inquiry fails with Connection timed out
I tried power it off then power on back;
$ sudo bluetoothctl
Agent registered
[CHG] Controller 00:1A:7D:DA:71:10 Pairable: yes
[bluetooth]# power on
[CHG] Controller 00:1A:7D:DA:71:10 Class: 0x00000104
Changing power on succeeded
[CHG] Controller 00:1A:7D:DA:71:10 Powered: yes
[bluetooth]# power off
Changing power off succeeded
[CHG] Controller 00:1A:7D:DA:71:10 Powered: no
[CHG] Controller 00:1A:7D:DA:71:10 Discovering: no
[CHG] Controller 00:1A:7D:DA:71:10 Class: 0x00000000
[bluetooth]# power on
Failed to set power on: org.bluez.Error.Failed
[bluetooth]# somehow its only powerable after system reboot and doesn't work more.
when this happens systemctl status bluetooth gives
Jan 10 15:49:22 archlinux bluetoothd[325]: Failed to set mode: Failed (0x03)Last edited by mofibaw316 (2021-01-10 10:52:36)
Offline
i found script that compiles kernel modules with patch
patch is not directly working with current newest arch linux kernel (5.10.6-arch1-1)
but its possible to compile it with adding few line code
gist.github.com/nevack/6b36b82d715dc025163d9e9124840a07
hcitool scan works but stucks after few try
i successed make it pair with phone from blueman
i tried to run client and server code with another device both of it didnt work people.csail.mit.edu/albert/bluez-intro/x502.html
"bluetooth doesn't work" - now somewhat "working"
Last edited by mofibaw316 (2021-01-11 20:03:13)
Offline
Pages: 1