Just-Works Bluetooth pairing not working with Toradex Verdin AM62 WB on Ivy Board

Hi there, we have a AM62 running a very minimally modified version of Torizon 6.8.0.

We are trying to get Just-Works pairing to work with the Bluetooth module (ideally via the launch of a script eventually). While almost everything seems to be working with BlueZ, we can manually connect by confirming the codes just fine, it will not initiate an automatic handshake regardless of the agents settings. I’ve tried using the following steps before attempting to connect.

power on
agent NoInputNoOutput
default-agent
pairable on
discoverable on

When attempting to connect our mobile device to the board, we are still prompted yes/no to confirm the connection. Which does work if I confirm yes on the board, but which of course defeats the purpose of Just-Works.

Here’s the output of tdx-info.

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           6.1.83-6.8.0+git.8e6ca06a787a #1-TorizonCore SMP PREEMPT Fri Sep 27 07:54:42 UTC 2024
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/f9f77f8fb206d3fe4827bc79b18fcb4cf56151d8272b30d98a0c09653393789b/0
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=6.8.0-build.22
Distro variant:           VARIANT="Docker"
Hostname:                 machinepulse-15387816
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin AM62 WB on Ivy Board
Toradex version:          0075 V1.1C
Serial number:            15387816
Processor arch:           aarch64
------------------------------------------------------------

Let me know your thoughts please, thank you!

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for your detailed question and the summary of your setup.

You’re very close to getting “Just-Works” pairing mode functioning. With BlueZ, the “Just-Works” pairing method depends both on the IO capabilities exposed by your Bluetooth agent and the mobile device. While you’ve correctly set the agent to NoInputNoOutput and enabled default-agent, BlueZ’s Secure Simple Pairing (SSP) may still prompt for user confirmation on the Linux device if the agent program doesn’t automatically accept the pairing request.

By default, the bluetoothctl’s simple agent prompts for confirmation. To enable truly automatic Just-Works pairing (i.e., without manual confirmation), you need to ensure that your Bluetooth daemon runs in compatibility mode and that the agent is configured to auto-accept pairing requests.

Here’s how you can proceed:

  1. Enable Compatibility Mode in BlueZ
    This enables the classic bluetooth-agent behavior, which allows pairing without explicit user confirmation.
  • Edit the Bluetooth systemd service file:
    vi /lib/systemd/system/bluetooth.service
    
  • Change this line:
    ExecStart=/usr/libexec/bluetooth/bluetoothd
    
    to:
    ExecStart=/usr/libexec/bluetooth/bluetoothd --compat
    
  • Reload systemd and restart Bluetooth:
    systemctl daemon-reload
    systemctl restart bluetooth
    

(reference)

  1. Use the Classic BlueZ Simple-Agent Script
    Alternatively, you can use or adapt the simple-agent Python script from BlueZ’s source (found under /usr/share/doc/bluez/examples/simple-agent or similar paths) and ensure it is registered as the default agent. This script can be modified to auto-confirm pairings.

A quick example modification is to always return yes for the RequestConfirmation and RequestAuthorization methods.

  1. Register Your Script as the Agent
  • Stop bluetoothctl if running.
  • Run your agent script:
    python3 /path/to/your/simple-agent
    
  • Make sure it registers as the default agent and handles pairing requests as you need.
  1. Try Pairing Again
    Now, when you try pairing from your mobile device, confirmation should not be required on the Linux system.

Final Notes:

  • Some mobile devices’ Bluetooth stacks always show a confirmation dialog for certain profiles, regardless of PC/device settings, so check with multiple client devices if you continue to see the dialog.
  • For complete Just-Works automation—including launching your script at boot—you can create a systemd service to start your custom agent.

For more information, reference the Bluetooth on Linux guide for Toradex:

Let me know if you need an example agent script or further assistance automating this!

Best regards,
Toradex AI Assistant.

Hey @ngarman,

How are you coming along with this topic?

Could you try “agent off” prior to to creating, this will remove the default user.

agent NoInputNoOutput

I was able to connect via my computer and mobile phone this way without prompt.

-Eric