antiX Bluetooth set up problem: trusted but rejected anyway?

If it doesn't relate to Debian, but you still want to share it, please do it here

antiX Bluetooth set up problem: trusted but rejected anyway?

Postby THX1138b » 2017-09-16 21:15

I have a Wyse V90L thin client from 2008. It has only an 800 MHz i686 single core processor and 512 RAM (32 MB assigned to graphics). It has a 512 MB IDE flash drive (called a Drive On Module; DOM) but I have also put in a 32 GB (25 MB/s write, 40 MB/s read) flash drive attached to an internal USB header. I have a Belkin F8T009 Bluetooth USB adapter which uses a Broadcom chip/module/whatever it is. I have antiX installed onto the USB flash drive. Currently the DOM has an installation of Lucid Puppy on it but I was thinking of putting the /swap there instead. I haven't actually checked whether transfer speeds are higher for the DOM than the USB drive.

Excess information (probably not important): I want to use this machine as a teleprompter for my poxy electronics project videos I'm in the process of making (for parts where I have stuff to say but nothing to show on screen). I want to be able to control the teleprompter (mainly speed up, slow down and pause, but probably also reverse for re-takes) with a Bluetooth remote. On Windows 10, the remote I have gives scancodes SC12E, SC130, SC110, SC119, SC122 but I don't know whether they're directly translatable to Linux.

I tried to follow directions given at https://wiki.debian.org/BluetoothUser to pair a device using the command line but despite detecting my remote, trusting it and briefly connecting with in the pairing attempt, I cannot actually pair with it.

Who is rejecting whom? Is my device rejecting my antiX installation or vice versa? My device doesn't need a PIN to be paired or have any way to enter a PIN.

