3

I would like to pair a Bluetooth barcode scanner in "Serial Port Profile Mode" (SPP) using bluetoothctl on Arch Linux. The device is:

[bluetooth]# info 00:07:BE:1C:40:C4
Device 00:07:BE:1C:40:C4 (public)
    Name: QuickScan-i-QBT2131 E17C07052
    Alias: QuickScan-i-QBT2131 E17C07052
    Class: 0x00180000
    Paired: no
    Trusted: yes
    Blocked: no
    Connected: no
    LegacyPairing: yes

I scanned the barcode "Enable RF Link to Server".

With scan on the device becomes visible:

[NEW] Device 00:07:BE:1C:40:C4 00-07-BE-1C-40-C4
[CHG] Device 00:07:BE:1C:40:C4 LegacyPairing: no
[CHG] Device 00:07:BE:1C:40:C4 Name: QuickScan-i-QBT2131 E17C07052
[CHG] Device 00:07:BE:1C:40:C4 Alias: QuickScan-i-QBT2131 E17C07052
[CHG] Device 00:07:BE:1C:40:C4 LegacyPairing: yes

However pairing fails:

[NEW] Device 00:07:BE:1C:40:C4 00-07-BE-1C-40-C4
[CHG] Device 00:07:BE:1C:40:C4 LegacyPairing: no
[CHG] Device 00:07:BE:1C:40:C4 Name: QuickScan-i-QBT2131 E17C07052
[CHG] Device 00:07:BE:1C:40:C4 Alias: QuickScan-i-QBT2131 E17C07052
[CHG] Device 00:07:BE:1C:40:C4 LegacyPairing: yes

Regression

I tried to disable "LegacyPairing" on the barcode scanner:

  • Scan barcode: Enter Programming Mode
  • Scan barcode: BT Security Mode = Disable
  • Scan barcode: Exit Programming Mode

Result: Request PIN code

I tried to use "Agent" "KeyboardOnly" and "NoInputNoOutput".

Result: Request PIN code

Just entering 0000 or 1234 results in:

[agent] Enter PIN code: 1234
Failed to pair: org.bluez.Error.AuthenticationRejected

Request PIN code [agent] Enter PIN code:

Means you have to type in a PIN code using the computer keyboard, to later on scan with the barcode scanner. For this Datalogic scanner the device lights screen when it requests you to scan the earlier entered PIN code.

I did have some luck in HID mode by setting the agent to KeyboardOnly, configure the barcode scanner by scanning barcodes:

  1. "Unlink"
  2. "Variable PIN Code"
  3. "Link to PC in HID"

Pairing successfulhci0: last event is not cmd complete (0x0f).

HID: without scanning barcode Variable PIN Code

After scanning "Restore EU Factory Configuration", a computer reboot and not scanning the "Variable PIN Code", so only scanning "Unlink" and "Link to PC in HID" this happens:

[bluetooth]# pair 00:07:BE:1C:40:C4
Attempting to pair with 00:07:BE:1C:40:C4
[CHG] Device 00:07:BE:1C:40:C4 Connected: yes
[agent] PIN code: 352950
[CHG] Device 00:07:BE:1C:40:C4 Connected: no
[CHG] Device 00:07:BE:1C:40:C4 Connected: yes
Failed to pair: org.bluez.Error.AuthenticationRejected
[CHG] Device 00:07:BE:1C:40:C4 Connected: no

A 6 digit PIN code is now requested, and 1 second after that the connection is broken.

SPP

For the serial “Enable RF Link to Server” the pairing turns out different:

# bluetoothctl
Agent registered
[bluetooth]# agent off
Agent unregistered
[bluetooth]# agent KeyboardOnly
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 14:4F:8A:30:DF:AD Discovering: yes
[CHG] Device 00:07:BE:1C:40:C4 LegacyPairing: yes
[CHG] Device 00:07:BE:1C:40:C4 RSSI: -61
[bluetooth]# pair 00:07:BE:1C:40:C4
Attempting to pair with 00:07:BE:1C:40:C4
[CHG] Device 00:07:BE:1C:40:C4 Connected: yes
Request PIN code
[agent] Enter PIN code: 0000
Failed to pair: org.bluez.Error.AuthenticationTimeout
[CHG] Device 00:07:BE:1C:40:C4 Connected: no

The green light on the QuickScan to indicate PIN code entry mode does not turn on. The disconnect happens between 10 and 20 seconds.


How to pair/connect this bluetooth barcode scanner in Serial Mode?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.