Is there an alternative version of Debian or an entirely different distribution that whilst lightweight (only 480 MB RAM available) is easier to make Bluetooth work? I don't need Bluetooth audio (or indeed any audio at all), just Bluetooth input. I've read that Bluetooth support is worse at the moment than it was in the past so maybe I should be using something older (Lucid Puppy has had its repositories disabled/taken down so I'd like to avoid anything in a similar state).

Code: Select all
sean@teleprompter:~
$ bluetoothctl help
[NEW] Controller 00:0A:3A:68:AD:A8 BlueZ 5.23 [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# devices
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:0A:3A:68:AD:A8 Discovering: yes
[NEW] Device AA:00:00:00:1E:D9 Bluetooth Remote Shutter
[NEW] Device 00:01:95:24:82:C7 00-01-95-24-82-C7
[CHG] Device 00:01:95:24:82:C7 LegacyPairing: no
[CHG] Device 00:01:95:24:82:C7 RSSI: 127
[CHG] Device 00:01:95:24:82:C7 Name: seantron2000
[CHG] Device 00:01:95:24:82:C7 Alias: seantron2000
[CHG] Device 00:01:95:24:82:C7 LegacyPairing: yes
[CHG] Device 00:01:95:24:82:C7 RSSI is nil
[bluetooth]# pair AA:00:00:00:1E:D9
Attempting to pair with AA:00:00:00:1E:D9
[CHG] Device AA:00:00:00:1E:D9 Connected: yes
Failed to pair: org.bluez.Error.AuthenticationRejected
[CHG] Device AA:00:00:00:1E:D9 Connected: no
[bluetooth]# trust AA:00:00:00:1E:D9
[CHG] Device AA:00:00:00:1E:D9 Trusted: yes
Changing AA:00:00:00:1E:D9 trust succeeded
[bluetooth]# pair AA:00:00:00:1E:D9
Attempting to pair with AA:00:00:00:1E:D9
[CHG] Device AA:00:00:00:1E:D9 Connected: yes
Failed to pair: org.bluez.Error.AuthenticationRejected
[CHG] Device AA:00:00:00:1E:D9 Connected: no
[bluetooth]#


Thanks!

Edit: I was able to pair with my Bluetooth headset although I don't get any sound from it. I'm not interested in making my headset work with this machine but I guess it shows that pairing is possible. My Bluetooth remote does pair successfully with my Windows 10 and Android 5 and Android 7 devices.

Code: Select all
sean@teleprompter:~
$ sudo bluetoothctl
[NEW] Controller 00:0A:3A:68:AD:A8 BlueZ 5.23 [default]
[NEW] Device 00:01:95:24:82:C7 seantron2000
[NEW] Device 00:02:5B:00:13:E3 allreli-soba
[NEW] Device AA:00:00:00:1E:D9 Bluetooth Remote Shutter
[bluetooth]# trust 00:02:5B:00:13:E3
[CHG] Device 00:02:5B:00:13:E3 Trusted: yes
Changing 00:02:5B:00:13:E3 trust succeeded
[bluetooth]# pair 00:02:5B:00:13:E3
Attempting to pair with 00:02:5B:00:13:E3
[CHG] Device 00:02:5B:00:13:E3 Connected: yes
[bluetooth]#
Last edited by THX1138b on 2017-09-17 21:12, edited 1 time in total.
antiX 16, Wyse V90L thin client with VIA Eden 32-bit 800 MHz CPU and 1 GB 533 MHz DDR2

We don't inherit the Earth from our parents; we borrow it from our children.
THX1138b
 
Posts: 30
Joined: 2017-09-12 20:57

Re: antiX Bluetooth set up problem: trusted but rejected any

Postby GarryRicketson » 2017-09-16 21:21

Bluetooth is not very secure either, I don't use it myself ,
https://www.kb.cert.org/vuls/id/240311
User avatar
GarryRicketson
 
Posts: 4460
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: antiX Bluetooth set up problem: trusted but rejected any

Postby pylkko » 2017-09-17 01:15

Garry, please start another thread for your "issue" as it has nothing to do with this here....

THX1138b, can you provide some logs after the failed attempt to connect. Please also describe the issue more thoroughly, particularly what do you do at what stage on the device during the connect attempt
User avatar
pylkko
 
Posts: 1213
Joined: 2014-11-06 19:02

Re: antiX Bluetooth set up problem: trusted but rejected any

Postby Segfault » 2017-09-17 01:34

Also, it does not hurt to check dmesg to make sure there are no BT related errors.
Segfault
 
Posts: 546
Joined: 2005-09-24 12:24

Re: antiX Bluetooth set up problem: trusted but rejected any

Postby GarryRicketson » 2017-09-17 02:02

pylkko wrote:Garry, please start another thread for your "issue" as it has nothing to do with this here....

THX1138b, can you provide some logs after the failed attempt to connect. Please also describe the issue more thoroughly, particularly what do you do at what stage on the device during the connect attempt


I see you found the thread I started, after posting this.
http://forums.debian.net/viewtopic.php?f=3&t=134699#p654618
Next time, just PM me instead of posting your issue about my posts, and disrupting the topic even more, as you say "it has nothing to do with this"
Thank you
Oh, and P.S.
You are not my boss, so please stop telling me what to do or not to do.
User avatar
GarryRicketson
 
Posts: 4460
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: antiX Bluetooth set up problem: trusted but rejected any

Postby Segfault » 2017-09-17 02:08

What is this, tequila talking? One should never reply to a new post with no replies with a useless post.
Segfault
 
Posts: 546
Joined: 2005-09-24 12:24

Re: antiX Bluetooth set up problem: trusted but rejected any

Postby stevepusser » 2017-09-17 17:48

The OP may also get better answers on the antiX forum; they could know much more about the peculiarities of the Bluetooth stack and possible missing packages there. AntiX differs from Debian in that it does not installed recommended packages by default, for example, so Debian will install more BT packages than antiX when you're trying to set BT up, and one of them might be the key.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Krita 3.3.2.1, Pale Moon 27.6.0, Audacity 2.2.0, mpv 0.27.0, Corebird 1.7.1, Firefox 57.0, SMPlayer 17.11.2
User avatar
stevepusser
 
Posts: 8938
Joined: 2009-10-06 05:53

Re: antiX Bluetooth set up problem: trusted but rejected any

Postby THX1138b » 2017-09-17 21:00

Hi everyone,

There isn't much to be done on the Bluetooth device when pairing: I switch it on and press and hold two buttons until it enters pairing mode whereupon a light begins to flash. It stays in this state for several minutes before turning itself off which provides plenty of time to enter the required commands.

I have put some logs here. Are there any others I should check?

I did actually ask for help on the dedicated antiX forum already but I only got one response and that was about enabling Bluetooth audio which I've no interest in doing (the only audio I want to hear from this machine is a single beep at POST!). I checked the repository and there are no other packages returned for the search term "blue" than what I already have. Is there any way to get all the missing packages in one fell swoop? Or maybe there's a Debian variant that is more comprehensive than antiX but still doesn't require a 1 GHz processor and 512 RAM. Thanks for any advice, anyway.

Code: Select all
sean@teleprompter:/var/log
$ sudo grep -i blue syslog
Sep 15 14:16:19 teleprompter kernel: [    3.570193] usb 2-2: Product: Belkin Bluetooth Device
Sep 15 14:16:19 teleprompter kernel: [    7.940657] Bluetooth: Core ver 2.21
Sep 15 14:16:19 teleprompter kernel: [    7.940739] Bluetooth: HCI device and connection manager initialized
Sep 15 14:16:19 teleprompter kernel: [    7.940758] Bluetooth: HCI socket layer initialized
Sep 15 14:16:19 teleprompter kernel: [    7.940771] Bluetooth: L2CAP socket layer initialized
Sep 15 14:16:19 teleprompter kernel: [    7.940821] Bluetooth: SCO socket layer initialized
Sep 15 14:16:21 teleprompter bluetoothd[2053]: Bluetooth daemon 5.23
Sep 15 14:16:21 teleprompter bluetoothd[2053]: Starting SDP server
Sep 15 14:16:21 teleprompter kernel: [   40.380678] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Sep 15 14:16:21 teleprompter kernel: [   40.380697] Bluetooth: BNEP filters: protocol multicast
Sep 15 14:16:21 teleprompter kernel: [   40.380724] Bluetooth: BNEP socket layer initialized
Sep 15 14:16:21 teleprompter bluetoothd[2053]: Bluetooth management interface 1.10 initialized
Sep 15 14:16:21 teleprompter bluetoothd[2053]: Sap driver initialization failed.
Sep 15 14:16:21 teleprompter bluetoothd[2053]: sap-server: Operation not permitted (1)
Sep 15 19:04:28 teleprompter bluetoothd[2053]: Sap driver initialization failed.
Sep 15 19:04:28 teleprompter bluetoothd[2053]: sap-server: Operation not permitted (1)
Sep 15 19:53:21 teleprompter bluetoothd[2053]: Sap driver initialization failed.
Sep 15 19:53:21 teleprompter bluetoothd[2053]: sap-server: Operation not permitted (1)
Sep 15 19:59:32 teleprompter kernel: [ 2426.316110] Bluetooth: RFCOMM TTY layer initialized
Sep 15 19:59:32 teleprompter kernel: [ 2426.316151] Bluetooth: RFCOMM socket layer initialized
Sep 15 19:59:32 teleprompter kernel: [ 2426.316186] Bluetooth: RFCOMM ver 1.11
Sep 15 20:02:22 teleprompter bluetoothd[2053]: No agent available for request type 4
Sep 15 20:02:22 teleprompter bluetoothd[2053]: device_notify_pin: Operation not permitted
Sep 15 20:02:52 teleprompter bluetoothd[2053]: No agent available for request type 4
Sep 15 20:02:52 teleprompter bluetoothd[2053]: device_notify_pin: Operation not permitted


Code: Select all
sean@teleprompter:/var/log
$ sudo grep -i blue dmesg|more
[    3.570193] usb 2-2: Product: Belkin Bluetooth Device
[    7.940657] Bluetooth: Core ver 2.21
[    7.940739] Bluetooth: HCI device and connection manager initialized
[    7.940758] Bluetooth: HCI socket layer initialized
[    7.940771] Bluetooth: L2CAP socket layer initialized
[    7.940821] Bluetooth: SCO socket layer initialized
sean@teleprompter:/var/log


Code: Select all
sean@teleprompter:/var/log
$ sudo grep -i blue daemon.log
Sep 15 14:16:21 teleprompter bluetoothd[2053]: Bluetooth daemon 5.23
Sep 15 14:16:21 teleprompter bluetoothd[2053]: Starting SDP server
Sep 15 14:16:21 teleprompter bluetoothd[2053]: Bluetooth management interface 1.10 initialized
Sep 15 14:16:21 teleprompter bluetoothd[2053]: Sap driver initialization failed.
Sep 15 14:16:21 teleprompter bluetoothd[2053]: sap-server: Operation not permitted (1)
Sep 15 19:04:28 teleprompter bluetoothd[2053]: Sap driver initialization failed.
Sep 15 19:04:28 teleprompter bluetoothd[2053]: sap-server: Operation not permitted (1)
Sep 15 19:53:21 teleprompter bluetoothd[2053]: Sap driver initialization failed.
Sep 15 19:53:21 teleprompter bluetoothd[2053]: sap-server: Operation not permitted (1)
Sep 15 20:02:22 teleprompter bluetoothd[2053]: No agent available for request type 4
Sep 15 20:02:22 teleprompter bluetoothd[2053]: device_notify_pin: Operation not permitted
Sep 15 20:02:52 teleprompter bluetoothd[2053]: No agent available for request type 4
Sep 15 20:02:52 teleprompter bluetoothd[2053]: device_notify_pin: Operation not permitted
Sep 16 01:15:10 teleprompter bluetoothd[2053]: Sap driver initialization failed.
Sep 16 01:15:10 teleprompter bluetoothd[2053]: sap-server: Operation not permitted (1)
Sep 17 21:39:36 teleprompter bluetoothd[2053]: Sap driver initialization failed.
Sep 17 21:39:36 teleprompter bluetoothd[2053]: sap-server: Operation not permitted (1)
sean@teleprompter:/var/log
antiX 16, Wyse V90L thin client with VIA Eden 32-bit 800 MHz CPU and 1 GB 533 MHz DDR2

We don't inherit the Earth from our parents; we borrow it from our children.
THX1138b
 
Posts: 30
Joined: 2017-09-12 20:57

Re: antiX Bluetooth set up problem: trusted but rejected any

Postby pylkko » 2017-09-18 17:11

That device sounds like something that would work as under the Human Interface Device Profile (HID). That is, something like a keyboard or mouse. In Linux these devices form a file at a location in /dev where they past the state of the input. So if you print the content of the file while moving the mouse or pressing the buttons on the device, you can see the content change in real time. This can then be used in scripts to do stuff. Anyway, back to your problem. I noticed that you are not explicitly setting an agent, but I am not sure if you have something set up to automatically do this or similar. I notice that your bluetoothctl output does not say "agent registered", and that your log complains about mising agent... Anyway, you can try again with bluetoothctl (as root) and issue
Code: Select all
agent on
and then
Code: Select all
default-agent
before you attempt to pair. Or you can also try to do it like so in the terminal:
Code: Select all
bluez-simple-agent
The agent is the part that receives or offers a code to the connecting device. Without the agent the devices cannot negotiate the pairing code. Most devices use either 0000 or 1234 as the default code. You can set the pairing code before pairing with
Code: Select all
bluetooth-agent 0000 &
, where & will send the process to the "background", any command that you enter like this will continue running in the background while you do other stuff.

Newer devices may support so called simple pairing.
Code: Select all
 hciconfig hci0 sspmode 1
can be used to set the device to use this. This does not require auth.

If all this is of no help, you can try to dump the entire output of a pairing attempt. For that you need to install the dump package and run hcidump -i hci0

EDIT: notice that hci0 may be hci1 or other in your case.

Also: do you know what chip it is? Because some of these have firmware for them that is not included in standard Debian: https://packages.debian.org/stretch/bluez-firmware

While many devices do not work at all without firmware there are some that work partially or in some very basic manner.

Also worth trying is not pairing at all but just using connect. And always before trying to do the connection again, first use remove to remove the device, turn it of and back into advertising mode. Wait... connect..
User avatar
pylkko
 
Posts: 1213
Joined: 2014-11-06 19:02

Re: antiX Bluetooth set up problem: trusted but rejected any

Postby THX1138b » 2017-09-18 18:01

Hey pyikko. Thanks again for your response.

Code: Select all
$ bluetoothctl
[NEW] Controller 00:0A:3A:68:AD:A8 BlueZ 5.23 [default]
[NEW] Device AA:00:00:00:1E:D9 Bluetooth Remote Shutter
[NEW] Device 00:02:5B:00:13:E3 allreli-soba
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# pair AA:00:00:00:1E:D9
Attempting to pair with AA:00:00:00:1E:D9
[CHG] Device AA:00:00:00:1E:D9 Connected: yes
[agent] PIN code: 343390
[bluetooth]#


Unfortunately there are two commands that get rejected:

Code: Select all
sean@teleprompter:~
$ bluetoothctl
[NEW] Controller 00:0A:3A:68:AD:A8 BlueZ 5.23 [default]
[NEW] Device AA:00:00:00:1E:D9 Bluetooth Remote Shutter
[NEW] Device 00:02:5B:00:13:E3 allreli-soba
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# bluetooth-agent 0000 &
Invalid command
[bluetooth]# bluez-simple-agent
Invalid command
[bluetooth]#


I guess I'm supposed to do the "bluetooth-agent 0000 &" at a different terminal but those aren't accepted. Could this be due to stuff missing from the antiX version of Debian? Incidentally, I found a 1 GB SODIMM in a broken laptop I was given a while ago so this system now has 971 MB RAM free (32 MB goes to video and I don't know where the rest is). It's still mighty slow running Firefox because of the 800 MHz CPU.

Code: Select all
sean@teleprompter:~
$ bluez-simple-agent
bash: bluez-simple-agent: command not found
sean@teleprompter:~
$ bluetooth-agent 0000 &
[1] 7692
bash: bluetooth-agent: command not found
sean@teleprompter:~
$


Code: Select all
sean@teleprompter:~
$ bluez-simple-agent
bash: bluez-simple-agent: command not found
[1]+  Exit 127                bluetooth-agent 0000
sean@teleprompter:~
$


The instructions for the Bluetooth remote control do not mention the pairing code. Does that mean there's a default code of 0000 or 1234 and I just don't see it?

Code: Select all
sean@teleprompter:~
$  hciconfig hci0 sspmode 1
Can't set Simple Pairing mode on hci0: Operation not permitted (1)
sean@teleprompter:~
$  hciconfig hci1 sspmode 1
Can't get device info: No such device
sean@teleprompter:~
$ sudo hciconfig hci0 sspmode 1
[sudo] password for sean:
Can't set Simple Pairing mode on hci0: Input/output error (5)
antiX 16, Wyse V90L thin client with VIA Eden 32-bit 800 MHz CPU and 1 GB 533 MHz DDR2

We don't inherit the Earth from our parents; we borrow it from our children.
THX1138b
 
Posts: 30
Joined: 2017-09-12 20:57

Re: antiX Bluetooth set up problem: trusted but rejected any

Postby pylkko » 2017-09-18 19:44

Sorry, maybe my explanation was not clear enough. The other commands were meant as possible alteratives that you type into a bash shell not into bluetoothctl. Both of these programs are distributed in the bluez package on Debian, about Antix I do not know. By the way, you asked earlier about using a lightweight Debian. There is bunsenlabs.

Most cheap online electronics does not come with any kind of documentation. It is possible that your device is intended to be used with simple mode, but it appears that your USB dongle does not support that at all. You might be able to use the legacy mode nevertheless. You can try to use bluetoothctl to delete the settings for the device. Then put it into advertising mode. Make sure default agent is up and just connect to the MAC address (don't pair). You should at least try that once. There is no guarantees that it will work, but it might. In the output you get a random PIN 343390 from the agent. At this point it is waiting for a 34390 from the keyboard, but of course a two button remote does not do that in any sensible way... I would at least try to set it manually to 0000 and 1234. Also, I googled your bluetooth dongle and there were comments were people openly suggested "not getting it" and saying does not work well and so on... considering how cheap these things are, you should also consider the possibility of getting another one, one that is considered reliable.

You should also know, that in the case that this does not work, there are many other ways to do things like this. I mean there are hundreds of ways to remote control computers.
User avatar
pylkko
 
Posts: 1213
Joined: 2014-11-06 19:02

Re: antiX Bluetooth set up problem: trusted but rejected any

Postby THX1138b » 2017-09-22 01:02

pylkko wrote:Sorry, maybe my explanation was not clear enough. The other commands were meant as possible alteratives that you type into a bash shell not into bluetoothctl. Both of these programs are distributed in the bluez package on Debian, about Antix I do not know. By the way, you asked earlier about using a lightweight Debian. There is bunsenlabs.

Most cheap online electronics does not come with any kind of documentation. It is possible that your device is intended to be used with simple mode, but it appears that your USB dongle does not support that at all. You might be able to use the legacy mode nevertheless. You can try to use bluetoothctl to delete the settings for the device. Then put it into advertising mode. Make sure default agent is up and just connect to the MAC address (don't pair). You should at least try that once. There is no guarantees that it will work, but it might. In the output you get a random PIN 343390 from the agent. At this point it is waiting for a 34390 from the keyboard, but of course a two button remote does not do that in any sensible way... I would at least try to set it manually to 0000 and 1234. Also, I googled your bluetooth dongle and there were comments were people openly suggested "not getting it" and saying does not work well and so on... considering how cheap these things are, you should also consider the possibility of getting another one, one that is considered reliable.

You should also know, that in the case that this does not work, there are many other ways to do things like this. I mean there are hundreds of ways to remote control computers.


Unfortunately, it seems that you are correct that this Bluetooth adapter is not able to pair without a PIN. I tried the same dongle connected to a Windows 7 machine and the option to pair without a PIN was greyed-out. I attached a different Bluetooth adapter to my antiX system (borrowed from another PC) and it paired correctly without a PIN. I did not realise that different Bluetooth adapters had these limitations.

I am interested in attempting to use the legacy mode that you mentioned with my bad Bluetooth adapter. When I do that, the terminal says that the connection is successful yet the blue light on my Bluetooth remote continues to flash. I tried using the virtual terminal with command "showkey --scancodes" to see if it would detect the key pressed from the remote but it does not. Do you think it might still be possible to use the legacy mode?

I do have a wireless mouse that I could control my teleprompter with but this remote control is my first choice because it's so small/discrete.

Code: Select all
sean@Teleprompter:~
$ bluetoothctl
[NEW] Controller 00:0A:3A:68:AD:A8 BlueZ 5.23 [default]
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:0A:3A:68:AD:A8 Discovering: yes
[NEW] Device AA:00:00:00:1E:D9 AA-00-00-00-1E-D9
[bluetooth]# scan off
Discovery stopped
[CHG] Controller 00:0A:3A:68:AD:A8 Discovering: no
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# connect
[bluetooth]# connect 00:0A:3A:68:AD:A8
Device 00:0A:3A:68:AD:A8 not available
[bluetooth]# connect AA:00:00:00:1E:D9
Attempting to connect to AA:00:00:00:1E:D9
[CHG] Device AA:00:00:00:1E:D9 Connected: yes
[CHG] Device AA:00:00:00:1E:D9 Name: Bluetooth Remote Shutter
[CHG] Device AA:00:00:00:1E:D9 Alias: Bluetooth Remote Shutter
Failed to connect: org.bluez.Error.Failed
[CHG] Device AA:00:00:00:1E:D9 Connected: no
[bluetooth]#
antiX 16, Wyse V90L thin client with VIA Eden 32-bit 800 MHz CPU and 1 GB 533 MHz DDR2

We don't inherit the Earth from our parents; we borrow it from our children.
THX1138b
 
Posts: 30
Joined: 2017-09-12 20:57


Return to Offtopic

Who is online

Users browsing this forum: Nili and 2 guests

fashionable